Expand description
Model name resolution and matching
Provides utilities for parsing model patterns, resolving model names, finding models by glob, and determining the best model for startup.
This module integrates with:
- oxi_ai::model_db::ModelEntry for cost/modality info
- oxi_ai::model_registry for runtime model lookup
- auth_storage for auth validation
Structs§
- Initial
Model Result - Result of finding initial model
- Model
- A discovered model
- Parsed
Model Result - Result of parsing a model pattern
- Provider
- Known AI providers
- Resolve
CliModel Result - Result of resolving a CLI model
- Restore
Model Result - Result of restore model from session
Constants§
- DEFAULT_
THINKING_ LEVEL - Default thinking level when none is specified
- THINKING_
LEVELS - Valid thinking levels in order of intensity
Functions§
- clamp_
thinking_ level - Clamp a requested thinking level to what the model supports
- default_
model_ per_ provider - Default models per provider
- find_
initial_ model - Find the initial model to use based on priority:
- find_
models_ by_ glob - Find all models matching a provider and glob pattern
- find_
models_ by_ pattern - Find all models matching a pattern (glob or substring) from the full model database
- get_
thinking_ level_ map - Get the thinking level mapping for a model that has thinking variants
- has_
configured_ auth - Check if auth is configured for a provider/model
- match_
glob - Match a glob pattern against text
- models_
are_ equal - Check if two models are equal (same provider and id)
- parse_
model_ pattern - Parse a model pattern into components
- resolve_
cli_ model - Resolve a model from CLI arguments
- restore_
model_ from_ session - Restore model from session with fallback and auth validation