fix: normalize stale copilot raptor-mini model

This commit is contained in:
Tam Nhu Tran committed 2026-03-10 17:55:28 +07:00
1 parent 447033cb03
commit c409a4522c
13 files changed
+633 -72

No files matched your search

@@ -13,6 +13,22 @@ const baseConfig: CopilotConfig = {
};
describe('generateCopilotEnv', () => {
it('normalizes deprecated raptor-mini model selections to the safe default', () => {
const env = generateCopilotEnv({
...baseConfig,
model: 'raptor-mini',
opus_model: 'raptor-mini',
sonnet_model: 'raptor-mini',
haiku_model: 'raptor-mini',
});
expect(env.ANTHROPIC_MODEL).toBe('gpt-4.1');
expect(env.ANTHROPIC_DEFAULT_OPUS_MODEL).toBe('gpt-4.1');
expect(env.ANTHROPIC_DEFAULT_SONNET_MODEL).toBe('gpt-4.1');
expect(env.ANTHROPIC_DEFAULT_HAIKU_MODEL).toBe('gpt-4.1');
expect(env.ANTHROPIC_SMALL_FAST_MODEL).toBe('gpt-4.1');
});
it('includes inherited CLAUDE_CONFIG_DIR when provided', () => {
const env = generateCopilotEnv(baseConfig, '/tmp/.ccs/instances/pro');
expect(env.CLAUDE_CONFIG_DIR).toBe('/tmp/.ccs/instances/pro');
@@ -23,4 +39,3 @@ describe('generateCopilotEnv', () => {
expect(env.CLAUDE_CONFIG_DIR).toBeUndefined();
});
});