Repository navigation
Ask Anthropic for each model's full output limit and give busy callers exact flags - #15
Conversation
…s exact flags A fixed 32,768 max_tokens cut off a Sonnet 5 benchmark answer. Each call now sets max_tokens to the model's documented limit (128,000 for Claude 4.6 and later, down to 4,096 for Claude 3 models), legacy thinking budgets stay below it, and the response byte bound rises to 768 KiB so a full answer fits under the event cap. Anthropic counts only generated tokens against output rate limits, so the higher cap costs nothing until used. The bot_busy detail now names copyable flags: --delivery steer --turn N, --delivery queue, and fork --source NAME --bot NEW. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e79cad199
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Decoded text can grow up to sixfold as JSON, so a delta of quotes or control characters under the raw bound could still exceed the 1 MiB event cap. Text and thinking deltas now count their JSON-encoded length in both parsers. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fafccbe15
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Claude 3 Sonnet matched no prefix and fell through to 128,000. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01fd9d3971
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Fork without a checkpoint is refused during a running turn, so the hint now names the head the turn started from, and offers no fork on a first turn. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_013RhkQCvP5uTYjUeMBnFzDp
|
@codex review Generated by Claude Code |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
PR #15 asks each Claude model for its full output limit. The lookup now reads the Claude model inside a Bedrock id, so anthropic.claude-haiku-4-5 gets 64,000 rather than the 128,000 default, and --max-output-tokens still overrides it. BEDROCK.md notes that runtime deducts input plus max_tokens from quota when a call starts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Amz3VEQoRNkwYHBTEJBNbf
Before: every Anthropic call capped
max_tokensat 32,768. A Sonnet 5 benchmark task hit that cap mid-answer and failed withprovider_incomplete "max_tokens". A bot that tried to talk to a busy bot got a prose hint ("retry with delivery steer…") that it ignored.After: each Anthropic call asks for the model's full output limit. That is 128,000 for Claude 4.6 and later, 64,000 for Haiku 4.5, Sonnet 4.5, Opus 4.5, Sonnet 4 and Sonnet 3.7, 32,000 for Opus 4 and 4.1, and 8,192 or 4,096 for the Claude 3.5 and 3 models. The
bot_busydetail now gives flags to copy:--delivery steer --turn N,--delivery queue, andfork --source NAME --bot NEW. When no turn is running, it offers only queue and fork.Performance cost
MAX_OUTPUT) goes from 512 KiB to 768 KiB. This fits a full 128,000-token answer and stays under the 1 MiB event cap, so every stored item stays readable. Nothing is preallocated: live memory grows only for turns that actually produce output that large.How
anthropic_max_tokens(model)is a prefix table insrc/provider.rs, in the same style aslegacy_thinking. The Bedrock branch can wrap it with itsclaude_model()id normalization.output_byte_estimatenow takes the model.max_tokens - 1024.src/store/db.rs.docs/RUST_PROTOTYPE.mdsays so.Checks
cargo fmt --checkandcargo clippy --all-targetsare clean.cargo test --all-targets: all pass.AGENT_TEST_RUNTIME=1 python3 -m unittest discover -s tests: 252 tests OK, 18 skipped.🤖 Generated with Claude Code