resolveSubagentModel
resolveSubagentModel(
ctx,gadgetName,runtimeModel,defaultModel):string
Defined in: utils/config-resolver.ts:164
Convenience function for resolving subagent model with “inherit” support.
This is the most common resolution pattern for subagent gadgets:
- Use runtime model if provided
- Check subagent config for model override
- Inherit parent model if configured
- Fall back to default
Parameters
Section titled “Parameters”ExecutionContext from gadget execution
gadgetName
Section titled “gadgetName”string
Name of the subagent gadget
runtimeModel
Section titled “runtimeModel”Model from gadget parameters
string | undefined
defaultModel
Section titled “defaultModel”string
Default model if nothing else specified
Returns
Section titled “Returns”string
Resolved model string
Example
Section titled “Example”const model = resolveSubagentModel(ctx, "BrowseWeb", params.model, "sonnet");