Skip to main content

Module model

Module model 

Source
Expand description

Model identifiers, provider variants, and sampling parameters.

The Model type parses from a "provider:model-name" string via FromStr (e.g., "openrouter:anthropic/claude-sonnet-4") and serialises back to the same format. Aliased models ("fast,gpt-4.1") let users define shorthand names that resolve to real model IDs at API-call time.

§Key types

TypeRole
ModelFully-qualified model ID (provider:name); parses bidirectionally
ProviderLLM backend variant (OpenRouter, Ollama, Anthropic, OpenAI, Connect)
AliasedModelModel name with optional aliasing (name,real_name)
ReasoningLevelExtended chain-of-thought effort (Off / Low / Medium / High)
SamplingParamsExtended sampling config (top_p, top_k, min_p, penalties)
AgentLlmConfigComplete LLM config for an agent turn (model, temp, reasoning, sampling)

Structs§

AgentLlmConfig
Complete LLM configuration for an agent turn.
AliasedModel
A model name with optional aliasing.
Model
Fully-qualified model identifier combining a backend Provider with an AliasedModel.
ProviderPreferences
Provider-level routing preferences (OpenRouter extension).
SamplingParams
Extended sampling parameters beyond just temperature.

Enums§

ApiKey
An API key identifier, not a credential value.
Provider
LLM backend variant. Used to route completion requests and select the correct crate::llm::LlmProvider implementation from the registry.
ProviderSort
How to sort provider candidates.
Quantization
Quantization level for model weights.
ReasoningLevel
Extended chain-of-thought / reasoning effort level.