Repository navigation
fix: Claude Opus 5.5 support for claude_code and anthropic providers - #3928
Merged
Merged
Conversation
…ders Registers `claude-opus-5-5` (released 2026-09-22) with a 1M context window, matching the Claude Opus 5 rollout in tailcallhq#3759. The existing `opus-5` substring and `claude-opus-5` prefix predicates already classify Opus 5.5 correctly, so no branching logic changes are needed: - `ModelSpecificReasoning` maps it to `AdaptiveOnly`, which is required because Opus 5.5 rejects `thinking.type.disabled` and legacy `budget_tokens` with a 400. - `interleaved_thinking_required` returns false, since adaptive thinking auto-enables interleaving. - `get_context_length` returns 1M. Regression tests lock in each of those behaviours so a future change to the predicates can't silently drop Opus 5.5. Co-Authored-By: ForgeCode <[email protected]>
Contributor
Author
|
Hi maintainers, friendly nudge: the It's a small change: one Co-Authored-By: ForgeCode [email protected] |
amitksingh1490
enabled auto-merge (squash)
September 28, 2026 11:30
amitksingh1490
approved these changes
Sep 28, 2026
amitksingh1490
approved these changes
Sep 28, 2026
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.
What
Registers
claude-opus-5-5(released 2026-09-22) as a selectable model, following the same pattern as the Claude Opus 5 rollout in #3759.Why
Opus 5.5 is Anthropic's new flagship for long-running agentic coding — 1M context, 128K max output, at $4/$20 per MTok (down from Opus 5's $5/$25). It's available on the Claude API, Bedrock, Google Cloud, and Microsoft Foundry, and via Claude Code subscriptions.
Changes
provider.json— adds theclaude-opus-5-5entry to theclaude_codeprovider list. Theanthropicprovider resolves its models from the API at runtime, so it needs no static entry.No branching logic changes were needed. The existing predicates already classify Opus 5.5 correctly by substring/prefix:
claude-opus-5-5ModelSpecificReasoning::family(contains("opus-5"))AdaptiveOnlythinking.type.disabledand legacybudget_tokenswith a 400; sampling params must stay defaultinterleaved_thinking_required(contains("opus-5"))falseget_context_length(starts_with("claude-opus-5"))Some(1_000_000)Since this correctness is implicit in substring matching rather than explicit, I added regression tests for all three so a future narrowing of those predicates can't silently break Opus 5.5. Doc comments were updated to name Opus 5.5 alongside Opus 5.
Note for reviewers
Opus 5.5 also drops support for forced tool use —
tool_choiceofanyortoolnow returns a 400. Forge'sFrom<forge_domain::ToolChoice>mapsRequired→anyandCall→toolincrates/forge_app/src/dto/anthropic/request.rs:493-505, so those would fail against this model.I deliberately left that alone: nothing in the agent loop currently sets a non-
Autotool choice (ToolChoice::Required/Callappear only in conversions and tests), so there's no live breakage, and guarding it properly is a broader change than this PR. Flagging it in case you'd like it handled separately.Testing
cargo test -p forge_app -p forge_repo— 1058 passed, 0 failedcargo clippy -p forge_app -p forge_repo --all-targets— cleantest_get_context_length_opus_5_5,test_opus_5_5_drops_max_tokens_and_sampling_params, plusclaude-opus-5-5added to the interleaved-thinking header test matrixCo-Authored-By: ForgeCode [email protected]