litellm/tests/unit/integrations/gcs_pubsub
joshua-berri 053615f679
fix(caching): preserve otel cache hits and align logging metadata (#52971)
* fix(caching): keep the otel span out of the response cache key

The caching handler adds the request's parent_otel_span to the call kwargs. It
was not registered as a LiteLLM-owned kwarg, so with
enable_caching_on_provider_specific_optional_params on, the span repr (with a
new trace id per request) went into the cache key and the cache never hit.

Fixes #48712

* fix(logging): carry claude_subscription_usage through the Rust standard logging payload

#52901 added claude_subscription_usage to the standard logging metadata but
left the Rust litellm-standard-logging crate and the pinned logging fixtures
without it, so the S3 golden, GCS pub/sub, spend log and standard logging
document tests failed. Add the typed field to the Rust payload, a test that a
non-null value serializes the way Python logs it, and the null field to the
recorded fixtures.

---------

Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com>
2026-11-19 16:25:26 -08:00
..
__init__.py test: add __init__.py to migrated tests/unit packages 2026-09-20 11:53:49 +00:00
spend_logs_payload.json fix(caching): preserve otel cache hits and align logging metadata (#52971) 2026-11-19 16:25:26 -08:00
test_pub_sub.py fix(vertex_ai): reuse one Google token across RAG Engine searches and cold bursts (#51239) 2026-11-14 03:12:09 -05:00