Expand description
§llm_models_spider
Auto-updated registry of LLM model capabilities, rankings, and pricing.
This crate provides zero-cost compile-time lookups for model capabilities like vision support, audio input, etc. The model lists are automatically updated via GitHub Actions by scraping OpenRouter, LiteLLM, and Chatbot Arena.
§Usage
use llm_models_spider::{supports_vision, supports_audio, ModelCapabilities};
// Quick checks
assert!(supports_vision("gpt-4o"));
assert!(supports_vision("claude-3-sonnet"));
assert!(!supports_vision("gpt-3.5-turbo"));
// Get full capabilities
if let Some(caps) = ModelCapabilities::lookup("google/gemini-2.0-flash") {
println!("Vision: {}, Audio: {}", caps.vision, caps.audio);
}§Rich Model Profiles
use llm_models_spider::{model_profile, arena_rank};
if let Some(profile) = model_profile("gpt-4o") {
println!("Max input: {} tokens", profile.max_input_tokens);
if let Some(cost) = profile.pricing.input_cost_per_m_tokens {
println!("Input cost: ${}/M tokens", cost);
}
}
if let Some(rank) = arena_rank("gpt-4o") {
println!("Arena rank: {:.1}/100", rank);
}§Auto-Updates
Model data is fetched from OpenRouter, LiteLLM, and Chatbot Arena, then committed to this repo via scheduled GitHub Actions. New releases are published automatically when the data changes.
Structs§
- Model
Capabilities - Model capabilities struct.
- Model
Info Entry - Detailed model information entry.
- Model
Pricing - Pricing in USD.
- Model
Profile - Full model profile: capabilities, ranks, pricing, and context window.
- Model
Ranks - Arena and task-specific rankings, normalized to 0.0-100.0.
Constants§
- ALL_
MODELS - All known models (union of all lists).
- AUDIO_
MODELS - Models that support audio input.
- MODEL_
INFO - Sorted by name for binary search lookup.
- TEXT_
ONLY_ MODELS - Models that are text-only (no vision/audio support).
- VISION_
MODELS - Models that support vision/image input.
Functions§
- arena_
rank - Get the arena rank (0.0-100.0) for a model, if available.
- is_
text_ only - Check if a model is text-only (no vision/audio).
- model_
profile - Get a full model profile including capabilities, pricing, ranks, and context window.
- supports_
audio - Check if a model supports audio input.
- supports_
pdf - Check if a model supports PDF/file input.
- supports_
video - Check if a model supports video input.
- supports_
vision - Check if a model supports vision/image input.