litellm/tests/unit/integrations/arize
JingHao-Leon 70cb219dfa fix(otel, arize): report unknown cost instead of a fake 0 on pricing failure
When LiteLLM cannot price a call (model newer than the bundled cost
map), the standard logging payload gets response_cost = 0.0 together
with response_cost_failure_debug_info. The span writers only skipped
None, so OTel v2 spans carried litellm.cost.total = 0 and Arize/Phoenix
spans carried llm.cost.total = 0 — indistinguishable from a genuinely
free model. Langfuse prefers an ingested cost over its own price
knowledge, so every call to an unpriced model showed $0 there (issue
#44186).

When response_cost_failure_debug_info is present, the cost is now
reported as unknown (None) instead of 0 in both the OTel v2 span
payload builders and the Arize attribute writer. A genuine 0 without
the failure marker (free model) is still emitted as 0.
2026-10-03 03:54:56 +08:00
..
__init__.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_arize.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_arize_health_check.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_arize_otel_coexistence.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_arize_phoenix.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_arize_utils.py fix(otel, arize): report unknown cost instead of a fake 0 on pricing failure 2026-10-03 03:54:56 +08:00