Remove /v1/chat/completions and /v1/responses from supported_endpoints
and revert the audio model detection change since gpt-realtime-1.5 does
not go through Chat Completions.
gpt-realtime-1.5 supports Chat Completions with audio params but
is_model_gpt_audio_model only checked for "audio" in the model name.
Add "realtime" check so the audio parameter is passed through correctly.
New OpenAI realtime model released 2026-02-23. Adds pricing and capability
metadata for gpt-realtime-1.5 (32K context, 4K output, audio/image/text I/O).
Unlike gpt-realtime, this model also supports Chat Completions and Responses
endpoints (not just WebSocket).
Closes#22266
In a multi-worker Uvicorn setup, a client that reconnects to a different
worker sends an mcp-session-id that the new worker has never seen. The
MCP SDK returns 400 because the session is unknown.
Fix: add _handle_stale_mcp_session() which inspects the inbound
mcp-session-id header before the request reaches the SDK. If the
session is not in this worker's _server_instances:
- Non-DELETE: strip the header so the SDK creates a fresh session
- DELETE: return 200 immediately (idempotent, session already gone)
No new dependencies, no Redis, no latency added to the hot path.
Fixes https://github.com/BerriAI/litellm/issues/20992
* [Docs] Enable local file support
Implemented internal handling for converting file-type documents to the required format for OCR processing, ensuring seamless integration with various providers.
* Refactor OCR file handling and improve security checks
Removed deprecated MIME type mapping and file conversion functions, replacing them with updated implementations. Enhanced security by rejecting 'file' document types in JSON requests, ensuring file uploads are handled via multipart/form-data. Updated tests to reflect these changes and ensure proper functionality.
* Enhance MIME type validation in OCR processing
Added a regular expression check to validate MIME types in the convert_file_document_to_url_document function, raising a ValueError for invalid types. Updated tests to ensure proper error handling for unsupported MIME types.
* Enhance type safety in OCR file handling
Added type casting for the uploaded file in the _parse_multipart_form function to ensure proper handling of UploadFile instances. This change improves type safety and reduces potential runtime errors during file processing.
* Refactor MIME type handling in document uploads
Updated the MIME type extraction logic to strip parameters from the Content-Type header, ensuring only the base type is used. Added tests to verify that MIME parameters are correctly handled and stripped in various scenarios.
* Update OCR documentation for MIME type recommendations and remove unnecessary tips
Clarified the recommended usage of MIME types for raw bytes in document uploads. Simplified the documentation by removing the tip about multipart file uploads from tools like Postman, ensuring a more concise and focused guide.
* Enhance multipart form handling in OCR endpoints
Updated the _parse_multipart_form function to ignore both 'file' and 'document' fields during form parsing, ensuring that the document built from the uploaded file is not overridden. Added a new test to verify that injected document fields do not affect the constructed document, improving security and robustness of the file upload process.
Extend the null normalization to access_model_names, access_mcp_server_ids,
and access_agent_ids in addition to assigned_team_ids and assigned_key_ids.
Writing null for non-optional list fields causes ValidationError on read.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a client sends null for assigned_team_ids or assigned_key_ids, ensure
the DB receives [] instead of null, preventing null from being stored where
empty list is expected. Extend test to verify the DB call uses [].
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
set(None) raises TypeError when a client sends null for assigned_team_ids or
assigned_key_ids. Add `or []` to handle null safely, consistent with create.
Add test covering this case.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Initialize teams_to_add/teams_to_remove/keys_to_add/keys_to_remove before
the try block in update_access_group for defensive clarity
- In delete_access_group, update teams/keys returned by find_many directly
(data already fetched) and use _sync_remove only for out-of-sync entities
not found by the hasSome query, eliminating N+1 find_unique calls
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Eliminates TOCTOU race where existing record was read outside the
transaction, allowing a concurrent update to make delta computation stale.
Delta is now computed atomically within the same transaction as the write.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When creating, updating, or deleting access groups, automatically keep
team and key access_group_ids in sync with the access group's assigned_team_ids
and assigned_key_ids. Includes transaction-based DB updates, cache patching,
and handles out-of-sync data by unioning assigned_* fields with hasSome queries.
Adds 12 new tests covering sync behavior across all three CRUD operations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a new CircleCI job that runs the proxy with --use_prisma_db_push
against the base Neon branch before the e2e UI tests create their
branches from it, ensuring the schema is synced on the parent.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>