Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { useWorkflowStore } from '@/stores/workflows/workflow/store'
/**
* Constants for ComboBox component behavior
*/
const DEFAULT_MODEL = 'claude-sonnet-4-6'
const DEFAULT_MODEL = 'claude-sonnet-5'
const ZOOM_FACTOR_BASE = 0.96
const MIN_ZOOM = 0.1
const MAX_ZOOM = 1
Expand Down Expand Up @@ -238,7 +238,7 @@ export const ComboBox = memo(function ComboBox({

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

// For model field, default to claude-sonnet-4-6 if available
// For model field, default to claude-sonnet-5 if available
if (subBlockId === 'model') {
const defaultModelOption = evaluatedOptions.find(
(opt) => getOptionValue(opt) === DEFAULT_MODEL
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/blocks/blocks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ describe.concurrent('Blocks Module', () => {
expect(modelSubBlock).toBeDefined()
expect(modelSubBlock?.type).toBe('combobox')
expect(modelSubBlock?.required).toBe(true)
expect(modelSubBlock?.defaultValue).toBe('claude-sonnet-4-6')
expect(modelSubBlock?.defaultValue).toBe('claude-sonnet-5')
})

it('should have LLM tool access', () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/blocks/blocks/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Return ONLY the JSON array.`,
type: 'combobox',
placeholder: 'Type or select a model...',
required: true,
defaultValue: 'claude-sonnet-4-6',
defaultValue: 'claude-sonnet-5',
options: getModelOptions,
commandSearchable: true,
},
Expand Down Expand Up @@ -503,7 +503,7 @@ Return ONLY the JSON array.`,
],
config: {
tool: (params: Record<string, any>) => {
const model = params.model || 'claude-sonnet-4-6'
const model = params.model || 'claude-sonnet-5'
if (!model) {
throw new Error('No model selected')
}
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/blocks/blocks/evaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export const EvaluatorBlock: BlockConfig<EvaluatorResponse> = {
type: 'combobox',
placeholder: 'Type or select a model...',
required: true,
defaultValue: 'claude-sonnet-4-6',
defaultValue: 'claude-sonnet-5',
options: getModelOptions,
},
...getProviderCredentialSubBlocks(),
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/blocks/blocks/pi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const PiBlock: BlockConfig<PiResponse> = {
type: 'combobox',
placeholder: 'Type or select a model...',
required: true,
defaultValue: 'claude-sonnet-4-6',
defaultValue: 'claude-sonnet-5',
options: getPiModelOptions,
commandSearchable: true,
},
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/blocks/blocks/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const RouterBlock: BlockConfig<RouterResponse> = {
type: 'combobox',
placeholder: 'Type or select a model...',
required: true,
defaultValue: 'claude-sonnet-4-6',
defaultValue: 'claude-sonnet-5',
options: getModelOptions,
},
...getProviderCredentialSubBlocks(),
Expand Down Expand Up @@ -298,7 +298,7 @@ export const RouterV2Block: BlockConfig<RouterV2Response> = {
type: 'combobox',
placeholder: 'Type or select a model...',
required: true,
defaultValue: 'claude-sonnet-4-6',
defaultValue: 'claude-sonnet-5',
options: getModelOptions,
},
...getProviderCredentialSubBlocks(),
Expand Down
6 changes: 3 additions & 3 deletions apps/sim/executor/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export const HTTP = {
} as const

export const AGENT = {
DEFAULT_MODEL: 'claude-sonnet-4-6',
DEFAULT_MODEL: 'claude-sonnet-5',
get DEFAULT_FUNCTION_TIMEOUT() {
return getMaxExecutionTimeout()
},
Expand Down Expand Up @@ -242,13 +242,13 @@ export const MEMORY = {
} as const

export const ROUTER = {
DEFAULT_MODEL: 'claude-sonnet-4-6',
DEFAULT_MODEL: 'claude-sonnet-5',
DEFAULT_TEMPERATURE: 0,
INFERENCE_TEMPERATURE: 0.1,
} as const

export const EVALUATOR = {
DEFAULT_MODEL: 'claude-sonnet-4-6',
DEFAULT_MODEL: 'claude-sonnet-5',
DEFAULT_TEMPERATURE: 0.1,
RESPONSE_SCHEMA_NAME: 'evaluation_response',
JSON_INDENT: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ describe('EvaluatorBlockHandler', () => {
json: () =>
Promise.resolve({
content: JSON.stringify({ score: 7 }),
model: 'claude-sonnet-4-6',
model: 'claude-sonnet-5',
tokens: {},
cost: 0,
timing: {},
Expand All @@ -494,6 +494,6 @@ describe('EvaluatorBlockHandler', () => {
const fetchCallArgs = mockFetch.mock.calls[0]
const requestBody = JSON.parse(fetchCallArgs[1].body)

expect(requestBody.model).toBe('claude-sonnet-4-6')
expect(requestBody.model).toBe('claude-sonnet-5')
})
})
2 changes: 1 addition & 1 deletion apps/sim/executor/handlers/pi/pi-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import type {
import type { SerializedBlock } from '@/serializer/types'

const logger = createLogger('PiBlockHandler')
const DEFAULT_MODEL = 'claude-sonnet-4-6'
const DEFAULT_MODEL = 'claude-sonnet-5'

function asOptString(value: unknown): string | undefined {
if (typeof value !== 'string') return undefined
Expand Down
4 changes: 2 additions & 2 deletions apps/sim/executor/handlers/router/router-handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ describe('RouterBlockHandler', () => {

await handler.execute(mockContext, mockBlock, inputs)

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

const fetchCallArgs = mockFetch.mock.calls[0]
const requestBody = JSON.parse(fetchCallArgs[1].body)
expect(requestBody).toMatchObject({
model: 'claude-sonnet-4-6',
model: 'claude-sonnet-5',
temperature: 0.1,
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ describe('validateInputsForBlock', () => {
expect(result.errors).toHaveLength(1)
expect(result.errors[0]?.field).toBe('model')
expect(result.errors[0]?.error).toContain('Unknown model id')
expect(result.errors[0]?.error).toContain('claude-sonnet-4-6')
expect(result.errors[0]?.error).toContain('claude-sonnet-5')
})

it('rejects legacy claude-4.5-haiku style ids', () => {
Expand Down
4 changes: 3 additions & 1 deletion apps/sim/providers/anthropic/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ const THINKING_BUDGET_TOKENS: Record<string, number> = {

/**
* Checks if a model supports adaptive thinking (thinking.type: "adaptive").
* Sonnet 5 supports ONLY adaptive thinking (manual budget_tokens returns a 400 error).
* Opus 4.8 and Opus 4.7 support ONLY adaptive thinking (no extended thinking / budget_tokens).
* Opus 4.6 and Sonnet 4.6 support both extended and adaptive thinking — use adaptive.
* Opus 4.5 supports effort but NOT adaptive thinking — it uses budget_tokens with type: "enabled".
*/
function supportsAdaptiveThinking(modelId: string): boolean {
const normalizedModel = modelId.toLowerCase()
return (
normalizedModel.includes('sonnet-5') ||
normalizedModel.includes('opus-4-8') ||
normalizedModel.includes('opus-4.8') ||
normalizedModel.includes('opus-4-7') ||
Expand All @@ -105,7 +107,7 @@ function supportsAdaptiveThinking(modelId: string): boolean {
/**
* Builds the thinking configuration for the Anthropic API based on model capabilities and level.
*
* - Opus 4.8, Opus 4.7: Uses adaptive thinking only (no extended thinking support)
* - Sonnet 5, Opus 4.8, Opus 4.7: Uses adaptive thinking only (no extended thinking support)
* - Opus 4.6, Sonnet 4.6: Uses adaptive thinking with effort parameter
* - Other models: Uses budget_tokens-based extended thinking
*
Expand Down
24 changes: 22 additions & 2 deletions apps/sim/providers/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,35 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
fileAttachment: { maxBytes: 50 * 1024 * 1024, strategy: 'remote-url' },
name: 'Anthropic',
description: "Anthropic's Claude models",
defaultModel: 'claude-sonnet-4-6',
defaultModel: 'claude-sonnet-5',
modelPatterns: [/^claude/],
icon: AnthropicIcon,
color: '#D97757',
capabilities: {
toolUsageControl: true,
},
models: [
{
id: 'claude-sonnet-5',
pricing: {
input: 2.0,
cachedInput: 0.2,
output: 10.0,
updatedAt: '2026-06-30',
},
capabilities: {
temperature: { min: 0, max: 1 },
nativeStructuredOutputs: true,
maxOutputTokens: 128000,
thinking: {
levels: ['low', 'medium', 'high', 'xhigh', 'max'],
default: 'high',
},
},
Comment thread
waleedlatif1 marked this conversation as resolved.
contextWindow: 1000000,
releaseDate: '2026-06-30',
recommended: true,
},
{
id: 'claude-opus-4-8',
pricing: {
Expand Down Expand Up @@ -747,7 +768,6 @@ export const PROVIDER_DEFINITIONS: Record<string, ProviderDefinition> = {
},
contextWindow: 1000000,
releaseDate: '2026-02-17',
recommended: true,
},
{
id: 'claude-opus-4-5',
Expand Down
Loading