From c763000eadf60fa23f7f22c19a5e7680e40dfeea Mon Sep 17 00:00:00 2001 From: waleed Date: Wed, 1 Jul 2026 11:31:50 -0700 Subject: [PATCH] fix(providers): drop deprecated temperature capability from claude-sonnet-5 Claude Sonnet 5 rejects the temperature parameter with a 400 ("`temperature` is deprecated for this model"), verified against the live Anthropic API. The model entry exposed temperature: { min: 0, max: 1 }, so supportsTemperature() returned true and the Anthropic request builder sent temperature whenever thinking was disabled, breaking those runs. Remove the capability (matching Opus 4.7/4.8, which omit it for the same reason) so temperature is never sent for Sonnet 5. Add a supportsTemperature regression assertion. --- apps/sim/providers/models.ts | 1 - apps/sim/providers/utils.test.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sim/providers/models.ts b/apps/sim/providers/models.ts index 0c3e01ac01e..2cb735f928a 100644 --- a/apps/sim/providers/models.ts +++ b/apps/sim/providers/models.ts @@ -678,7 +678,6 @@ export const PROVIDER_DEFINITIONS: Record = { updatedAt: '2026-06-30', }, capabilities: { - temperature: { min: 0, max: 1 }, nativeStructuredOutputs: true, maxOutputTokens: 128000, thinking: { diff --git a/apps/sim/providers/utils.test.ts b/apps/sim/providers/utils.test.ts index e6eaf2122d1..41f76b6c3f6 100644 --- a/apps/sim/providers/utils.test.ts +++ b/apps/sim/providers/utils.test.ts @@ -214,6 +214,7 @@ describe('Model Capabilities', () => { it.concurrent('should return false for models that do not support temperature', () => { const unsupportedModels = [ 'unsupported-model', + 'claude-sonnet-5', 'cerebras/llama-3.3-70b', 'o1', 'o3',