mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-19 06:14:52 +00:00
fix(copilot): stop mutating config on read
This commit is contained in:
1 parent
c409a4522c
commit
7bd4049602
12 files changed
+657
-330
No files matched your search
@@ -29,6 +29,18 @@ describe('generateCopilotEnv', () => {
|
||||
expect(env.ANTHROPIC_SMALL_FAST_MODEL).toBe('gpt-4.1');
|
||||
});
|
||||
|
||||
it('falls back deprecated haiku overrides to the selected base model', () => {
|
||||
const env = generateCopilotEnv({
|
||||
...baseConfig,
|
||||
model: 'claude-sonnet-4.5',
|
||||
haiku_model: 'raptor-mini',
|
||||
});
|
||||
|
||||
expect(env.ANTHROPIC_MODEL).toBe('claude-sonnet-4.5');
|
||||
expect(env.ANTHROPIC_DEFAULT_HAIKU_MODEL).toBe('claude-sonnet-4.5');
|
||||
expect(env.ANTHROPIC_SMALL_FAST_MODEL).toBe('claude-sonnet-4.5');
|
||||
});
|
||||
|
||||
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');
|
||||
|
||||
Reference in new issue
Block a user