fix(anthropic): raise adaptive-thinking max_tokens default#237
Open
jonathanli12 wants to merge 1 commit into
Open
fix(anthropic): raise adaptive-thinking max_tokens default#237jonathanli12 wants to merge 1 commit into
jonathanli12 wants to merge 1 commit into
Conversation
|
✅ Target branch corrected This pull request now targets The |
Adaptive Claude models (Fable 5, Sonnet 5, Opus 4.7+) previously kept the generic 8192 max_tokens default because the adaptive path only set thinking/effort and never resized max_tokens. Long Codex turns hit the cap mid-work and finished with no final message even though those models support 128k output. Default adaptive max_tokens to 128000 when Codex omits max_output_tokens, and preserve explicit budgets. Add regression coverage.
jonathanli12
force-pushed
the
fix/anthropic-adaptive-max-tokens
branch
from
July 22, 2026 01:45
37581a8 to
239dbb6
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.
Summary
claude-fable-5,claude-sonnet-5,claude-opus-4-7,claude-opus-4-8) previously kept the genericmax_tokens = 8192default when Codex omittedmax_output_tokens.thinking.type = "adaptive"andoutput_config.effort, and never resizedmax_tokens.max_tokensto128000when Codex omits a budget, and preserve explicitmaxOutputTokens.Verification
bun test tests/anthropic-reasoning.test.ts128000and preserve explicit budgets.Checklist