mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
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
This commit is contained in:
committed by
GitHub
parent
304b5d9c7e
commit
0ae7eb197a
@@ -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
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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: (() => {
|
||||
@@ -262,7 +263,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
|
||||
type: 'slider',
|
||||
min: 0,
|
||||
max: 2,
|
||||
defaultValue: 1,
|
||||
defaultValue: 0.3,
|
||||
condition: () => ({
|
||||
field: 'model',
|
||||
value: (() => {
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
@@ -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_',
|
||||
|
||||
Reference in New Issue
Block a user