From f64ff8327dbcf341a73d05ca3c10dd6db8cc439a Mon Sep 17 00:00:00 2001 From: Chesars Date: Wed, 21 Jan 2026 11:18:51 -0300 Subject: [PATCH] docs(custom_pricing): add base_model usage for OpenAI dated model versions Document how to use base_model to ensure custom pricing is applied when OpenAI returns dated model names (e.g., gpt-4o-mini-audio-preview-2024-12-17) that differ from the configured model name. --- docs/my-website/docs/proxy/custom_pricing.md | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/my-website/docs/proxy/custom_pricing.md b/docs/my-website/docs/proxy/custom_pricing.md index f6762f5e45..8f4a4c450f 100644 --- a/docs/my-website/docs/proxy/custom_pricing.md +++ b/docs/my-website/docs/proxy/custom_pricing.md @@ -127,6 +127,28 @@ model_list: base_model: azure/gpt-4-1106-preview ``` +### OpenAI Models with Dated Versions + +`base_model` is also useful when OpenAI returns a dated model name in the response that differs from your configured model name. + +**Example**: You configure custom pricing for `gpt-4o-mini-audio-preview`, but OpenAI returns `gpt-4o-mini-audio-preview-2024-12-17` in the response. Since LiteLLM uses the response model name for pricing lookup, your custom pricing won't be applied. + +**Solution** ✅: Set `base_model` to the key you want LiteLLM to use for pricing lookup. + +```yaml +model_list: + - model_name: my-audio-model + litellm_params: + model: openai/gpt-4o-mini-audio-preview + api_key: os.environ/OPENAI_API_KEY + model_info: + base_model: gpt-4o-mini-audio-preview # 👈 Used for pricing lookup + input_cost_per_token: 0.0000006 + output_cost_per_token: 0.0000024 + input_cost_per_audio_token: 0.00001 + output_cost_per_audio_token: 0.00002 +``` + ## Debugging