llm_providers 0.14.4

A unified source of truth for LLM providers, models, pricing, and capabilities.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use llm_providers::{ModelFilter, filter_offerings, list_catalog_models};

fn main() {
    let catalog = list_catalog_models();
    println!("Catalog models (deduped): {}", catalog.len());

    let cn_offerings = filter_offerings(ModelFilter {
        region: Some("cn".to_string()),
        ..Default::default()
    });
    println!("Active CN offerings: {}", cn_offerings.len());
    for offering in cn_offerings.iter().take(5) {
        println!(
            "- [{}] {} ({})",
            offering.endpoint_id, offering.model.name, offering.price_currency
        );
    }
}