A unified source of truth for LLM providers, models, pricing, and capabilities.
Project description
LLM Providers
A unified source of truth for LLM providers, models, pricing, and capabilities.
Accessible via Rust and Python.
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:
[dependencies]
llm_providers = { git = "https://github.com/lipish/llm-providers.git" }
Python
Install via pip (once published) or build from source:
# From PyPI (Coming Soon)
pip install llm-providers-list
# Build from source (requires maturin)
pip install maturin
maturin develop -m py/Cargo.toml
Usage
Rust
use llm_providers::{get_providers_data, list_providers, list_models, get_model};
fn main() {
// 1. Get raw map of all providers
let providers = get_providers_data();
if let Some(openai) = providers.get("openai") {
println!("Provider: {}", openai.label);
}
// 2. List all provider IDs
let provider_ids = list_providers();
println!("Providers: {:?}", provider_ids);
// 3. List models for a specific provider
if let Some(models) = list_models("openai") {
println!("OpenAI Models: {:?}", models);
}
// 4. Get specific model details
if let Some(model) = get_model("openai", "gpt-4o") {
println!("Model: {} (Price: ${}/1M input)", model.name, model.input_price);
}
}
Python
import llm_providers_list
# 1. List all supported providers
print(llm_providers_list.list_providers())
# Output: ['aliyun', 'anthropic', 'deepseek', 'openai', ...]
# 2. List models for a specific provider
print(llm_providers_list.list_models("openai"))
# Output: ['gpt-4o', 'gpt-3.5-turbo', ...]
# 3. Get specific model details
model = llm_providers_list.get_model("openai", "gpt-4o")
print(f"Model: {model.name}, Price: ${model.input_price}/1M tokens")
# 4. Get full provider object (Rich Type)
openai = llm_providers_list.get_provider("openai")
print(f"Label: {openai.label}")
print(f"Base URL: {openai.base_url}")
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:
cargo test
- Submit a Pull Request.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_providers_list-0.1.3.tar.gz.
File metadata
- Download URL: llm_providers_list-0.1.3.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
532246c05f204552501724e5ac3f094e9de2a0d4c54e01cf9ee93b9bd23d73b8
|
|
| MD5 |
5fa16148435c8f1dbea5846b0afdb709
|
|
| BLAKE2b-256 |
e4351f9ca9084a5666edb7d7537710a95b18d4a1f7dc22853f5eda6e39149e40
|
File details
Details for the file llm_providers_list-0.1.3-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: llm_providers_list-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 265.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30a2494a11848918a14bc0265bf41bb9aaa3c2db2c6fcc45f2fff0592baf4d70
|
|
| MD5 |
0bd732ba23e9baa2fa0d45444f43f370
|
|
| BLAKE2b-256 |
888dd6219e3a5abcfe69d61b17feb1408aac76a7520f9f289d49d8c64259b303
|