Skip to main content

Crate aither_models

Crate aither_models 

Source
Expand description

Model registry with capabilities, context windows, and metadata for popular LLMs.

This crate provides a database of known AI models sourced from LiteLLM upstream, with their capabilities, context window sizes, pricing, and provider information.

§Example

use aither_models::{lookup, Ability};

if let Some(entry) = lookup("gpt-4o") {
    assert!(entry.max_input_tokens().unwrap_or(0) > 0);
    assert!(entry.has_ability(Ability::Vision));
}

Re-exports§

pub use types::ModelEntry;
pub use types::ModelMode;
pub use types::Pricing;
pub use types::Provider;

Modules§

convert
Shared conversion logic for LiteLLM and OpenRouter JSON.
types
Owned model metadata types sourced from LiteLLM and OpenRouter.

Structs§

ModelRegistry
A searchable collection of model entries.

Enums§

Ability
Represents the capabilities that a language model may support.
ModelTier
Capability/cost tier of a model.

Functions§

all_models
Get all known models.
lookup
Look up a model by ID or alias.
models_by_mode
Get all models matching a mode.
models_for_provider
Get all models for a provider.
models_with_ability
Get all models with a specific ability.
tier
Capability/cost tier of a model in the bundled registry.