Repository navigation
feat(effort): carry the client's effort level to Codex and Anthropic backends - #644
Merged
Merged
Conversation
…backends Claude Code sends its /effort setting as output_config.effort, and the canonical request had no slot for it: serde dropped it at the parse, along with context_management and thinking.display. The Codex path likewise never translated a Responses reasoning.effort for an Anthropic backend. - Keep every native /v1/messages field the canonical request cannot hold in extensions.anthropic_passthrough and merge it back into the outbound body for api.anthropic.com only. - Expose output_config.effort as the shared reasoning_effort so the Codex path honours it over its flat default. - Translate between the two vocabularies in models::effort: max/ultra clamp to xhigh on gpt-5 models, minimal→low and ultra→max on Anthropic, and output_config is only sent to models that accept it (4.6+ and 5). - Add the effort-2025-11-24 beta to the default Anthropic beta set. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Destynova2
enabled auto-merge (squash)
October 14, 2026 19:20
Destynova2
added a commit
that referenced
this pull request
Oct 14, 2026
## 🤖 New release * `grob`: 0.36.124 -> 0.36.125 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.36.125](v0.36.124...v0.36.125) - 2026-10-14 ### Added - *(effort)* carry the client's effort level to Codex and Anthropic backends ([#644](#644)) ### Other - skip the no-commit-to-branch hook in the prek gate ([#641](#641)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
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
Claude Code sends its
/effortsetting asoutput_config.efforton every request (captured on the wire:output_config,context_managementandthinking.displayare all present).CanonicalRequesthas no slot for any of them, so serde silently dropped them at the parse and Anthropic never saw the effort level, the context editing config, or the thinking display mode. In the other direction, a Codex CLIreasoning.effortwas never translated for an Anthropic backend.What
RequestExtensions::anthropic_passthroughkeeps every native/v1/messagestop-level field the canonical request cannot hold (plus the rawthinkingobject for itsdisplaykey). The Anthropic provider merges it back into the outbound body forapi.anthropic.comonly; other Anthropic-compatible backends keep the canonical shape since they 400 on unknown fields.output_config.effortfeedsextensions.reasoning_effort, so the Codex path uses the client's level instead of its flatxhighdefault.src/models/effort.rs):max/ultraclamp toxhighon gpt-5 models (which reject them; gpt-6 takes them as-is);minimal→lowandultra→maxon Anthropic;output_configis only sent to models that accept it (Opus/Sonnet 4.6+, Claude 5), so a request mapped ontoclaude-haiku-4-5is unchanged.effort-2025-11-24added to the default Anthropic beta set.api-compatibility.mdandproviders.mdget the field table and the translation matrix.Verified
Debug build on a spare port with the real config, outbound bodies read from the
grob::wirelog:/v1/messages+output_config.effort: low+thinking.display: omitted/v1/messages+output_config.effort: highresolve_reasoning_effort, unit-tested)/v1/responses+reasoning.effort: ultraoutput_config.effort: max, 200/v1/messages+output_config.effort: highoutput_config, 2001616 lib tests pass, clippy clean.
🤖 Generated with Claude Code