Skip to content

Commit e863998

Browse files
committed
agent auto model
1 parent 8711860 commit e863998

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

apps/sim/blocks/blocks/agent.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -523,12 +523,13 @@ Return ONLY the JSON array.`,
523523
if (!model) {
524524
throw new Error('No model selected')
525525
}
526-
// sim-auto resolves to a concrete model at execution time; this
527-
// serialization-time lookup only needs a stable provider tool id.
528-
if (isAutoModel(model)) {
529-
return 'anthropic_chat'
530-
}
531-
const tool = getBaseModelProviders()[model]
526+
// sim-auto resolves to a concrete pool model at execution time, where
527+
// the agent handler derives the provider from the resolved model and
528+
// never reads this serialized value. Serialization still needs the
529+
// same provider-id shape every other model stores, so look up the
530+
// runtime fallback model's provider.
531+
const lookupModel = isAutoModel(model) ? 'claude-sonnet-5' : model
532+
const tool = getBaseModelProviders()[lookupModel]
532533
if (!tool) {
533534
throw new Error(`Invalid model selected: ${model}`)
534535
}

0 commit comments

Comments
 (0)