26 lines
1.5 KiB
Markdown
26 lines
1.5 KiB
Markdown
# Model selection
|
|
|
|
The `models` service starts a conversation with `start({agent, cwd, ownership?}, context)`.
|
|
The `agent` field names a built-in definition or a project overlay.
|
|
The service stores that name in `models.profile`.
|
|
`discover(cwd)` exposes the same live definition resolver to subagents.
|
|
`configure(tx, id, {agent, inheritedTools, excludeTools?, model?, thinking?})` configures an existing child in its creation transaction.
|
|
It retains the parent's tool scope, explicit overrides, and exclusions for subsequent run boundaries.
|
|
It applies the definition during creation and before each new run.
|
|
Definitions without an explicit model follow their family, then the default family.
|
|
|
|
Each resolution reads `/src/sausage/agents/models.json` and the definition files through `host.fs`.
|
|
A file edit applies at the next run boundary without a restart.
|
|
The project definitions live under `<repo>/.sausage/agents/`.
|
|
The existing T37 parser controls validation, overlays, model suffixes, and tool denials.
|
|
|
|
The optional `models.pin` service supplies `pin(tx, conversationId)` for an external model override.
|
|
Without that provider, the definition or default family selects the model.
|
|
No login fallback runs.
|
|
|
|
Existing registered models retain their transport.
|
|
New logical model references reuse the host's OpenAI-compatible proxy provider and its auth resolver.
|
|
The extension never reads a credential or registers a direct provider SDK.
|
|
|
|
`host/tests/core_ext.rs` tests these services through the snapshot loader.
|