litellm/tests/test_litellm/proxy
jquinter f43757f71b
Feature/guardrail model argument (#19619)
* [Feat] Add model parameter to Generic Guardrail API

Add model information to guardrail requests, allowing guardrails to make
model-specific security decisions.

Changes:
- Add `model` field to GenericGuardrailAPIInputs TypedDict
- Add `model` field to GenericGuardrailAPIRequest Pydantic model
- Update OpenAI and Anthropic handlers to pass model from request/response
- Add unit tests for model parameter handling

* [Feat] Add model parameter to all guardrail_translation handlers

Extend model parameter support to all guardrail handlers for consistent
implementation across all endpoint types:
- OpenAI Responses API (input/output + streaming)
- OpenAI Image Generation (input only)
- OpenAI Text Completion (input/output)
- OpenAI Text-to-Speech (input only)
- OpenAI Audio Transcription (output only)
- Cohere Rerank (input only)
- Pass-through Endpoints (input/output)
- MCP Server (input only)

This addresses the review feedback requesting consistent model parameter
handling across all guardrail_translation/handler.py files.

---------

Co-authored-by: Igal Boxerman <igal@pillar.security>
2026-01-23 20:48:42 -08:00
..
_experimental/mcp_server fix(mcp): forward static_headers to MCP servers (#19341) (#19366) 2026-01-21 19:30:55 -08:00
agent_endpoints chore: resolve ModuleNotFoundError for Microsoft Foundry Agents (#18991) 2026-01-17 04:56:52 +05:30
anthropic_endpoints
auth [Fix] Password comparison with non-ASCII characters (#19559) (#19568) 2026-01-23 20:27:42 -08:00
client
common_utils fix: ensure auto-rotation updates existing AWS secret instead of creating new one (#19455) 2026-01-20 18:30:36 -08:00
db
discovery_endpoints
experimental/mcp_server
google_endpoints fix(utils.py): correctly extract messages from google genai contents (#19156) 2026-01-19 06:00:23 -08:00
guardrails Feature/guardrail model argument (#19619) 2026-01-23 20:48:42 -08:00
health_endpoints
hooks feat: hashicorp vault rotate support 2026-01-23 17:32:55 +09:00
image_endpoints
management_endpoints fix #19620: SSO user roles are not updated for existing users (#19621) 2026-01-23 09:05:29 -08:00
management_helpers
middleware
openai_files_endpoint Add managed files support when load_balancing is True 2026-01-19 15:54:04 +05:30
pass_through_endpoints Merge pull request #19638 from BerriAI/main 2026-01-23 14:54:17 +05:30
policy_engine [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
prompts fix(prompts): fix prompt info lookup and delete using correct IDs (#19358) 2026-01-20 12:28:34 -08:00
public_endpoints /public/model_hub health information 2026-01-16 15:36:56 -08:00
response_api_endpoints
spend_tracking
test_configs
ui_crud_endpoints feat: support role_mappings from environment variables (#19498) 2026-01-23 19:54:23 -08:00
vector_store_endpoints Fix: vector store sync issues 2026-01-19 13:17:08 +05:30
__init__.py
conftest.py
test_batch_metadata_none_fix.py
test_caching_routes.py
test_common_request_processing.py
test_custom_proxy.py
test_empty_model_list.py Fixing tests and linting 2026-01-21 11:02:39 -08:00
test_enforce_user_param.py
test_fallback_management_endpoints.py
test_fastapi_offline_routes.py
test_health_check_functions.py
test_litellm_pre_call_utils.py [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
test_model_id_header_propagation.py
test_proxy_cli.py attempt fix flaky tests 2026-01-23 12:10:08 -08:00
test_proxy_server.py Adding scope to /models 2026-01-21 16:40:31 -08:00
test_proxy_types.py
test_proxy_utils.py Fix date overflow/division by zero in proxy utils (#19527) 2026-01-21 21:09:57 -08:00
test_route_llm_request.py
test_shared_health_check.py
test_spend_log_cleanup.py
test_swagger_chat_completions.py
test_team_member_update.py