on main help sign in
fix(baseten): make the thinking on/off toggle work for baseten
commit3ac7f1c48bbe3031772fb2f47c2f356283790591 authorAndrey Nering <andreynering@users.noreply.github.com> dateFri 3 Jul 2026, 14:50 (3 months ago) parentd5d73e7
1 file changed+15−6
internal/agent/coordinator.go+15−6
internal/agent/coordinator.go+15−6
@@ -407,6 +407,7 @@ func getProviderOptions(model Model, providerCfg config.ProviderConfig) fantasy.
407407 options[openai.Name] = parsed
408408 }
409409 }
410+
410411 case anthropic.Name, bedrock.Name:
411412 var (
412413 _, hasEffort = mergedOptions["effort"]
@@ -454,6 +455,7 @@ func getProviderOptions(model Model, providerCfg config.ProviderConfig) fantasy.
454455 if err == nil {
455456 options[openrouter.Name] = parsed
456457 }
458+
457459 case vercel.Name:
458460 _, hasReasoning := mergedOptions["reasoning"]
459461 if !hasReasoning && shouldSetEffort {
@@ -466,6 +468,7 @@ func getProviderOptions(model Model, providerCfg config.ProviderConfig) fantasy.
466468 if err == nil {
467469 options[vercel.Name] = parsed
468470 }
471+
469472 case google.Name:
470473 _, hasReasoning := mergedOptions["thinking_config"]
471474 if !hasReasoning {
@@ -485,6 +488,7 @@ func getProviderOptions(model Model, providerCfg config.ProviderConfig) fantasy.
485488 if err == nil {
486489 options[google.Name] = parsed
487490 }
491+
488492 case openaicompat.Name, hyper.Name:
489493 extraBody := make(map[string]any)
490494
@@ -513,16 +517,14 @@ func getProviderOptions(model Model, providerCfg config.ProviderConfig) fantasy.
513517 extraBody["reasoning"] = map[string]string{"effort": "none"}
514518 }
515519 }
520+
516521 case string(catwalk.InferenceProviderZAI), string(catwalk.InferenceProviderDeepSeek):
517522 if model.ModelCfg.Think || reasoningEffort != "" {
518− extraBody["thinking"] = map[string]any{
519− "type": "enabled",
520− }
523+ extraBody["thinking"] = map[string]any{"type": "enabled"}
521524 } else {
522− extraBody["thinking"] = map[string]any{
523− "type": "disabled",
524− }
525+ extraBody["thinking"] = map[string]any{"type": "disabled"}
525526 }
527+
526528 case string(catwalk.InferenceProviderFireworks):
527529 // NOTE: Fireworks break if we set both `reasoning_effort` and `thinking`.
528530 if reasoningEffort == "" {
@@ -532,6 +534,12 @@ func getProviderOptions(model Model, providerCfg config.ProviderConfig) fantasy.
532534 extraBody["thinking"] = map[string]any{"type": "disabled"}
533535 }
534536 }
537+
538+ case string(catwalk.InferenceProviderBaseten):
539+ extraBody["chat_template_args"] = map[string]any{
540+ "enable_thinking": model.ModelCfg.Think || reasoningEffort != "",
541+ }
542+
535543 case string(catwalk.InferenceProviderAlibabaSingapore):
536544 if model.CatwalkCfg.CanReason {
537545 extraBody["enable_thinking"] = model.ModelCfg.Think
@@ -544,6 +552,7 @@ func getProviderOptions(model Model, providerCfg config.ProviderConfig) fantasy.
544552 if err == nil {
545553 options[openaicompat.Name] = parsed
546554 }
555+
547556 default:
548557 // Known custom providers (litellm, ollama, omlx) are
549558 // openai-compat under the hood.