litellm/tests/test_litellm/proxy
Krish Dholakia 32013f63a0
Guardrail API - support tool call checks on OpenAI /chat/completions, OpenAI /responses, Anthropic /v1/messages (#17459)
* fix(unified_guardrail.py): correctly map a v1/messages call to the anthropic unified guardrail

* fix: add more rigorous call type checks

* fix(anthropic_endpoints/endpoints.py): initialize logging object at the beginning of endpoint

ensures call id + trace id are emitted to guardrail api

* feat(anthropic/chat/guardrail_translation): support streaming guardrails

sample on every 5 chunks

* fix(openai/chat/guardrail_translation): support openai streaming guardrails

* fix: initial commit fixing output guardrails for responses api

* feat(openai/responses/guardrail_translation): handler.py - fix output checks on responses api

* fix(openai/responses/guardrail_translation/handler.py): ensure responses api guardrails work on streaming

* test: update tests

* test: update tests

* fix: support multiple kinds of input to the guardrail api

* feat(guardrail_translation/handler.py): support extracting tool calls from openai chat completions for guardrail api's

* feat(generic_guardrail_api.py): support extracting + returning modified tool calls on generic_guardrails_api

allows guardrail api to analyze tool call being sent to provider - to run any analysis on it

* fix(guardrails.py): support anthropic /v1/messages tool calls

* feat(responses_api/): extract tool calls for guardrail processing

* docs(generic_guardrail_api.md): document tools param support

* docs: generic_guardrail_api.md

improve documentation
2025-12-03 21:20:39 -08:00
..
_experimental/mcp_server Fix: litellm user auth not passing issue 2025-12-02 11:25:32 +05:30
agent_endpoints fix mypy linting 2025-12-03 19:43:29 -08:00
anthropic_endpoints
auth Ruff checks 2025-12-03 11:01:10 -08:00
client [Feat] AI Gateway Auth - Allow using JWTs for signing in with Proxy CLI (#16756) 2025-11-17 19:47:29 -08:00
common_utils Refactor add_schema_to_components to move definitions to components/schemas and add corresponding unit test (#17389) 2025-12-02 21:57:07 -08:00
db Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-24 21:14:05 -08:00
discovery_endpoints Change is_sso_configured to auto_redirect_to_sso 2025-12-03 15:48:50 -08:00
experimental/mcp_server
google_endpoints test google endpoints 2025-10-31 20:50:31 -07:00
guardrails Guardrail API - support tool call checks on OpenAI /chat/completions, OpenAI /responses, Anthropic /v1/messages (#17459) 2025-12-03 21:20:39 -08:00
health_endpoints Add Langfuse OTEL and SQS to health check (#16514) 2025-11-12 18:25:30 -08:00
hooks [Bug Fix] Parallel Request Limiter with /messages (#17426) 2025-12-03 14:13:28 -08:00
image_endpoints test fix 2025-10-17 10:46:42 -07:00
management_endpoints Merge remote-tracking branch 'origin' into litellm_user_info_404 2025-12-03 11:02:23 -08:00
management_helpers
middleware
openai_files_endpoint
pass_through_endpoints Add passthrough cost tracking for veo 2025-12-01 14:33:03 +05:30
prompts TestPromptVersionsEndpoint 2025-11-21 16:21:13 -08:00
public_endpoints Change provider create fields to JSON (#16985) 2025-11-23 21:57:22 -08:00
response_api_endpoints [Fix] - Responses API - add /openai routes for responses API. (Azure OpenAI SDK Compatibility) (#15988) 2025-10-27 19:12:13 -07:00
spend_tracking Merge remote-tracking branch 'origin' into litellm_org_usage 2025-11-20 20:19:16 -08:00
test_configs
ui_crud_endpoints [Infra] Litellm Backend SSO Changes (#16029) 2025-10-30 14:32:08 -07:00
vector_store_endpoints [Bug fix] Vector Store List Endpoint Returns 404 (#17229) 2025-11-27 12:51:51 -08:00
__init__.py test fix 2025-10-17 10:46:42 -07:00
test_batch_metadata_none_fix.py
test_caching_routes.py
test_common_request_processing.py Revert "fix: respect guardrail mock_response during during_call to return blo…" (#17332) 2025-12-01 15:40:28 -08:00
test_custom_proxy.py fix(ui/): fix routing for custom server root path (#15701) 2025-10-23 13:59:29 -07:00
test_enforce_user_param.py Enforce support of enforce_user_param to openai post endpoints 2025-12-03 12:19:21 +05:30
test_fastapi_offline_routes.py
test_health_check_functions.py
test_litellm_pre_call_utils.py Fix key model alias (#16896) 2025-11-20 16:05:49 -08:00
test_model_id_header_propagation.py (fix) propagate x-litellm-model-id in responses (#16986) 2025-11-24 20:40:43 -08:00
test_proxy_cli.py
test_proxy_server.py V2 login route 2025-12-03 12:41:45 -08:00
test_proxy_types.py
test_proxy_utils.py fix(ui/): fix routing for custom server root path (#15701) 2025-10-23 13:59:29 -07: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