Model Catalog and Profiles
ox-core loads objective model metadata from TOML data via ModelCatalog::builtin, ModelCatalog::load, ModelCatalog::load_from, ModelCatalog::from_toml, and ModelCatalog::load_file. The built-in catalog dogfoods the same schema and lives in crates/ox-core/catalog/models.toml.
Catalog Schema
Section titled “Catalog Schema”Each entry in a catalog file is a [[models]] table storing objective model capabilities. Unknown keys are rejected.
[[models]]id = "my-local-model"name = "My Local Model"provider_wire = "openai"context_window = 131072max_output_tokens = 16384supports_reasoning = truesupported_efforts = ["low", "medium", "high"]input_modalities = ["text", "image"]| Field | Type | Default | Description |
|---|---|---|---|
id |
string |
Required | Unique wire model identifier |
name |
string |
None | Optional human-friendly display name for the TUI |
provider_wire |
string |
Required | Wire protocol (google, openai, or anthropic) |
context_window |
integer |
Required | Maximum input context window in tokens |
max_output_tokens |
integer |
Required | Maximum output tokens per response |
supports_reasoning |
boolean |
false |
Whether reasoning effort controls apply |
supported_efforts |
string[] |
[] |
Optional list of accepted reasoning_effort levels |
input_modalities |
string[] |
["text"] |
Accepted input modalities (text, image, pdf, audio, video) |
max_attachment_bytes |
integer |
None | Optional maximum attachment payload size in bytes |
Local Catalog Overrides
Section titled “Local Catalog Overrides”ModelCatalog::load merges up to three layers in ascending precedence (later layers replace matching id entries and add new id entries):
| Layer | Path | Description |
|---|---|---|
| Built-in | Bundled catalog/models.toml |
Loaded first for all workspaces |
| User | ~/.config/ox/models.toml |
User overrides under $XDG_CONFIG_HOME |
| Project | .ox/models.toml |
Project overrides in the working directory, taking top precedence |
Missing override files are skipped. Project-local .ox/ overrides require workspace trust (--trust or trusted.toml, see Project Trust). You can also load a standalone TOML file with ModelCatalog::load_file and call ModelCatalog::merge on ModelCatalog::builtin().
Reasoning Effort Clamping
Section titled “Reasoning Effort Clamping”Before sending a request, ox clamps the effective reasoning_effort against the loaded catalog via ModelCatalog::clamp_reasoning_effort (and CatalogModel::clamp_reasoning_effort):
- If
supports_reasoningisfalse,reasoning_effortis omitted (None). - If
supported_effortsis non-empty and the requested level is unsupported, it clamps downward to the highest supported level not exceeding the request (for examplexhighclamps tohighwhensupported_efforts = ["low", "medium", "high"]). When every supported level exceeds the request, it clamps to the lowest supported level. - If
supported_effortsis empty or the modelidis not in the catalog,reasoning_effortpasses through unchanged.
User-Defined Profiles
Section titled “User-Defined Profiles”The built-in catalog does not assign tier preferences. Define named profiles in config.toml under [profiles]:
default_model = "gemini-4-neon"
[profiles]flagship = "gemini-4-carbon"standard = "gemini-4-neon"mini = "gemini-4-hydrogen"Config::resolve_profile(name) returns the model alias or ID configured for name, falling back to default_model when that profile is not defined.