From a5f0e1a74197eaa6ef3435face95fa6ec46e2c1d Mon Sep 17 00:00:00 2001 From: Chesars Date: Tue, 10 Mar 2026 16:54:55 -0300 Subject: [PATCH] docs: expand aliases section in add_model_pricing guide Add usage example with concrete model entry, explanation of load-time expansion, and cross-reference to model_alias_map to clarify the difference between the two features. --- .../add_model_pricing.md | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/provider_registration/add_model_pricing.md b/docs/my-website/docs/provider_registration/add_model_pricing.md index 76251516fa..b3df1865cd 100644 --- a/docs/my-website/docs/provider_registration/add_model_pricing.md +++ b/docs/my-website/docs/provider_registration/add_model_pricing.md @@ -122,4 +122,28 @@ Here's the full specification with all available fields: } ``` -That's it! Your PR will be reviewed and merged. +### Using Aliases + +Many providers release the same model under multiple names — for example, a `latest` tag and a dated version like `claude-sonnet-4-5-20250929`. Instead of duplicating the entire entry, you can use the `aliases` field: + +```json +{ + "claude-sonnet-4-5": { + "aliases": ["claude-sonnet-4-5-20250929"], + "input_cost_per_token": 3e-06, + "output_cost_per_token": 1.5e-05, + "litellm_provider": "anthropic", + "max_input_tokens": 200000, + "max_output_tokens": 64000, + "mode": "chat", + "supports_function_calling": true, + "supports_tool_choice": true + } +} +``` + +At load time, each alias is expanded into a top-level entry sharing the same data as the canonical entry. The example above makes both `claude-sonnet-4-5` and `claude-sonnet-4-5-20250929` resolve with the same pricing and capabilities. + +:::info +This is different from [`model_alias_map`](../completion/model_alias.md), which is a runtime SDK/proxy feature for mapping user-facing model names to LiteLLM model identifiers. The `aliases` field here is for the model cost JSON only — it avoids duplicate entries for models that share identical pricing and capabilities. +:::