Repository navigation
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs real behavior proof before merge. Reviewed June 27, 2026, 10:54 AM ET / 14:54 UTC. Summary PR surface: Source +61, Tests +171. Total +232 across 2 files. Reproducibility: yes. source-reproducible: current main sends Bedrock inferenceConfig.maxTokens only from resolved options, and the affected resolver branches do not all derive that value from model.maxTokens. I did not run a live AWS Bedrock request in this read-only review. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land one Bedrock provider-runtime fix that covers Fable, explicit adaptive, and mandatory adaptive default paths, with redacted live Bedrock proof or explicit maintainer acceptance of source-level proof and quota/cost behavior. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main sends Bedrock inferenceConfig.maxTokens only from resolved options, and the affected resolver branches do not all derive that value from model.maxTokens. I did not run a live AWS Bedrock request in this read-only review. Is this the best way to solve the issue? No, not yet: the resolver is the right layer, but this PR should also cover the mandatory adaptive-thinking default branch and still needs real Bedrock proof or explicit maintainer acceptance before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4010b81a77f4. Label changesLabel justifications:
Evidence reviewedPR surface: Source +61, Tests +171. Total +232 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Added comprehensive test coverage: 9 tests covering adaptive, Fable 5, all effort levels, API integration. @clawsweeper re-review |
openclaw#97176) - Add low reasoning effort test for adaptive-thinking models - Add Fable 5 boundary test when model.maxTokens is undefined - Reorder resolveModelBackedMaxTokens before resolveSimpleBedrockOptions for clarity (caller-after-callee)
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
What Problem This Solves
Fixes #97176.
Amazon Bedrock Claude models using adaptive thinking (Opus 4.8, Fable 5) are hard-capped at 4096 output tokens. At higher thinking levels the thinking block alone consumes the budget, causing
stop_reason: "length"before any answer or tool call is delivered.Root Cause
resolveSimpleBedrockOptionshas three Claude branches. The non-adaptive Claude branch already callsadjustMaxTokensForThinking()which factors inmodel.maxTokens. But the Fable 5 branch and adaptive-thinking branch both returnedbasewith reasoning/thinkingBudgets set but never derivedmaxTokensfrommodel.maxTokens— leaving it at the 4096 default.Changes Made
extensions/amazon-bedrock/stream.runtime.ts: AddedresolveModelBackedMaxTokens()helper (baseMaxTokens ?? model.maxTokens). Applied in Fable 5 and adaptive-thinking branches.extensions/amazon-bedrock/stream.runtime.test.ts: Added 9 regression tests covering all branches, effort levels, edge cases, and integration-level API request verification.Evidence
node scripts/run-vitest.mjs run extensions/amazon-bedrock/stream.runtime.test.ts— 29/29 passedTest coverage
Real behavior proof
Integration test captures the actual Bedrock Converse API request sent after the fix: