litellm/tests/test_litellm/proxy/hooks
Sameer Kankute 63022fa0f4
fix(proxy): map stripped batch body.model to proxy alias for auth (#29264)
* fix(proxy): map stripped batch body.model to proxy alias for auth

replace_model_in_jsonl rewrites JSONL body.model to the provider id before
upload; batch file access checks must resolve that id back to model_name
so keys granted the proxy alias are not rejected with 403.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(proxy): surface resolved proxy alias in batch file 403 detail

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
(cherry picked from commit 70d2748d80)
2026-06-03 22:52:22 +00:00
..
test_async_post_call_streaming_iterator_hook.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_batch_file_validation.py fix(proxy): map stripped batch body.model to proxy alias for auth (#29264) 2026-06-03 22:52:22 +00:00
test_dynamic_rate_limiter_v3.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_image_generation_guardrails.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_key_management_event_hooks.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_max_budget_limiter.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07: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 [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
test_post_call_failure_hook_integration.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_post_call_response_headers_hook.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_post_call_streaming_hook_integration.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_post_call_success_hook_integration.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_prompt_injection_detection.py fix: prompt injection not working (#16701) 2025-11-17 20:04:57 -08:00
test_proxy_hooks_init.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
test_proxy_track_cost_callback.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
test_rate_limiter_toctou.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
test_send_invite_email.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00