Skip to content

feat: add effort param and adaptive thinking support for Anthropic#34

Open
dhruv92 wants to merge 1 commit intopatchedfrom
feat/effort-adaptive-clean
Open

feat: add effort param and adaptive thinking support for Anthropic#34
dhruv92 wants to merge 1 commit intopatchedfrom
feat/effort-adaptive-clean

Conversation

@dhruv92
Copy link
Copy Markdown

@dhruv92 dhruv92 commented Apr 6, 2026

why

We're migrating the agent from Sonnet 4.5 → 4.6. Anthropic's migration guide says:

  • effort: medium is the recommended config for agentic coding (replaces budget_tokens which is deprecated for 4.6)
  • thinking.type: 'adaptive' lets the model skip thinking on simple tool calls, reducing latency

Our gateway currently only passes through thinking.type: 'enabled' with budget_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 providers
  • budget_tokens made optional in thinking config (required for enabled, optional for adaptive)

4 files, +12/-2 lines. Purely additive — no change to existing behavior. Existing budget_tokens flows are unaffected.

context

  • Sonnet 4.6 eval results: -26% tokens, -35% duration, -47% errors vs 4.5 on greenfield
  • Mid-conversation performance under investigation (may need higher budget_tokens or effort tuning)
  • Experiment branches: experiment/sonnet-46-raw-upgrade, experiment/sonnet-46-prompt-migration

@dhruv92 dhruv92 requested a review from jpulec April 6, 2026 05:12
@dhruv92 dhruv92 force-pushed the feat/effort-adaptive-clean branch from e00bda9 to ef950b0 Compare April 6, 2026 05:52
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gateway Ready Ready Preview, Comment Apr 6, 2026 6:01am

Request Review

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant