feat: add effort param and adaptive thinking support for Anthropic#34
Open
feat: add effort param and adaptive thinking support for Anthropic#34
Conversation
e00bda9 to
ef950b0
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add effort passthrough to anthropic direct, messages API, and bedrock providers - Make budget_tokens optional in thinking config (required for enabled, optional for adaptive) - Enables effort:medium/low/high and thinking.type:adaptive through the gateway
ef950b0 to
914353b
Compare
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.
why
We're migrating the agent from Sonnet 4.5 → 4.6. Anthropic's migration guide says:
effort: mediumis the recommended config for agentic coding (replacesbudget_tokenswhich is deprecated for 4.6)thinking.type: 'adaptive'lets the model skip thinking on simple tool calls, reducing latencyOur gateway currently only passes through
thinking.type: 'enabled'withbudget_tokens. This PR adds the new params so we can use the recommended 4.6 config.what
effort(high/medium/low) passthrough for direct Anthropic, Messages API, and Bedrock providersbudget_tokensmade optional in thinking config (required forenabled, optional foradaptive)4 files, +12/-2 lines. Purely additive — no change to existing behavior. Existing
budget_tokensflows are unaffected.context
experiment/sonnet-46-raw-upgrade,experiment/sonnet-46-prompt-migration