fix(ai-orchestrator): migrate from retired Claude 3.5 to active Claude 4.6 models#137
Merged
Merged
Conversation
…e 4.6 models - Update AgentPersona.model type union to 'claude-sonnet-4-6' | 'claude-sonnet-4-5' - Set @isolate-a11y persona to use claude-sonnet-4-6 (primary model) - Update Anthropic client initialization with stable 'claude-sonnet-4-6' identifier - Fix model routing logic in llm-persona-node to handle both new Claude 4.x models - Update all unit tests to expect claude-sonnet-4-6 instead of retired claude-3-5-sonnet - Update documentation (.env.example, README.md) to reflect Claude 4.6 migration Fixes #136: Resolves 404 errors from retired Claude 3.5 Sonnet model family (EOL Feb 2026)
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the ai-orchestrator Anthropic integration away from retired Claude 3.5 identifiers to the active Claude 4.x model family so the @isolate-a11y persona can successfully invoke Anthropic without 404s.
Changes:
- Updated persona model typing and
a11ypersona configuration to useclaude-sonnet-4-6(and allowclaude-sonnet-4-5in the union). - Updated Anthropic client initialization to use
claude-sonnet-4-6. - Updated orchestrator routing, unit tests, and docs/env examples to reflect the new Claude 4.6 identifiers.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/ai-orchestrator/src/orchestrator/llm-persona-node.ts | Routes Claude Sonnet 4.6/4.5 personas to the Anthropic client instead of the retired 3.5 model. |
| libs/ai-orchestrator/src/orchestrator/llm-persona-node.spec.ts | Updates the routing test naming/expectations for the new Claude 4.6 model ID. |
| libs/ai-orchestrator/src/llm/clients.ts | Switches the Anthropic client’s configured model to claude-sonnet-4-6. |
| libs/ai-orchestrator/src/agents/personas.ts | Expands AgentPersona.model union for Claude 4.x and updates the a11y persona to 4.6. |
| libs/ai-orchestrator/src/tests/personas.spec.ts | Updates persona model assertions to accept the new model strings and verifies a11y uses 4.6. |
| libs/ai-orchestrator/src/tests/clients.spec.ts | Updates Anthropic client factory test to expect claude-sonnet-4-6. |
| libs/ai-orchestrator/README.md | Updates documentation wording from Claude 3.5 to Claude 4.6. |
| .env.example | Updates Anthropic env comment to reference Claude 4.6. |
… test coverage - Replace chained || condition with ANTHROPIC_MODELS.includes() for better readability and extensibility when adding new Claude models - Add explanatory comment in clients.ts documenting the current limitation: only claude-sonnet-4-6 is instantiated, but the type union allows both 4-6 and 4-5 for future flexibility - Add regression test for claude-sonnet-4-5 routing to ensure the ANTHROPIC_MODELS list is correctly checked, preventing breakage when personas use 4-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Anthropic API retired all Claude 3.5 models (Sonnet, Haiku) in February 2026. This PR migrates the
@isolate-a11ypersona from the deprecatedclaude-3-5-sonnet-20241022model to the active Claude 4.x model family, specificallyclaude-sonnet-4-6, resolving persistent 404 errors.Closes #136
Changes
AgentPersona.modeltype union from'gpt-4o' | 'claude-3-5-sonnet'to'gpt-4o' | 'claude-sonnet-4-6' | 'claude-sonnet-4-5'to support the new Claude 4.x model family@isolate-a11ypersona to useclaude-sonnet-4-6as the primary Anthropic modelgetAnthropicClient()initialization to use the stableclaude-sonnet-4-6identifier instead of the deprecatedclaude-3-5-sonnet-20241022llm-persona-node.tsto correctly route both new Claude 4.x models to the Anthropic clientclients.spec.ts,personas.spec.ts, andllm-persona-node.spec.tsto expectclaude-sonnet-4-6instead of the retired model.env.exampleandlibs/ai-orchestrator/README.mdto reference Claude 4.6 instead of Claude 3.5 SonnetVerification
✅ TypeScript compilation passes (
pnpm nx typecheck ai-orchestrator)✅ All 275 unit tests pass across 18 test files (
pnpm nx test ai-orchestrator -- --run)✅ Conventional commit format validated by commitlint
✅ Prettier code formatting applied
Copilot Review Triage
Deferred follow-ups
None. This is a minimal, surgical migration with no scope creep.