Skip to content

Commit 8bf1989

Browse files
authored
feat(providers): add Claude Sonnet 5 model (#5291)
* feat(providers): add Claude Sonnet 5 model - Add claude-sonnet-5 (1M context, 128k output, adaptive thinking with low/medium/high/xhigh/max effort) as the new flagship Anthropic Sonnet - Use introductory pricing ($2/$10 per MTok, $0.20 cached) in effect through Aug 31 2026 - Promote to recommended and set as Anthropic defaultModel; demote claude-sonnet-4-6 - Route claude-sonnet-5 through adaptive thinking in anthropic/core.ts (manual budget_tokens returns a 400) * fix(providers): expose temperature capability on claude-sonnet-5 Sonnet 5 accepts the temperature parameter (0-1, per Anthropic API docs), and it replaces claude-sonnet-4-6 as the default/recommended Anthropic model. Omitting the capability silently dropped temperature control for workflows on the default model. The request builder already strips temperature whenever thinking is active, so this only takes effect when thinking is disabled — where temperature is valid. * feat(blocks): default agent-family blocks to claude-sonnet-5 Propagate the Sonnet 5 flagship promotion to the block/executor/UI defaults so the default model is consistent everywhere: - agent/router/evaluator/pi block defaultValue + agent runtime fallback - executor AGENT/ROUTER/EVALUATOR DEFAULT_MODEL constants + pi-handler DEFAULT_MODEL - combobox model-field default fallback - update coupled tests (blocks, router/evaluator handlers, copilot model-suggestion validation) to the new default/recommended set Stagehand's anthropic model pin is left on claude-sonnet-4-6 (separate tool-internal choice, not a block default).
1 parent d0aed14 commit 8bf1989

13 files changed

Lines changed: 44 additions & 22 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { useWorkflowStore } from '@/stores/workflows/workflow/store'
2323
/**
2424
* Constants for ComboBox component behavior
2525
*/
26-
const DEFAULT_MODEL = 'claude-sonnet-4-6'
26+
const DEFAULT_MODEL = 'claude-sonnet-5'
2727
const ZOOM_FACTOR_BASE = 0.96
2828
const MIN_ZOOM = 0.1
2929
const MAX_ZOOM = 1
@@ -238,7 +238,7 @@ export const ComboBox = memo(function ComboBox({
238238

239239
/**
240240
* Determines the default option value to use.
241-
* Priority: explicit defaultValue > claude-sonnet-4-6 for model field > first option
241+
* Priority: explicit defaultValue > claude-sonnet-5 for model field > first option
242242
*/
243243
const defaultOptionValue = useMemo(() => {
244244
if (defaultValue !== undefined) {
@@ -250,7 +250,7 @@ export const ComboBox = memo(function ComboBox({
250250
// Default not available (e.g. provider disabled) — fall through to other fallbacks
251251
}
252252

253-
// For model field, default to claude-sonnet-4-6 if available
253+
// For model field, default to claude-sonnet-5 if available
254254
if (subBlockId === 'model') {
255255
const defaultModelOption = evaluatedOptions.find(
256256
(opt) => getOptionValue(opt) === DEFAULT_MODEL

apps/sim/blocks/blocks.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ describe.concurrent('Blocks Module', () => {
510510
expect(modelSubBlock).toBeDefined()
511511
expect(modelSubBlock?.type).toBe('combobox')
512512
expect(modelSubBlock?.required).toBe(true)
513-
expect(modelSubBlock?.defaultValue).toBe('claude-sonnet-4-6')
513+
expect(modelSubBlock?.defaultValue).toBe('claude-sonnet-5')
514514
})
515515

516516
it('should have LLM tool access', () => {

apps/sim/blocks/blocks/agent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Return ONLY the JSON array.`,
130130
type: 'combobox',
131131
placeholder: 'Type or select a model...',
132132
required: true,
133-
defaultValue: 'claude-sonnet-4-6',
133+
defaultValue: 'claude-sonnet-5',
134134
options: getModelOptions,
135135
commandSearchable: true,
136136
},
@@ -503,7 +503,7 @@ Return ONLY the JSON array.`,
503503
],
504504
config: {
505505
tool: (params: Record<string, any>) => {
506-
const model = params.model || 'claude-sonnet-4-6'
506+
const model = params.model || 'claude-sonnet-5'
507507
if (!model) {
508508
throw new Error('No model selected')
509509
}

apps/sim/blocks/blocks/evaluator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const EvaluatorBlock: BlockConfig<EvaluatorResponse> = {
177177
type: 'combobox',
178178
placeholder: 'Type or select a model...',
179179
required: true,
180-
defaultValue: 'claude-sonnet-4-6',
180+
defaultValue: 'claude-sonnet-5',
181181
options: getModelOptions,
182182
},
183183
...getProviderCredentialSubBlocks(),

apps/sim/blocks/blocks/pi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const PiBlock: BlockConfig<PiResponse> = {
9393
type: 'combobox',
9494
placeholder: 'Type or select a model...',
9595
required: true,
96-
defaultValue: 'claude-sonnet-4-6',
96+
defaultValue: 'claude-sonnet-5',
9797
options: getPiModelOptions,
9898
commandSearchable: true,
9999
},

apps/sim/blocks/blocks/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const RouterBlock: BlockConfig<RouterResponse> = {
171171
type: 'combobox',
172172
placeholder: 'Type or select a model...',
173173
required: true,
174-
defaultValue: 'claude-sonnet-4-6',
174+
defaultValue: 'claude-sonnet-5',
175175
options: getModelOptions,
176176
},
177177
...getProviderCredentialSubBlocks(),
@@ -298,7 +298,7 @@ export const RouterV2Block: BlockConfig<RouterV2Response> = {
298298
type: 'combobox',
299299
placeholder: 'Type or select a model...',
300300
required: true,
301-
defaultValue: 'claude-sonnet-4-6',
301+
defaultValue: 'claude-sonnet-5',
302302
options: getModelOptions,
303303
},
304304
...getProviderCredentialSubBlocks(),

apps/sim/executor/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export const HTTP = {
207207
} as const
208208

209209
export const AGENT = {
210-
DEFAULT_MODEL: 'claude-sonnet-4-6',
210+
DEFAULT_MODEL: 'claude-sonnet-5',
211211
get DEFAULT_FUNCTION_TIMEOUT() {
212212
return getMaxExecutionTimeout()
213213
},
@@ -242,13 +242,13 @@ export const MEMORY = {
242242
} as const
243243

244244
export const ROUTER = {
245-
DEFAULT_MODEL: 'claude-sonnet-4-6',
245+
DEFAULT_MODEL: 'claude-sonnet-5',
246246
DEFAULT_TEMPERATURE: 0,
247247
INFERENCE_TEMPERATURE: 0.1,
248248
} as const
249249

250250
export const EVALUATOR = {
251-
DEFAULT_MODEL: 'claude-sonnet-4-6',
251+
DEFAULT_MODEL: 'claude-sonnet-5',
252252
DEFAULT_TEMPERATURE: 0.1,
253253
RESPONSE_SCHEMA_NAME: 'evaluation_response',
254254
JSON_INDENT: 2,

apps/sim/executor/handlers/evaluator/evaluator-handler.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ describe('EvaluatorBlockHandler', () => {
481481
json: () =>
482482
Promise.resolve({
483483
content: JSON.stringify({ score: 7 }),
484-
model: 'claude-sonnet-4-6',
484+
model: 'claude-sonnet-5',
485485
tokens: {},
486486
cost: 0,
487487
timing: {},
@@ -494,6 +494,6 @@ describe('EvaluatorBlockHandler', () => {
494494
const fetchCallArgs = mockFetch.mock.calls[0]
495495
const requestBody = JSON.parse(fetchCallArgs[1].body)
496496

497-
expect(requestBody.model).toBe('claude-sonnet-4-6')
497+
expect(requestBody.model).toBe('claude-sonnet-5')
498498
})
499499
})

apps/sim/executor/handlers/pi/pi-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import type {
3737
import type { SerializedBlock } from '@/serializer/types'
3838

3939
const logger = createLogger('PiBlockHandler')
40-
const DEFAULT_MODEL = 'claude-sonnet-4-6'
40+
const DEFAULT_MODEL = 'claude-sonnet-5'
4141

4242
function asOptString(value: unknown): string | undefined {
4343
if (typeof value !== 'string') return undefined

apps/sim/executor/handlers/router/router-handler.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,12 @@ describe('RouterBlockHandler', () => {
238238

239239
await handler.execute(mockContext, mockBlock, inputs)
240240

241-
expect(mockGetProviderFromModel).toHaveBeenCalledWith('claude-sonnet-4-6')
241+
expect(mockGetProviderFromModel).toHaveBeenCalledWith('claude-sonnet-5')
242242

243243
const fetchCallArgs = mockFetch.mock.calls[0]
244244
const requestBody = JSON.parse(fetchCallArgs[1].body)
245245
expect(requestBody).toMatchObject({
246-
model: 'claude-sonnet-4-6',
246+
model: 'claude-sonnet-5',
247247
temperature: 0.1,
248248
})
249249
})

0 commit comments

Comments
 (0)