Skip to content

fix: Claude Opus 5.5 support for claude_code and anthropic providers - #3928

Merged
amitksingh1490 merged 2 commits into
tailcallhq:mainfrom
bogdanr:feat/claude-opus-5-5
Sep 28, 2026
Merged

amitksingh1490 merged 2 commits into
tailcallhq:mainfrom
bogdanr:feat/claude-opus-5-5

Conversation

@bogdanr

@bogdanr bogdanr commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

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 the claude-opus-5-5 entry to the claude_code provider list. The anthropic provider 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:

Predicate Result for claude-opus-5-5 Why it's correct
ModelSpecificReasoning::family (contains("opus-5")) AdaptiveOnly Opus 5.5 rejects thinking.type.disabled and legacy budget_tokens with a 400; sampling params must stay default
interleaved_thinking_required (contains("opus-5")) false Adaptive thinking auto-enables interleaving, so the beta flag must be omitted
get_context_length (starts_with("claude-opus-5")) Some(1_000_000) Opus 5.5 has a 1M context window

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_choice of any or tool now returns a 400. Forge's From<forge_domain::ToolChoice> maps Required → any and Call → tool in crates/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-Auto tool choice (ToolChoice::Required / Call appear 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 failed
  • cargo clippy -p forge_app -p forge_repo --all-targets — clean
  • New: test_get_context_length_opus_5_5, test_opus_5_5_drops_max_tokens_and_sampling_params, plus claude-opus-5-5 added to the interleaved-thinking header test matrix

Co-Authored-By: ForgeCode [email protected]

…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]>
@github-actions github-actions Bot added type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: provider Updates provider.json configuration. labels Sep 22, 2026
@bogdanr

bogdanr commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Hi maintainers, friendly nudge: the ci, autofix.ci, and Bounty Management workflows on this PR are waiting on action_required because it comes from a fork. Could someone approve the workflow run so CI can check it?

It's a small change: one provider.json entry plus regression tests. It still merges cleanly into main; the only new upstream commits since I opened it are Renovate dependency bumps. Thanks!

Co-Authored-By: ForgeCode [email protected]

@amitksingh1490
amitksingh1490 enabled auto-merge (squash) September 28, 2026 11:30
@amitksingh1490 amitksingh1490 changed the title feat: add Claude Opus 5.5 support for claude_code and anthropic providers fix: Claude Opus 5.5 support for claude_code and anthropic providers Sep 28, 2026
@amitksingh1490
amitksingh1490 merged commit 177c503 into tailcallhq:main Sep 28, 2026
10 checks passed
@github-actions github-actions Bot added the type: fix Iterations on existing features or infrastructure. label Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc. type: fix Iterations on existing features or infrastructure. type: provider Updates provider.json configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants