mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
PostgreSQL rejects NUL in jsonb with 22P05, and the tags go into the managed object's CREATE payload, so one poisoned tag aborts the whole row insert rather than just that column. With no LiteLLM_ManagedObjectTable row, CheckBatchCost never discovers the batch, so a batch that really ran and billed at the provider produces no spend at all. The create-time write is fire and forget, so nothing retries it. This regressed in #36468, which started passing request_tags and persist_attribution from the Anthropic passthrough; before that no caller-supplied string reached the column. Sanitize in the shared helper that builds the value, matching how spend_tracking_utils already handles LiteLLM_SpendLogs.request_tags. Both the Anthropic and the Vertex passthrough build tags through that one helper, so this covers both. Rename it to _sanitized_str_tuple since it no longer merely coerces. |
||
|---|---|---|
| .. | ||
| llm_provider_handlers | ||
| test_carry_guardrail_logging_info.py | ||
| test_llm_pass_through_endpoints.py | ||
| test_method_specific_routing.py | ||
| test_pass_through_endpoints.py | ||
| test_passthrough_auth_default.py | ||
| test_passthrough_endpoint_router.py | ||
| test_passthrough_endpoints_common_utils.py | ||
| test_passthrough_guardrail_block_otel_span.py | ||
| test_passthrough_guardrails.py | ||
| test_passthrough_guardrails_field_targeting.py | ||
| test_passthrough_post_call_guardrails.py | ||
| test_streaming_handler_interrupt.py | ||
| test_upstream_usage_headers.py | ||
| test_vertex_ai_batch_passthrough.py | ||
| test_vertex_passthrough_load_balancing.py | ||
| test_watsonx_proxy_route.py | ||