@@ -358,13 +358,32 @@ func getProviderOptions(model Model, providerCfg config.ProviderConfig) fantasy.
359 _, hasEffort = mergedOptions["effort"]
359 _, hasEffort = mergedOptions["effort"]
360 _, hasThink = mergedOptions["thinking"]
360 _, hasThink = mergedOptions["thinking"]
361+ extraBody = make(map[string]any)
362− switch {
364+ switch providerCfg.ID {
365+ case string(catwalk.InferenceProviderAlibabaSingapore):
363− case !hasEffort && shouldSetEffort:
367+ case !hasEffort && shouldSetEffort:
368+ extraBody["reasoning_effort"] = model.ModelCfg.ReasoningEffort
369+ case !hasThink && model.CatwalkCfg.CanReason:
370+ if model.ModelCfg.Think {
371+ extraBody["thinking"] = map[string]any{"type": "enabled"}
373+ extraBody["thinking"] = map[string]any{"type": "disabled"}
376+ mergedOptions["extra_body"] = extraBody
380+ case !hasEffort && shouldSetEffort:
364− mergedOptions["effort"] = model.ModelCfg.ReasoningEffort
381+ mergedOptions["effort"] = model.ModelCfg.ReasoningEffort
365− case !hasThink && model.ModelCfg.Think:
382+ case !hasThink && model.ModelCfg.Think:
366− mergedOptions["thinking"] = map[string]any{"budget_tokens": 2000}
383+ mergedOptions["thinking"] = map[string]any{"budget_tokens": 2000}
368 parsed, err := anthropic.ParseOptions(mergedOptions)
387 parsed, err := anthropic.ParseOptions(mergedOptions)
369 if err == nil {
388 if err == nil {
370 options[anthropic.Name] = parsed
389 options[anthropic.Name] = parsed