Commit graph

33783 commits

Author SHA1 Message Date
Yuneng Jiang
02eede00dc
chore: fixes 2026-04-04 22:56:59 -07:00
Cursor Agent
013962891c Add UI dashboard test instructions to AGENTS.md and dev_config.yaml for proxy testing
Co-authored-by: Shivam Rawat <shivamrawat1@users.noreply.github.com>
2026-02-27 19:57:16 +00:00
Cesar Garcia
ea5d551525
Merge pull request #22304 from Chesars/feat/add-gpt-realtime-1.5-model
feat(models): add gpt-realtime-1.5 to model cost map
2026-02-27 16:38:16 -03:00
Cesar Garcia
d8fa43a0cc
Merge pull request #22303 from Chesars/feat/add-gpt-audio-1.5-model
feat(models): add gpt-audio-1.5 to model cost map
2026-02-27 16:37:31 -03:00
ryan-crabbe
dc97e2f714
Merge pull request #22306 from BerriAI/tests/add_llmclientcache_regression_tests
Add LLMClientCache regression tests for httpx client eviction safety
2026-02-27 11:21:38 -08:00
yuneng-jiang
98e944c0cf
Merge pull request #22253 from BerriAI/litellm_access_group_sync
[Feature] Access group CRUD: Bidirectional team/key sync
2026-02-27 11:14:46 -08:00
Ryan Crabbe
ad9c70ec5d Add LLMClientCache regression tests for httpx client eviction safety
Regression tests for PR #22247 — ensures cache eviction (capacity and TTL)
does not close httpx clients that are still in use.
2026-02-27 11:14:13 -08:00
Chesars
1ca4dd8542 fix: gpt-audio-1.5 only supports /v1/chat/completions endpoint 2026-02-27 16:11:15 -03:00
Chesars
da73e54b1b fix: gpt-realtime-1.5 only supports /v1/realtime endpoint
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.
2026-02-27 16:10:01 -03:00
Chesars
c7ab631bb0 fix(audio): detect gpt-realtime models as audio-capable for 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.
2026-02-27 16:06:10 -03:00
Chesars
1f887547f6 feat(models): add gpt-realtime-1.5 to model cost map
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
2026-02-27 16:01:09 -03:00
Gaurav Singh
29bb73ffca
fix(mcp): strip stale mcp-session-id header to prevent 400 in multi-worker deployments (#20992) (#21417)
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
2026-02-27 10:59:08 -08:00
Chesars
1144d05cba feat(models): add gpt-audio-1.5 to model cost map
New OpenAI audio model released 2026-02-23. Adds pricing and capability
metadata for gpt-audio-1.5 (128K context, 16K output, audio I/O).

Closes #22269
2026-02-27 15:57:56 -03:00
Noah Nistler
d13508c1c5
Enable local file support for OCR (#22133)
* [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.
2026-02-27 10:50:02 -08:00
Sameer Kankute
adb9d94833
Merge pull request #22293 from BerriAI/litellm_27_02_lock2
Fix: poetry lock
2026-02-27 21:40:18 +05:30
Sameer Kankute
3bec6f5a9a Fix: poetry lock 2026-02-27 21:39:32 +05:30
Sameer Kankute
ec8aaa9d2f
Merge pull request #22155 from BerriAI/litellm_fix_image
[Bug]Add ChatCompletionImageObject in OpenAIChatCompletionAssistantMessage
2026-02-27 21:18:55 +05:30
Sameer Kankute
63c9b3a137
Merge pull request #22087 from BerriAI/litellm_fix_anthropic_responses
Add v1 for anthropic responses transformation
2026-02-27 21:18:04 +05:30
Sameer Kankute
547e84418e
Merge pull request #22258 from BerriAI/litellm_fix_free_models
Fix free models working from UI
2026-02-27 21:17:06 +05:30
Sameer Kankute
e583489abe
Merge pull request #22260 from BerriAI/litellm_Fix_tool_pass
[Fix]Preserve forwarding server side called tools
2026-02-27 21:16:56 +05:30
Sameer Kankute
f297036401
Merge pull request #22267 from BerriAI/litellm_fixParallel_tool_cal
Fix converse handling for parallel_tool_calls
2026-02-27 21:16:44 +05:30
Harshit Jain
e575b80f01
Merge pull request #21930 from Harshit28j/litellm_fix_index_query_call
perf(spendlogs): optimize old spendlog deletion cron job
2026-02-27 19:39:05 +05:30
Sameer Kankute
39e0fa9ea9
Merge pull request #22223 from emerzon/feat/vertex-gemini-3-1-flash-image-preview-pricing
feat(vertex): add gemini-3.1-flash-image-preview to model DB
2026-02-27 18:10:04 +05:30
Harshit Jain
d8b134d781
Merge pull request #22216 from BerriAI/litellm_project_tags_handle
feat: add tags in project
2026-02-27 15:48:32 +05:30
Harshit28j
72d7f64345 fix: relevant comment req changes 2026-02-27 13:52:50 +05:30
Harshit28j
a9d0e2cf91 fix: req changes 2026-02-27 13:33:34 +05:30
Sameer Kankute
2fa9b81e2f Add docs for opt out variable 2026-02-27 13:28:48 +05:30
Sameer Kankute
99c62ca40e Add opt out varible for v1/messages to responses 2026-02-27 13:26:31 +05:30
Sameer Kankute
33e6b9c67d
Merge branch 'main' into litellm_fixParallel_tool_cal 2026-02-27 13:01:54 +05:30
Sameer Kankute
d0445e1e33 Fix converse handling for parallel_tool_calls 2026-02-27 13:00:57 +05:30
Sameer Kankute
3369cd9d5d
Merge pull request #22265 from BerriAI/revert-21659-litellm_fix_converse_disable_tool
Revert "Fix mapping of parallel_tool_calls for bedrock converse"
2026-02-27 12:45:20 +05:30
Sameer Kankute
8565c70e53
Revert "Fix mapping of parallel_tool_calls for bedrock converse" 2026-02-27 12:45:08 +05:30
Sameer Kankute
596437b3b9 Add Regression tests for image_url blocks in assistant message content. 2026-02-27 12:04:12 +05:30
Sameer Kankute
6b9ec4247f Preserve forwarding server side called tools 2026-02-27 11:31:45 +05:30
yuneng-jiang
aaf0570f22 fix: normalize null to [] for all Optional[List[str]] fields in update_data
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>
2026-02-26 21:02:12 -08:00
yuneng-jiang
cde23e9b6e fix: normalize null list fields to [] in update_data before DB write
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>
2026-02-26 20:53:30 -08:00
yuneng-jiang
a732c3f177
Merge pull request #22248 from BerriAI/litellm_public_endpoints
[Feature] Add /public/endpoints for provider endpoint support
2026-02-26 20:49:44 -08:00
yuneng-jiang
2144e79bad fix: guard against null assigned_*_ids in update_access_group delta computation
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>
2026-02-26 20:48:04 -08:00
yuneng-jiang
06c90ecf62
Update litellm/proxy/public_endpoints/public_endpoints.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-26 20:42:47 -08:00
Sameer Kankute
577f703769 Register custom pricing in litellm.model_cost 2026-02-27 10:12:03 +05:30
yuneng-jiang
57c5efc785 refactor: initialize delta vars before try block and avoid redundant find_unique on delete
- 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>
2026-02-26 20:39:57 -08:00
Sameer Kankute
d9af321610 Fix free models working from UI 2026-02-27 10:08:44 +05:30
yuneng-jiang
7e2f5b7c5b
Merge pull request #22255 from BerriAI/litellm_e2e_fix_feb26
[Infra] Adding agent_id to Delete Keys Table
2026-02-26 20:31:17 -08:00
yuneng-jiang
1e82ec6448 adding build 2026-02-26 20:30:10 -08:00
yuneng-jiang
ee7b73764c bump: version 0.4.48 → 0.4.49 2026-02-26 20:29:43 -08:00
yuneng-jiang
fd58c8c060
Merge pull request #22251 from BerriAI/litellm_circleci_prisma_sync
[Infra] Add prisma_schema_sync step as prerequisite for e2e UI tests
2026-02-26 20:24:56 -08:00
yuneng-jiang
2d9ba674ec fix: move update_access_group find_unique inside transaction
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>
2026-02-26 20:14:54 -08:00
yuneng-jiang
516b18feca [Feature] Access group CRUD: Add bidirectional sync for teams/keys
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>
2026-02-26 20:07:51 -08:00
yuneng-jiang
369c0ec392 [Infra] Add prisma_schema_sync CircleCI job before e2e UI tests
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>
2026-02-26 20:03:25 -08:00
yuneng-jiang
fc69d6e8d1 fix: add 12 missing endpoint keys to _ENDPOINT_METADATA, fix stale _schema keys in backup JSON 2026-02-26 19:18:17 -08:00