litellm/tests/integration/cost_calculation/cases
yuneng-jiang 71c1a2aff6
test(integration): repair tests that merged changes left stale (#50782)
Several integration tests on main still assert behavior that later changes replaced on purpose, so they fail on every scheduled run, and one of them stops the whole sdk group at import.

The batch cost case expected cached tokens to bill at the Batch input price when a price row has no Batch cache price. Since #50062 they bill at the Standard cache price, so the case now expects 0.000235 input cost and is renamed to say so.

The OTel v2 attribute test pinned langfuse_otel and langtrace as carrying no request metadata baggage. Since #50373 every OTel v2 destination carries it, so all seven callbacks share one expectation and the Langfuse baggage test that was deferred under LIT-9128 runs again.

The clean-EOF outage test trips its database relay on the text of the spend log insert. The ledger writes that insert without the "public" schema prefix, so the relay never tripped and the test timed out before it checked anything. The trigger now matches the insert on both write paths.

The usage routing tests expected cooldown, tpm and rpm keys in one MGET. Since #50170 the cooldown keys are read in their own MGET, at most once per DEFAULT_COOLDOWN_REDIS_READ_INTERVAL_SECONDS. Both the proxy and the SDK test now expect the two MGETs, and the proxy test waits out that interval after its /model/info poll, which reads the same keys.

The concurrent deployment delete test held its writer inside Router._update_deployment_indices_after_removal, which went away with the Python router core in #50178, so the file failed at import and stopped the whole sdk group. It now holds the writer where the registry reads the model list again after router-core applied the change.
2026-11-10 01:08:35 +00:00
..
__init__.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
anthropic.py test(integration): cover claude-fable-5-2 capability flags and prompt-cache pricing on the scripted Anthropic upstream (#50722) 2026-11-09 13:24:37 -08:00
azure.py test(integration): repair stale contract fixtures (#49700) 2026-11-02 11:23:11 -08:00
batch_realtime.py test(integration): repair tests that merged changes left stale (#50782) 2026-11-10 01:08:35 +00:00
bedrock_chat_completions.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
bedrock_converse.py test(integration): cover claude-fable-5-2 capability flags and prompt-cache pricing on Vertex AI and Bedrock Converse (#50742) 2026-11-09 23:26:40 +00:00
bedrock_mantle.py test(cost): add tier 1 cost tracking cells and sync usage shapes for 2026-10-17 (#47141) 2026-10-17 11:11:46 -07:00
decisions.py test(decisions): audit #47508 (#48777) 2026-10-28 04:38:21 -07:00
fireworks_ai.py test(cost): pin litellm's own prompt count over a tool-call history when the stream carries no usage (#46710) 2026-10-15 17:47:43 +00:00
gemini.py fix(vertex_ai): build the cachedContents collection URL under a custom api_base (#44783) 2026-10-29 03:46:35 -07:00
misc.py test(cost): expect cohere rerank-v4 prompt_tokens from billed_units.total_tokens (#49455) 2026-10-31 11:03:10 -07:00
openai.py test(integration): repair stale contract fixtures (#49700) 2026-11-02 11:23:11 -08:00
together_ai.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
vertex_ai.py test(integration): cover claude-fable-5-2 capability flags and prompt-cache pricing on Vertex AI and Bedrock Converse (#50742) 2026-11-09 23:26:40 +00:00
xai.py fix(cost): split xai spend rows across input and output instead of booking the total as output (#46320) 2026-10-14 17:02:00 -07:00