7f1ca37234
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Canonical Model System
Provides a unified view of model metadata (pricing, capabilities, context limits) across different LLM providers.
Normalizes provider-specific model names (e.g., claude-3-5-sonnet-20241022)
to canonical IDs (e.g., anthropic/claude-3.5-sonnet).
Build Canonical Models
Fetches latest model metadata from OpenRouter and validates provider mappings:
cargo run --bin build_canonical_models # Build and check (default)
cargo run --bin build_canonical_models --no-check # Build only, skip checker
This script performs two operations by default:
- Builds canonical models - Fetches from OpenRouter API and updates the registry
- Writes to:
src/providers/canonical/data/canonical_models.json
- Writes to:
- Checks model mappings (unless
--no-checkis passed) - Tests provider mappings and tracks changes over time- Reports unmapped models
- Compares with previous runs (like a lock file)
- Shows changed/added/removed mappings
- Writes to:
src/providers/canonical/data/canonical_mapping_report.json
The script is located in this directory: build_canonical_models.rs