mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
A successful pass-through request left its pre-call budget reservation in the shared Redis spend counter. `_init_kwargs_for_pass_through_endpoint` built the request metadata from the sanitized key fields only, so `_PROXY_track_cost_callback` resolved `budget_reservation = None` and `increment_spend_counters` added the actual cost on top of a reservation nobody released. The counter drifted above real spend on every request until the key falsely tripped BudgetExceededError, while the Postgres spend stayed far below the limit. The failure path was unaffected because it releases `user_api_key_dict.budget_reservation` directly. The reservation is now set alongside the other internal keys, after the client-supplied metadata merge, so a request body cannot forge one that names arbitrary counter keys. |
||
|---|---|---|
| .. | ||
| 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 | ||