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 numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ import type { SubBlockConfig } from '@/blocks/types'
/**
* Constants for ComboBox component behavior
*/
const DEFAULT_MODEL = 'gpt-4o'
const DEFAULT_MODEL = 'claude-sonnet-4-5'
const ZOOM_FACTOR_BASE = 0.96
const MIN_ZOOM = 0.1
const MAX_ZOOM = 1
Expand DownExpand Up@@ -99,18 +99,18 @@ export function ComboBox({

/**
* Determines the default option value to use.
* Priority: explicit defaultValue > gpt-4o for model field > first option
* Priority: explicit defaultValue > claude-sonnet-4-5 for model field > first option
*/
const defaultOptionValue = useMemo(() => {
if (defaultValue !== undefined) {
return defaultValue
}

// For model field, default to gpt-4o if available
// For model field, default to claude-sonnet-4-5 if available
if (subBlockId === 'model') {
const gpt4o = evaluatedOptions.find((opt) => getOptionValue(opt) === DEFAULT_MODEL)
if (gpt4o) {
return getOptionValue(gpt4o)
const claudeSonnet45 = evaluatedOptions.find((opt) => getOptionValue(opt) === DEFAULT_MODEL)
if (claudeSonnet45) {
return getOptionValue(claudeSonnet45)
}
}

Expand Down
7 changes: 4 additions & 3 deletions apps/sim/blocks/blocks/agent.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
type: 'combobox',
placeholder: 'Type or select a model...',
required: true,
defaultValue: 'claude-sonnet-4-5',
options: () => {
const providersState = useProvidersStore.getState()
const baseModels = providersState.providers.base.models
Expand DownExpand Up@@ -245,7 +246,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
type: 'slider',
min: 0,
max: 1,
defaultValue: 0.5,
defaultValue: 0.3,
condition: () => ({
field: 'model',
value: (() => {
Expand All@@ -262,7 +263,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
type: 'slider',
min: 0,
max: 2,
defaultValue: 1,
defaultValue: 0.3,
condition: () => ({
field: 'model',
value: (() => {
Expand DownExpand Up@@ -383,7 +384,7 @@ Example 3 (Array Input):
],
config: {
tool: (params: Record<string, any>) => {
const model = params.model || 'gpt-4o'
const model = params.model || 'claude-sonnet-4-5'
if (!model) {
throw new Error('No model selected')
}
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/executor/consts.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ export const HTTP = {
} as const

export const AGENT = {
DEFAULT_MODEL: 'gpt-4o',
DEFAULT_MODEL: 'claude-sonnet-4-5',
DEFAULT_FUNCTION_TIMEOUT: 5000,
REQUEST_TIMEOUT: 120000,
CUSTOM_TOOL_PREFIX: 'custom_',
Expand Down