Expand description
Model registry — manages built-in and custom models, provides API key resolution.
Originally inspired by pi-mono’s model-registry.
This module provides a ModelRegistry that:
- Loads built-in models from
oxi_ai::model_db - Loads custom models and provider overrides from a
models.jsonfile - Resolves API keys via
AuthStorage(env vars, OAuth tokens, stored credentials) - Supports dynamic provider registration (extensions)
- Provides model filtering by provider, capability, and modality
Structs§
- CliModel
Registry - CLI-specific model registry with auth storage integration.
- Model
Definition - Custom model definition in models.json.
- Model
Override - Per-model override fields (all optional, merged with built-in model).
- Models
Config - Top-level models.json configuration.
- Partial
Cost - Partial cost override — each field is optional.
- Provider
Config - Provider configuration in models.json.
- Provider
Config Input - Input type for
register_providerAPI (from extensions). - Resolved
Request Auth - Result of resolving API key and headers for a model.
Type Aliases§
- Model
Registry - Backward-compatible alias for
CliModelRegistry.