litellm - 💡(How to fix) Fix [Bug]: Model hub ignores custom model_info when model is not in model_prices_and_context_window.json [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

In Router.get_deployment_model_info(), the function looks up pricing from two sources:

  1. custom pricing registered from the config during _create_deployment (populated from config's model_info)
  2. built-in pricing from model_prices_and_context_window.json

However, the conditional doesn't cover the case where only the custom pricing is set, but the model is not yet present in the built-in json (like e.g. deepseek-v4-flash). This causes it to return None, which the UI renders as "Free".

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

When a model is defined in litellm_config.yaml with custom pricing in model_info (not litellm_params), and the model is not in the built-in model_prices_and_context_window.json, the public Model Hub table displays "Free" instead of the configured prices.

The correct prices do appear on the regular "Models + Endpoints" page; only the Model Hub pages (both public and private) show Free.

Root Cause

In Router.get_deployment_model_info(), the function looks up pricing from two sources:

  1. custom pricing registered from the config during _create_deployment (populated from config's model_info)
  2. built-in pricing from model_prices_and_context_window.json

However, the conditional doesn't cover the case where only the custom pricing is set, but the model is not yet present in the built-in json (like e.g. deepseek-v4-flash). This causes it to return None, which the UI renders as "Free".

Related issues

  • #8573 — closed, pricing was in litellm_params which works; model_info doesn't
  • #14319 — closed stale

Steps to Reproduce

  1. Add a model not present in model_prices_and_context_window.json
  2. Set the prices in its model_info
  3. Check model-hub-table for pricing info

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.86.2

Twitter / LinkedIn details

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: Model hub ignores custom model_info when model is not in model_prices_and_context_window.json [1 pull requests]