Philosophy
Managing LLM provider configurations across multiple projects and languages is a pain. LLM Providers solves this by maintaining a single, curated JSON source of truth for:
- Model IDs & Names
- Context Windows & Max Output Tokens
- Pricing (Input/Output)
- Capabilities (Tool Support, Vision, etc.)
This data is embedded at compile-time into a Rust crate for zero-latency access and exposed to Python via high-performance bindings.
Features
- 🚀 Zero-Latency: Data is compiled into the binary; no runtime I/O or API calls.
- 🦀 Rust Native: Type-safe structs (
Provider,Model) for robust development. - 🐍 Python Ready: Seamless integration via
pip install llm-providers-list. - 🔄 Unified Schema: Consistent data structure across all providers (OpenAI, Anthropic, DeepSeek, etc.).
- 📦 Rich Metadata: Includes pricing, context length, and tool support flags.
Installation
Rust
Add this to your Cargo.toml:
[]
= { = "https://github.com/lipish/llm-providers.git" }
Python
Install via pip (once published) or build from source:
# From PyPI (Coming Soon)
# Build from source (requires maturin)
Usage
Rust
use ;
Python
# 1. List all supported providers
# Output: ['aliyun', 'anthropic', 'deepseek', 'openai', ...]
# 2. List models for a specific provider
# Output: ['gpt-4o', 'gpt-3.5-turbo', ...]
# 3. Get specific model details
=
# 4. Get full provider object (Rich Type)
=
Advanced Usage
Filtering Models
You can filter models by region, capabilities (tools), or context length.
Rust
use ;
let cn_models = filter_models;
for in cn_models
Python
# Find all models in CN region that support tools
=
Data Structure
The registry uses a structured schema enforced by providers.schema.json.
- Provider Family: Grouping for providers (e.g.,
openai,aliyun). - Region:
cn(China),global(International),us,eu, etc. - Price Currency:
USDorCNY.
Supported Providers
- OpenAI (GPT-4o, GPT-3.5, o1)
- Anthropic (Claude 3.5 Sonnet, Haiku, Opus)
- DeepSeek (Chat, Reasoner)
- Aliyun (Qwen Max, Plus, Turbo)
- Tencent (Hunyuan)
- Moonshot (Kimi)
- Moonshot AI (CN)
- Moonshot AI Global
- MiniMax
- MiniMax (CN)
- MiniMax Global
- Zhipu (GLM-4)
- BigModel (Zhipu CN)
- Z.ai (Zhipu Global)
- Volcengine (Doubao)
- LongCat
Contributing
Contributions are welcome! To add a new provider or update existing models:
- Edit
providers.jsonin the root directory. - Run tests to ensure validity:
- Submit a Pull Request.
License
MIT