profile
Structs
Section titled “Structs”ModelCapabilities
Section titled “ModelCapabilities”Capability metadata for a specific model — context window, output limits, feature support, and optional cost information.
Use [ModelCapabilities::lookup] to resolve capabilities from the built-in
registry, or construct manually for custom/self-hosted models.
Fields
| Field | Type | Description |
|---|---|---|
context_window | u32 | Maximum input tokens the model can accept (context window size). |
max_output_tokens | u32 | Maximum tokens the model can generate in a single response. |
supports_tools | bool | Whether the model supports function/tool calling. |
supports_vision | bool | Whether the model supports vision (image) inputs. |
supports_streaming | bool | Whether the model supports streaming responses. |
cost_per_1k_input | Option<f64> | Cost per 1K input tokens (USD), if known. Used for budget tracking. |
cost_per_1k_output | Option<f64> | Cost per 1K output tokens (USD), if known. |
Methods
lookup
Section titled “lookup”fn lookup(model_id: &str) -> SelfLook up capabilities for a model by its ID string.
Matches known model prefixes (e.g. “gpt-4o” matches “gpt-4o-2024-08-06”).
Returns UNKNOWN_DEFAULT if no match is found.
available_for_history
Section titled “available_for_history”fn available_for_history(&self, reserved_output: Option<u32>, system_tokens: u32, tools_tokens: u32) -> u32Compute available budget for conversation history after reserving space for output, system prompt, and tool schemas.
ModelConfig
Section titled “ModelConfig”Fields
| Field | Type | Description |
|---|---|---|
model_id | String | |
family | ModelFamily | |
profile | ModelProfile | |
capabilities | Option<ModelCapabilities> | Optional explicit capabilities override. When None, capabilities |
extensions | BTreeMap<String, serde_json::Value> |
Methods
resolve_capabilities
Section titled “resolve_capabilities”fn resolve_capabilities(&self) -> ModelCapabilitiesResolve capabilities — explicit override takes priority, then static registry lookup, then conservative defaults for unknown models.
ModelFamily
Section titled “ModelFamily”Variants
| Variant | Description |
|---|---|
OpenAI | |
Gpt5 | |
Qwen3 | |
Claude | |
Gemini | |
DeepSeek | |
Llama | |
Mistral |
ModelProfile
Section titled “ModelProfile”Variants
| Variant | Description |
|---|---|
Generic | |
Gpt5 { ... } | |
Qwen3 { ... } |