fix: Claude Opus 5 support for claude_code and anthropic providers - #3759
Merged
Conversation
- Add claude-opus-5 model to claude_code provider in provider.json (1M context) - Classify opus-5 as AdaptiveOnly in ModelSpecificReasoning (adaptive thinking only; drops budget_tokens and sampling params like Opus 4.7/4.8) - Skip redundant interleaved-thinking beta header for Opus 5 - Map claude-opus-5 to 1M context length in Anthropic response DTO Co-Authored-By: ForgeCode <noreply@forgecode.dev>
amitksingh1490
marked this pull request as ready for review
July 24, 2026 18:03
tusharmath
approved these changes
Jul 24, 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.
Summary
Integrates the newly released Claude Opus 5 (released Jul 24, 2026):
claude-opus-5model to theclaude_codeprovider inprovider.json(1M context, tools, reasoning, text+image). Theanthropicprovider lists models dynamically from the API, so it picks up the model automatically.opus-5asAdaptiveOnlyinModelSpecificReasoning— adaptive thinking only; legacybudget_tokensandtemperature/top_p/top_kare dropped (same API contract as Opus 4.7/4.8).interleaved-thinking-2025-05-14beta header for Opus 5 (auto-enabled by adaptive thinking).claude-opus-5to 1M-token context length in the Anthropic response DTO.Test plan
cargo test -p forge_app -p forge_repo— all passCo-Authored-By: ForgeCode noreply@forgecode.dev