* [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>
Google announced that Gemini 2.0 Flash and Flash Lite models will be discontinued on March 31, 2026. Updated deprecation_date field for all affected model variants across different providers (vertex_ai, gemini, deepinfra, openrouter, vercel_ai_gateway).
Models updated:
- gemini-2.0-flash (added deprecation date)
- gemini-2.0-flash-001 (updated from 2026-02-05)
- gemini-2.0-flash-lite (added deprecation date)
- gemini-2.0-flash-lite-001 (updated from 2026-02-25)
All variants now correctly reflect the March 31, 2026 shutdown date.
The RAG query endpoint was failing with "Object of type Router is not
JSON serializable" when called through the proxy. This was caused by two
issues:
1. The Router object passed via kwargs was leaking into the request
payload sent to providers like Bedrock, causing JSON serialization
errors.
2. The RAG query pipeline was calling litellm.acompletion() directly
instead of using the router, so virtual model names configured in the
proxy weren't being resolved to actual provider model IDs.
This fix:
- Extracts the router from kwargs and uses router.acompletion() when
available, falling back to litellm.acompletion() otherwise
- Adds "Router" to the list of non-serializable types in
filter_exceptions_from_params as a defensive measure
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Changed initial keyType state to 'llm_api' instead of 'default'
- Updated reset functions (handleOk, handleCancel) to use 'llm_api'
- Updated form initialValue and Select defaultValue to 'llm_api'
Addresses #19492