Skip to main content

Module model_db

Module model_db 

Source
Expand description

Comprehensive model database for oxicode-ai

Contains 934 models across 29 providers.

§Usage

use oxicode_ai::model_db::{get_model_entry, get_provider_models, get_all_models};

// Look up a specific model
let entry = get_model_entry("anthropic", "claude-sonnet-4-20250514");
assert!(entry.is_some());

// Get all models for a provider
let anthropic_models = get_provider_models("anthropic");
assert!(!anthropic_models.is_empty());

// Iterate all models
let all = get_all_models();
assert!(all.len() > 926);

Structs§

ModelEntry
Returns true if a provider id came from the openclaw port AND has unverified pricing.

Constants§

UNVERIFIED_PRICE
Sentinel value used when a model entry has no verified price.

Functions§

builtin_model_count_sentinel
Count of models with the unverified-pricing sentinel (cost_input < 0.0 || cost_output < 0.0).
get_all_models
Get all model entries across all providers.
get_cheapest_models
Find the cheapest models by input cost, returning up to limit results.
get_model_entry
Look up a specific model entry by provider and model ID.
get_provider_models
Get all model entries for a given provider.
get_providers
Get all known provider names.
get_reasoning_models
Find models that support reasoning/thinking.
get_vision_models
Find models that support image/vision input.
model_count
Get the total number of models in the database.
search_models
Search models by name or ID pattern (case-insensitive).
try_materialize_all
Initialize and materialize the catalog from models.dev data.