Expand description
Model resolution, scoping, and CLI/model-pattern matching.
Ports .references/pi/packages/coding-agent/src/core/model-resolver.ts.
Initial-model priority and session restore live in
crate::core::agent_session_services and are re-exported here so entry
and callers share one implementation.
Re-exports§
pub use super::agent_session_services::restore_model_from_session;
Structs§
- Find
Initial Model Full Options - Options for the TypeScript-shaped
find_initial_model_fullhelper. - Model
Scope Diagnostic - Structured diagnostic from model-scope resolution.
- Parse
Model Pattern Options - Options for
parse_model_pattern. - Parsed
Model Result - Result of parsing a model pattern (optional thinking suffix).
- Resolve
CliModel Options - Options for
resolve_cli_model. - Resolve
CliModel Result - Result of
resolve_cli_model. - Resolve
Model Scope Result - Result of
resolve_model_scope_with_diagnostics.
Enums§
- Model
Scope Diagnostic Kind - Diagnostic severity for scope resolution (currently only warning).
Functions§
- default_
model_ id_ for_ provider - Look up the default model id for a known provider, if listed.
- default_
model_ per_ provider_ map - Re-export table of default model ids for known providers.
- find_
exact_ model_ reference_ match - Find an exact model reference match.
- find_
initial_ model_ full - TypeScript
findInitialModelshape: optional CLI provider/model strings, then the shared services priority path. - is_
valid_ thinking_ level - Parse a thinking-level token (
off/minimal/low/medium/high/xhigh/max). - parse_
model_ pattern - Parse a pattern to extract model and optional thinking level.
- resolve_
cli_ model - Resolve a single model from CLI flags (
--provider/--model/ optional thinking). - resolve_
cli_ model_ from - Pure CLI resolution over an explicit model list and auth probe.
- resolve_
model_ scope - Resolve model patterns to scoped models (diagnostics discarded).
- resolve_
model_ scope_ from_ models - Pure scope resolution over an already-fetched model list (tests / offline).
- resolve_
model_ scope_ with_ diagnostics - Resolve model patterns to scoped models plus structured diagnostics.