Clarify thinking_budget docs and support adaptive thinking for Claude Opus 4.6+ on Bedrock#3096
Open
dgageot wants to merge 3 commits into
Open
Clarify thinking_budget docs and support adaptive thinking for Claude Opus 4.6+ on Bedrock#3096dgageot wants to merge 3 commits into
dgageot wants to merge 3 commits into
Conversation
…Ds, add adaptive thinking support to Bedrock provider - Recognize Claude Opus 4.8 and Bedrock-style model IDs (global/regional prefixes) as requiring adaptive thinking - Add Client.adaptiveThinkingEffort() to detect and handle adaptive thinking modes - Map effort levels to adaptive output_config.effort on Opus 4.6+ models - Auto-coerce token budgets to adaptive with a warning on models that reject token-based thinking - Add comprehensive test coverage for adaptive thinking scenarios Fixes docker#3093
- Anthropic: clarify token budgets (1024–32768) vs adaptive thinking (Opus 4.6+); explain auto-coercion of effort levels - Bedrock: document adaptive thinking requirement for Opus 4.6+ models; explain token-budget coercion - OpenAI: remove false claims about adaptive thinking; clarify only effort levels accepted, no token counts - xAI/Mistral: correct that thinking_budget is not applied (reasoning_effort only for OpenAI model names) - Gemini: fix example model names and effort level accuracy per provider - Generic: add per-provider effort values and clear disabling guidance; mention Docker Model Runner support - Examples: add Bedrock Opus 4.8 adaptive example; fix provider defaults to use token values Fixes docker#3093
…r, clearer adaptive-thinking logging, edge-case tests, and Gemini/Bedrock docs clarifications
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Reviewed changes in PR #3096 ("Clarify thinking_budget docs and support adaptive thinking for Claude Opus 4.6+ on Bedrock").
Scope of changes reviewed:
pkg/model/provider/bedrock/client.go— adaptive thinking support, temperature/top_p suppression, coercion of token budgets to effort levelspkg/model/modelinfo/modelinfo.go—bedrockClaudeModelNamehelper, Opus 4.8 recognition,RejectsTokenThinkingextensionpkg/model/provider/bedrock/client_test.go— new test coverage for adaptive thinking paths- Documentation updates across all providers (
docs/guides/thinking/index.md,docs/providers/*/index.md)
No bugs found. The implementation correctly:
- Coerces token-based
thinking_budgetvalues to Bedrock's effort levels with appropriate user-facing warnings - Suppresses
temperatureandtop_pfor adaptive thinking requests (matching Bedrock API requirements) - Extends
RejectsTokenThinkingto cover both the canonical Opus 4.8 model ID and Bedrock-namespaced variants via the newbedrockClaudeModelNamehelper - Adds adequate test coverage for the new coercion and suppression logic
|
❌ PR Review Failed — The review agent encountered an error and could not complete the review. View logs. |
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.
Claude Opus 4.8 and Bedrock-hosted Opus models now require adaptive thinking mode rather than token-based budgets. This PR extends the codebase to recognize these models and automatically adapt their thinking configuration while clarifying the documentation across all providers.
The changes add a
bedrockClaudeModelNamehelper to recognize Bedrock-style model IDs alongside their regular names inmodelinfo.RejectsTokenThinking, implement adaptive thinking support in the Bedrock provider with automatic coercion of token budgets to adaptive effort levels (with warnings), and suppress temperature/top_p settings appropriately for adaptive requests. Sonnet-class models retain their existing token-to-effort mapping without behavior changes.Documentation updates remove false claims about adaptive thinking support in OpenAI and clarify per-provider thinking_budget capabilities. The Bedrock section now explains adaptive thinking requirements for Opus 4.6+, and examples include a realistic Bedrock Opus 4.8 configuration. All tests pass including new coverage for Bedrock adaptive thinking scenarios and Opus 4.8 model recognition.
Fixes #3093