Skip to content

Commit f666dc6

Browse files
catomeanclaude
andcommitted
fix(ai): replace retired Claude model defaults
- providers.py: claude-sonnet-4-20250514 (deprecated, retires Jun 2026) -> claude-sonnet-5 - constants.ts: anthropic/claude-3.5-sonnet (retired Oct 2025 on OpenRouter) -> anthropic/claude-sonnet-5 (verified against OpenRouter's live model list) - test fixtures updated to match Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent f4a2fbc commit f666dc6

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

agents/research-agent/src/providers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ProviderConfig:
3030

3131
# Default models per provider
3232
DEFAULT_MODELS = {
33-
Provider.ANTHROPIC: "claude-sonnet-4-20250514",
33+
Provider.ANTHROPIC: "claude-sonnet-5",
3434
Provider.GROQ: "llama-3.1-70b-versatile",
3535
Provider.OLLAMA: "phi3", # Small, fast, works on most machines
3636
}

lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const API_CONFIG = {
5555

5656
// OpenRouter
5757
OPENROUTER_API_URL: 'https://openrouter.ai/api/v1/chat/completions',
58-
OPENROUTER_DEFAULT_MODEL: 'anthropic/claude-3.5-sonnet',
58+
OPENROUTER_DEFAULT_MODEL: 'anthropic/claude-sonnet-5',
5959

6060
// Token limits
6161
MAX_CONTEXT_CHARS: 8000,

tests/__tests__/lib/llm-client.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jest.mock('@/lib/constants', () => ({
66
GROQ_API_URL: 'https://api.groq.com/openai/v1/chat/completions',
77
GROQ_MODEL: 'llama-3.1-8b-instant',
88
OPENROUTER_API_URL: 'https://openrouter.ai/api/v1/chat/completions',
9-
OPENROUTER_DEFAULT_MODEL: 'anthropic/claude-3.5-sonnet',
9+
OPENROUTER_DEFAULT_MODEL: 'anthropic/claude-sonnet-5',
1010
},
1111
}));
1212

@@ -162,10 +162,10 @@ describe('generateLLMResponse', () => {
162162
expect(mockFetch).toHaveBeenCalledWith(
163163
'https://openrouter.ai/api/v1/chat/completions',
164164
expect.objectContaining({
165-
body: expect.stringContaining('"model":"anthropic/claude-3.5-sonnet"'),
165+
body: expect.stringContaining('"model":"anthropic/claude-sonnet-5"'),
166166
}),
167167
);
168-
expect(result.model).toBe('anthropic/claude-3.5-sonnet');
168+
expect(result.model).toBe('anthropic/claude-sonnet-5');
169169
});
170170

171171
it('uses custom model when specified', async () => {

0 commit comments

Comments
 (0)