Skip to content

Commit c9d96b7

Browse files
committed
Fix EffortTokens() missing xhigh/max mappings for Bedrock thinking budget
When a user sets thinking_budget to "xhigh" or "max" on a Bedrock model, EffortTokens() returned (0, false) causing thinking to be silently disabled. Add mappings for both levels to 32768 tokens. Assisted-By: docker-agent
1 parent 137963a commit c9d96b7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pkg/config/latest/types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ type ModelConfig struct {
401401
// - For Anthropic: accepts integer token budget (1024-32000), "adaptive",
402402
// or string levels "low", "medium", "high", "max" (uses adaptive thinking with effort)
403403
// - For Bedrock Claude: accepts integer token budget or string levels
404-
// "minimal", "low", "medium", "high" (mapped to token budgets via EffortTokens)
404+
// "minimal", "low", "medium", "high", "xhigh", "max" (mapped to token budgets via EffortTokens)
405405
// - For other providers: may be ignored
406406
ThinkingBudget *ThinkingBudget `json:"thinking_budget,omitempty"`
407407
// Routing defines rules for routing requests to different models.
@@ -808,6 +808,10 @@ func (t *ThinkingBudget) EffortTokens() (int, bool) {
808808
return 8192, true
809809
case "high":
810810
return 16384, true
811+
case "xhigh":
812+
return 32768, true
813+
case "max":
814+
return 32768, true
811815
default:
812816
return 0, false
813817
}

0 commit comments

Comments
 (0)