mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
a723012526
* refactor(media): remove Codex image generation * fix(media): preserve HyperFrames video default * test(media): keep Vela coverage image-only * fix(media): persist Home image model selection
40 lines
1.8 KiB
TypeScript
40 lines
1.8 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { supportedModels } from '../../src/components/NewProjectPanel';
|
|
import { AUDIO_MODELS_BY_KIND, IMAGE_MODELS, VIDEO_MODELS } from '../../src/media/models';
|
|
|
|
describe('NewProjectPanel image provider visibility', () => {
|
|
it('shows Vela image models without exposing Codex image models', () => {
|
|
const imageModels = supportedModels('image', IMAGE_MODELS);
|
|
expect(imageModels.some((model) => model.provider === 'vela')).toBe(true);
|
|
expect(imageModels.map((model) => String(model.provider))).not.toContain('codex');
|
|
});
|
|
|
|
it('shows Nano Banana in supported image models', () => {
|
|
const models = supportedModels('image', IMAGE_MODELS);
|
|
expect(models.some((model) => model.provider === 'nanobanana')).toBe(true);
|
|
expect(models.some((model) => model.id === 'gemini-3.1-flash-image-preview')).toBe(true);
|
|
});
|
|
|
|
it('shows ElevenLabs speech models in supported audio models', () => {
|
|
const models = supportedModels('audio', AUDIO_MODELS_BY_KIND.speech);
|
|
expect(models.some((model) => model.provider === 'elevenlabs')).toBe(true);
|
|
expect(models.some((model) => model.id === 'elevenlabs-v3')).toBe(true);
|
|
});
|
|
|
|
it('shows ElevenLabs sound effects models in supported audio models', () => {
|
|
const models = supportedModels('audio', AUDIO_MODELS_BY_KIND.sfx);
|
|
expect(models.some((model) => model.id === 'elevenlabs-sfx')).toBe(true);
|
|
});
|
|
|
|
it('shows OpenRouter in supported image models', () => {
|
|
const models = supportedModels('image', IMAGE_MODELS);
|
|
expect(models.some((model) => model.provider === 'openrouter')).toBe(true);
|
|
});
|
|
|
|
it('shows OpenRouter in supported video models', () => {
|
|
const models = supportedModels('video', VIDEO_MODELS);
|
|
expect(models.some((model) => model.provider === 'openrouter')).toBe(true);
|
|
});
|
|
});
|