Skip to main content Module models Copy item path Source pub use tool_call::FunctionCall ;pub use tool_call::ToolCall ;tool_call Wire-format tool call type. BackendConfig Backend connection configuration ChatMessage Represents a chat message ModelCapabilities Capability flags advertised by a model adapter. ModelConfig Unified model configuration ModelResponse Response from a model OllamaOptions Ollama-specific options (extracted from backend_options) ProviderProfile Static description of one OpenAI-compatible provider. ReasoningChunk A typed chunk of reasoning content emitted during streaming. TokenUsage Token usage statistics normalized across providers. UserFacingError User-facing error information with actionable suggestions BackendError Backend-specific errors ChatMessageKind CompatStyle User-friendly string form for compat = "..." in config.toml when a
fully custom provider needs to declare which profile shape to follow. ConfigError Configuration errors ErrorCategory Error categories for visual differentiation MessageRole ModelError Top-level error type for all model operations ReasoningCapability Describes the reasoning controls a model exposes. ReasoningExtraction Where reasoning content shows up in a streaming response delta. ReasoningLevel Reasoning depth requested for a model call. ReasoningStrategy How to put ReasoningLevel onto the wire for a given provider. StreamEvent A single event emitted during a streaming model call. TokenUsageSource Where a token count came from. Provider-reported counts are the
billing/request truth; estimates are only for preflight context
diagnostics. PROVIDER_REGISTRY Built-in provider registry. Lookups are case-insensitive on name.
Add a provider here when its quirks fit the existing strategies; add
a new ReasoningStrategy variant when a provider needs something
the existing ones can’t express. Model Core trait that all model adapters implement. lookup_provider Look up a built-in provider by name. Case-insensitive. nearest_effort Map a requested reasoning level onto the closest level the model
actually supports. Result Result type alias for model operations StreamCallback Callback invoked once per StreamEvent during a chat request.