File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments