mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
1dd813f00a
* fix(byok): preserve provider model order * test(e2e): expect current DeepSeek preset model Generated-By: looper 0.10.4 (runner=fixer, agent=codex) * fix(byok): preserve DeepSeek and Ollama defaults Align DeepSeek e2e fixtures with the V4 preset defaults and keep the existing Ollama Cloud gpt-oss:120b default first in the canonical preference list.\n\nGenerated-By: looper 0.10.4 (runner=fixer, agent=codex)
47 lines
1.7 KiB
TypeScript
47 lines
1.7 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import {
|
|
FAST_MODEL_BY_PROTOCOL,
|
|
SUGGESTED_MODELS_BY_PROTOCOL,
|
|
} from '../../src/state/apiProtocols';
|
|
import { KNOWN_PROVIDERS } from '../../src/state/config';
|
|
|
|
describe('apiProtocols table consistency', () => {
|
|
it('FAST_MODEL_BY_PROTOCOL.google is one of the live suggested models', () => {
|
|
expect(SUGGESTED_MODELS_BY_PROTOCOL.google).toContain(FAST_MODEL_BY_PROTOCOL.google);
|
|
});
|
|
|
|
it('keeps the Ollama Cloud picker current with recent cloud models', () => {
|
|
const recentCloudModels = [
|
|
'glm-5.2',
|
|
'kimi-k2.7-code',
|
|
];
|
|
const ollamaCloudProvider = KNOWN_PROVIDERS.find(
|
|
(provider) => provider.protocol === 'ollama' && provider.baseUrl === 'https://ollama.com',
|
|
);
|
|
|
|
expect(ollamaCloudProvider?.preferredModels).toBeDefined();
|
|
for (const model of recentCloudModels) {
|
|
expect(SUGGESTED_MODELS_BY_PROTOCOL.ollama).toContain(model);
|
|
expect(ollamaCloudProvider?.preferredModels).toContain(model);
|
|
}
|
|
});
|
|
|
|
it('keeps the Atlas Cloud preset wired to OpenAI-compatible chat models', () => {
|
|
const atlasCloudProvider = KNOWN_PROVIDERS.find(
|
|
(provider) =>
|
|
provider.protocol === 'openai' &&
|
|
provider.baseUrl === 'https://api.atlascloud.ai/v1',
|
|
);
|
|
|
|
expect(atlasCloudProvider).toMatchObject({
|
|
label: 'Atlas Cloud',
|
|
apiKeyConsoleLink: {
|
|
host: 'atlascloud.ai',
|
|
url: 'https://atlascloud.ai/?utm_source=open_design&utm_medium=provider_preset&utm_campaign=atlascloud_byok',
|
|
},
|
|
});
|
|
expect(atlasCloudProvider?.preferredModels).toContain('qwen/qwen3.5-flash');
|
|
expect(atlasCloudProvider?.preferredModels).toContain('deepseek-ai/deepseek-v4-flash');
|
|
});
|
|
});
|