Skip to main content

Module model_resolver

Module model_resolver 

Source
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§

InitialModelResult
Result of finding initial model
Model
A discovered model
ParsedModelResult
Result of parsing a model pattern
Provider
Known AI providers
ResolveCliModelResult
Result of resolving a CLI model
RestoreModelResult
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