feat(models): add minimax and moonshot providers
This commit is contained in:
@@ -179,6 +179,24 @@ describe('configSchema — models auth_mode', () => {
|
||||
});
|
||||
expect(result.models.default.provider).toBe('vercel');
|
||||
});
|
||||
|
||||
it('accepts minimax and moonshot provider ids', () => {
|
||||
const minimax = configSchema.parse({
|
||||
...minimalConfig,
|
||||
models: {
|
||||
default: { provider: 'minimax', model: 'MiniMax-M1', api_key: 'test-key' },
|
||||
},
|
||||
});
|
||||
expect(minimax.models.default.provider).toBe('minimax');
|
||||
|
||||
const moonshot = configSchema.parse({
|
||||
...minimalConfig,
|
||||
models: {
|
||||
default: { provider: 'moonshot', model: 'moonshot-v1-8k', api_key: 'test-key' },
|
||||
},
|
||||
});
|
||||
expect(moonshot.models.default.provider).toBe('moonshot');
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — matrix', () => {
|
||||
|
||||
@@ -39,7 +39,7 @@ const serverSchema = z.object({
|
||||
});
|
||||
|
||||
/** All supported model provider identifiers. Used by the config schema and TUI autocompletion. */
|
||||
export const MODEL_PROVIDERS = ['anthropic', 'openai', 'gemini', 'ollama', 'llamacpp', 'openrouter', 'vercel', 'bedrock', 'github', 'zhipuai', 'xai', 'synthetic'] as const;
|
||||
export const MODEL_PROVIDERS = ['anthropic', 'openai', 'gemini', 'ollama', 'llamacpp', 'openrouter', 'vercel', 'bedrock', 'github', 'zhipuai', 'xai', 'minimax', 'moonshot', 'synthetic'] as const;
|
||||
|
||||
export type ModelProvider = (typeof MODEL_PROVIDERS)[number];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user