Expand description
Model resolution — maps a ModelRef to a live Arc<dyn Llm>.
The ModelResolver trait abstracts over model construction so that
the runtime can resolve any provider declaration into a callable model.
DefaultModelResolver implements the standard resolution logic:
- Shorthand names are mapped to providers by prefix (
gemini-*→ Gemini,gpt-*→ OpenAI,claude-*→ Anthropic, etc.) - Structured refs use the explicit
providerfield directly - OpenAI-compatible refs construct a client with the given
base_url+api_key
Structs§
- Default
Model Resolver - Default model resolver that uses prefix-based provider inference for shorthand names and explicit provider fields for structured refs.
Enums§
- Resolver
Error - Errors that can occur during model resolution.
Traits§
- Model
Resolver - Resolves a
ModelRefinto a liveArc<dyn Llm>.
Functions§
- infer_
provider - Infers the
Providerfrom a shorthand model name by prefix matching.
Type Aliases§
- Resolver
Result - Result alias for resolver operations.