You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ai): a hosted gateway call is priced at the deployment model that the gateway names, not at the route name #2031
The spend ledger prices a hosted gateway call at the route name that the client asked for, for example devops-chat. genai-prices does not know that name, so the call costs $0 in the ledger. LiteLLM 1.103.0 names the deployment model that served the call in the x-litellm-model-name response header, for example openai/gpt-4o.
Evidence
Found while #1631 was built: its agent read get_custom_headers in the gateway's LiteLLM source. #1631 already reads x-litellm-model-api-base to decide whether a call is local or hosted. #1672 only adds a warning for an unknown model; it does not change which name is priced.
Proposed remedy
Read x-litellm-model-name from the gateway reply, and price a hosted call at that model.
Keep the route name as a label, so the dashboards still group by what the client asked for.
A test with a fake gateway reply that names openai/gpt-4o checks a non-zero cost.
Activity
dan-petty commentedon Oct 24, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate fixes an incorrect behavior in how gateway calls are priced.Fixing the pricing logic improves accuracy and prevents incorrect billing.Correct pricing ensures accurate cost tracking for AI usage and prevents financial loss.Requires reading new headers and updating the pricing logic, plus adding a test case.Both items relate to gateway call pricing but differ in that this one changes the model name used for pricing while #1631 changes how local vs hosted is determined.fix(ai): the spend series exists at $0, a gateway call counts as loca…
fix(ai): local savings use one reference price per request kind for e…
fix(ai): a hosted gateway call is priced at the deployment model that…
fix(ci): a commit runs no test suite in pre-commit; the pre-push gate…