litellm/tests/integration/cost_calculation
Kerry Lu ccdca3d39c
fix(cost_calculator): honour base_model when the deployment provider row has no rates, with a live-proxy integration test (#46318)
* fix(cost_calculator): price an explicit base_model from its own row when the deployment provider row has no rates

A chatgpt/ deployment with model_info.base_model recorded zero spend because the
base model was looked up under the chatgpt provider, which resolves to the
deliberately unpriced chatgpt/ row. When the deployment provider's row for the
base model declares no rates, price it under the provider of the base model's
own row instead. Deployments whose provider row declares rates are unchanged.

(cherry picked from commit 42d9a8693e)

* test(integration): bill a chatgpt base_model deployment from the priced row on a live proxy

Co-authored-by: sla55er <stiliyanmarkov@gmail.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: sla55er <stiliyanmarkov@gmail.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-13 17:10:10 -07:00
..
bridge_cost_parity test(cost): add BridgeCostParityTestCase with a gpt-6-sol /v1/messages to Responses pair (#46130) 2026-10-13 02:51:55 +00:00
cases test(cost): add xai grok-4.7, Bedrock runtime chat completions and Bedrock Mantle cost cases (#46154) 2026-10-13 09:06:19 -07:00
stream_parity test(cost): add BridgeCostParityTestCase with a gpt-6-sol /v1/messages to Responses pair (#46130) 2026-10-13 02:51:55 +00:00
assertions.py test(cost): add BridgeCostParityTestCase with a gpt-6-sol /v1/messages to Responses pair (#46130) 2026-10-13 02:51:55 +00:00
catalog.py test(cost): add xai grok-4.7, Bedrock runtime chat completions and Bedrock Mantle cost cases (#46154) 2026-10-13 09:06:19 -07:00
conftest.py test(cost): add BridgeCostParityTestCase with a gpt-6-sol /v1/messages to Responses pair (#46130) 2026-10-13 02:51:55 +00:00
cost_map.py test(cost): add xai grok-4.7, Bedrock runtime chat completions and Bedrock Mantle cost cases (#46154) 2026-10-13 09:06:19 -07:00
cost_tracking_case.py test(cost): add xai grok-4.7, Bedrock runtime chat completions and Bedrock Mantle cost cases (#46154) 2026-10-13 09:06:19 -07:00
test_base_model_cross_provider_spend.py fix(cost_calculator): honour base_model when the deployment provider row has no rates, with a live-proxy integration test (#46318) 2026-10-13 17:10:10 -07:00
test_batch_realtime_cost.py test(integration): move the openai cost tracking cases from cost_tracking_cases.json to CostTrackingTestCase literals (#45879) 2026-10-10 23:29:23 +00:00
test_cost_tracking.py test(cost): add xai grok-4.7, Bedrock runtime chat completions and Bedrock Mantle cost cases (#46154) 2026-10-13 09:06:19 -07:00