litellm/tests/test_litellm/proxy/hooks
Krish Dholakia cf439c269c
Agents - add max budget + tpm/rpm limiting per agent AND per agent session (#22849)
* feat: enforce x-litellm-trace-id in header, if required

* feat: update spend for agent

* refactor: update agent table to follow similar format as other entities - also add a spend column - allows us to see spend of an agent

* fix: cleanup ui

* feat: return spend on agent endpoints

* feat: scope pr

* feat(agents/): support budgets + rate limiting on agents + agent sessions

* fix: address PR review feedback

- Add missing tpm_limit, rpm_limit, session_tpm_limit, session_rpm_limit
  columns to root schema.prisma to match proxy and extras schemas
- Add backwards-compatible fallback to key metadata for max_iterations
  so existing users don't silently lose enforcement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: qa'ed RPM limiting on agents

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:12:42 -08:00
..
test_async_post_call_streaming_iterator_hook.py fix(proxy): async_post_call_streaming_iterator_hook now properly iterates async generators (#17626) 2025-12-07 23:29:42 -08:00
test_dynamic_rate_limiter_v3.py Merge pull request #17707 from raghav-stripe/raghav-fix-responsesapi-rl 2025-12-11 08:57:16 +05:30
test_image_generation_guardrails.py added tests 2026-02-11 15:45:47 +05:30
test_key_management_event_hooks.py feat: hashicorp vault rotate support 2026-01-23 17:32:55 +09:00
test_max_budget_per_session_limiter.py Agents - add max budget + tpm/rpm limiting per agent AND per agent session (#22849) 2026-03-07 19:12:42 -08:00
test_max_iterations_limiter.py Agents - add max budget + tpm/rpm limiting per agent AND per agent session (#22849) 2026-03-07 19:12:42 -08:00
test_parallel_request_limiter_v3.py Agents - add max budget + tpm/rpm limiting per agent AND per agent session (#22849) 2026-03-07 19:12:42 -08:00
test_post_call_failure_hook_integration.py [Feat] Enable async_post_call_failure_hook to transform error responses (#18348) 2025-12-22 11:24:30 -08:00
test_post_call_response_headers_hook.py [Feat] Add async_post_call_response_headers_hook to CustomLogger (#20083) 2026-01-30 12:44:44 -08:00
test_post_call_streaming_hook_integration.py fix(proxy): use return value from CustomLogger.async_post_call_success_hook (#19670) 2026-01-26 08:48:22 -08:00
test_post_call_success_hook_integration.py fix(proxy): use return value from CustomLogger.async_post_call_success_hook (#19670) 2026-01-26 08:48:22 -08:00
test_prompt_injection_detection.py fix: prompt injection not working (#16701) 2025-11-17 20:04:57 -08:00
test_proxy_track_cost_callback.py [Fix] Enrich failure spend logs with key/team metadata 2026-02-24 17:14:37 -08:00
test_send_invite_email.py Fix User Invite & Key Generation Email Notification Logic (#18524) 2026-01-06 01:35:52 +05:30