litellm/tests/test_litellm/proxy/pass_through_endpoints
Yassin Kortam 258fe3e4ba
fix(passthrough): carry the budget reservation into request metadata (#36592)
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.
2026-08-12 12:34:13 -07:00
..
llm_provider_handlers Merge pull request #36447 from BerriAI/litellm_anthropic_fast_mode_speed_usage 2026-08-12 00:05:59 -07:00
test_carry_guardrail_logging_info.py fix(passthrough): emit otel guardrail span when a guardrail blocks (#29470) 2026-06-02 11:46:25 -07:00
test_llm_pass_through_endpoints.py test(passthrough): annotate route match scope as Final 2026-08-09 11:49:20 -07:00
test_method_specific_routing.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_pass_through_endpoints.py fix(passthrough): carry the budget reservation into request metadata (#36592) 2026-08-12 12:34:13 -07:00
test_passthrough_auth_default.py fix(passthrough): default auth=True; drop enterprise gate on the safe option 2026-04-29 23:10:59 +00:00
test_passthrough_endpoint_router.py fix(proxy): resolve pass-through credentials live from router deployments 2026-08-04 23:01:37 -07:00
test_passthrough_endpoints_common_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_passthrough_guardrail_block_otel_span.py fix: missing span for guardrail passthrough (#29552) 2026-06-03 01:25:15 +00:00
test_passthrough_guardrails.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_passthrough_guardrails_field_targeting.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_passthrough_post_call_guardrails.py test: patch unified guardrail mapping global instead of loader to fix order-dependent flake 2026-07-30 20:55:32 -07:00
test_streaming_handler_interrupt.py fix(proxy): preserve crlf line endings when injecting streamed usage cost 2026-08-11 00:45:32 -07:00
test_upstream_usage_headers.py feat(passthrough): record upstream-reported cost and token usage 2026-07-24 18:10:15 -07:00
test_vertex_ai_batch_passthrough.py fix(batches): keep batch state in sync on a poll without claiming attribution (#34456) 2026-08-08 16:01:47 -07:00
test_vertex_passthrough_load_balancing.py fix(proxy): Bedrock Knowledge Base pass-through: preserve SigV4 headers and signed request body (#27526) 2026-05-25 19:21:55 +05:30
test_watsonx_proxy_route.py Litellm OSS Staging 010626 (#29422) 2026-06-01 21:42:51 -07:00