mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
cd43b8a9ca
Bedrock Claude models require max_tokens to exceed thinking.budget_tokens. This constraint was handled for anthropic-messages API but missing for bedrock-converse-stream, causing compaction failures. Extracted adjustMaxTokensForThinking() helper that: - Adds thinking budget on top of desired output tokens - Reduces thinking budget if insufficient room (min 1024 output tokens) - Applied to both anthropic-messages and bedrock-converse-stream APIs
cd43b8a9ca
ยท
2026-01-17 10:55:30 +01:00
History