Skip to content

Commit 0ae7eb1

Browse files
authored
improvement(agent): switch default model to claude 4.5 sonnet (#2156)
* Switch default model to claude 4.5 sonnet * Fix defaults * Switch back to medium
1 parent 304b5d9 commit 0ae7eb1

File tree

3 files changed

+11
-10
lines changed
  • apps/sim
    • app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox
    • blocks/blocks
    • executor

3 files changed

+11
-10
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { SubBlockConfig } from '@/blocks/types'
1111
/**
1212
* Constants for ComboBox component behavior
1313
*/
14-
const DEFAULT_MODEL = 'gpt-4o'
14+
const DEFAULT_MODEL = 'claude-sonnet-4-5'
1515
const ZOOM_FACTOR_BASE = 0.96
1616
const MIN_ZOOM = 0.1
1717
const MAX_ZOOM = 1
@@ -99,18 +99,18 @@ export function ComboBox({
9999

100100
/**
101101
* Determines the default option value to use.
102-
* Priority: explicit defaultValue > gpt-4o for model field > first option
102+
* Priority: explicit defaultValue > claude-sonnet-4-5 for model field > first option
103103
*/
104104
const defaultOptionValue = useMemo(() => {
105105
if (defaultValue !== undefined) {
106106
return defaultValue
107107
}
108108

109-
// For model field, default to gpt-4o if available
109+
// For model field, default to claude-sonnet-4-5 if available
110110
if (subBlockId === 'model') {
111-
const gpt4o = evaluatedOptions.find((opt) => getOptionValue(opt) === DEFAULT_MODEL)
112-
if (gpt4o) {
113-
return getOptionValue(gpt4o)
111+
const claudeSonnet45 = evaluatedOptions.find((opt) => getOptionValue(opt) === DEFAULT_MODEL)
112+
if (claudeSonnet45) {
113+
return getOptionValue(claudeSonnet45)
114114
}
115115
}
116116

apps/sim/blocks/blocks/agent.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
9090
type: 'combobox',
9191
placeholder: 'Type or select a model...',
9292
required: true,
93+
defaultValue: 'claude-sonnet-4-5',
9394
options: () => {
9495
const providersState = useProvidersStore.getState()
9596
const baseModels = providersState.providers.base.models
@@ -245,7 +246,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
245246
type: 'slider',
246247
min: 0,
247248
max: 1,
248-
defaultValue: 0.5,
249+
defaultValue: 0.3,
249250
condition: () => ({
250251
field: 'model',
251252
value: (() => {
@@ -262,7 +263,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
262263
type: 'slider',
263264
min: 0,
264265
max: 2,
265-
defaultValue: 1,
266+
defaultValue: 0.3,
266267
condition: () => ({
267268
field: 'model',
268269
value: (() => {
@@ -383,7 +384,7 @@ Example 3 (Array Input):
383384
],
384385
config: {
385386
tool: (params: Record<string, any>) => {
386-
const model = params.model || 'gpt-4o'
387+
const model = params.model || 'claude-sonnet-4-5'
387388
if (!model) {
388389
throw new Error('No model selected')
389390
}

apps/sim/executor/consts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const HTTP = {
157157
} as const
158158

159159
export const AGENT = {
160-
DEFAULT_MODEL: 'gpt-4o',
160+
DEFAULT_MODEL: 'claude-sonnet-4-5',
161161
DEFAULT_FUNCTION_TIMEOUT: 5000,
162162
REQUEST_TIMEOUT: 120000,
163163
CUSTOM_TOOL_PREFIX: 'custom_',

0 commit comments

Comments
 (0)