Commit graph

33767 commits

Author SHA1 Message Date
Yuneng Jiang
90c0886f5b
chore: fixes 2026-04-04 22:59:18 -07:00
Cursor Agent
81ae6b616a feat(ui): hide agent create/delete controls for non-admin users
Match MCP servers pattern: wrap '+ Add New Agent' button in
isAdmin conditional so internal users see a read-only agents view.
Delete buttons in card and table were already gated.
Update empty-state copy for non-admin users.
Add 7 Vitest tests covering role-based visibility.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-02-27 21:16:15 +00:00
Cursor Agent
e0eda3d981 fix: mock prisma_client in internal user get-agent-by-id test
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-02-27 18:53:28 +00:00
Cursor Agent
f0c22559bd fix: enforce RBAC on agent endpoints — block non-admin create/update/delete
- Add /v1/agents/{agent_id} to agent_routes so internal users can
  access GET-by-ID (previously returned 403 due to missing route pattern)
- Add _check_agent_management_permission() guard to POST, PUT, PATCH,
  DELETE agent endpoints — only PROXY_ADMIN may mutate agents
- Add user_api_key_dict param to delete_agent so the role check works
- Add comprehensive unit tests for RBAC enforcement across all roles

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-02-27 18:51:34 +00: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
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
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
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
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
Sameer Kankute
8d1c75c48a
Merge pull request #22225 from dharamendrak/bugfix/midstream-fallback-error-masks-status-code
[Fix] Enhance MidStreamFallbackError to preserve original status code and attributes
2026-02-27 08:28:54 +05:30
yuneng-jiang
ffc00c0c90 fix: correct _ENDPOINT_METADATA keys to match actual JSON data (a2a, container_files) 2026-02-26 18:30:28 -08:00
yuneng-jiang
86b2efd67a [Feature] Add /public/endpoints endpoint for provider endpoint support
Add new /public/endpoints endpoint that returns which providers support each LiteLLM
endpoint (e.g., chat_completions, embeddings). The endpoint reads from a local backup
JSON file bundled with the package, caches the result in-process, and transforms the
raw provider-centric data into an endpoint-centric response format.

Changes:
- Add litellm/provider_endpoints_support_backup.json (copy of root source file)
- Add Pydantic response models (EndpointProvider, SupportedEndpoint, SupportedEndpointsResponse)
- Add /public/endpoints route with transformation and caching logic
- Add 16 comprehensive tests covering HTTP layer and transformation functions

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-26 18:17:37 -08:00
ryan-crabbe
88ccffccc8
Merge pull request #22247 from BerriAI/litellm_fix_client_closed_on_eviction
fix: remove cache eviction close that kills in-use httpx clients
2026-02-26 18:00:44 -08:00
Ryan Crabbe
df36845839 fix: remove cache eviction close that kills in-use httpx clients 2026-02-26 17:39:01 -08:00
yuneng-jiang
5a95d9beee
Merge pull request #22246 from BerriAI/revert-22238-litellm_supported_endpoints
Revert "[Feature] Add /public/supported_endpoints endpoint"
2026-02-26 17:21:53 -08:00
yuneng-jiang
71c3503e57
Revert "[Feature] Add /public/supported_endpoints endpoint" 2026-02-26 17:21:43 -08:00
yuneng-jiang
0a690a55a9
Merge pull request #22243 from BerriAI/litellm_team_budget_inf_fix
[Fix] Prometheus Metrics Team +Inf Budgets
2026-02-26 17:06:40 -08:00
Ishaan Jaff
48b9ecacad
fix(realtime): fix guardrails not firing for Gemini/Vertex AI and provider_config realtime WebSocket sessions (#22168)
* fix(gemini): enable inputAudioTranscription and handle transcription events for realtime guardrails

Gemini sends inputTranscription/outputTranscription inside serverContent separately from modelTurn/turnComplete. This adds handling to convert them into OpenAI-compatible events so the guardrail pipeline can inspect voice input, and enables inputAudioTranscription in the session setup config.

Made-with: Cursor

* fix(vertex_ai): enable inputAudioTranscription in realtime session config

Add inputAudioTranscription to the Vertex AI realtime setup so the backend returns transcripts of user speech, allowing guardrails to inspect voice input.

Made-with: Cursor

* fix(realtime): pass user_api_key_dict and guardrail metadata through async_realtime handler

The base LLM HTTP handler's async_realtime method was not accepting or forwarding user_api_key_dict and litellm_metadata to RealTimeStreaming. This meant guardrails configured with default_on=false were silently skipped for all provider_config-based realtime connections (Gemini, Vertex AI, etc). Also fixes wss:// connections when SSL_VERIFY=False by overriding ssl=False for secure WebSocket URLs.

Made-with: Cursor

* fix(realtime): forward guardrail metadata for generic provider_config and vertex_ai paths

The _arealtime function was not passing user_api_key_dict or litellm_metadata to base_llm_http_handler.async_realtime() for the generic provider_config path and the vertex_ai-specific path. This broke guardrail resolution since RealTimeStreaming.request_data was empty, causing should_run_guardrail to return False.

Made-with: Cursor

* fix(realtime): voice guardrail responses and block duplicate response.create on text input

When a guardrail blocks voice input, send a conversation.item.create + response.create to the backend so the LLM voices the guardrail message as audio instead of only returning text. Also adds pending_guardrail_message tracking to suppress the automatic response.create the client sends after a blocked text message, and broadens _has_audio_transcription_guardrails to match pre_call/post_call modes.

Made-with: Cursor

* test(realtime): update guardrail tests for broadened audio transcription check and add integration tests

Update existing tests to reflect that pre_call guardrails now correctly trigger the audio/VAD session.update injection. Add integration test file for live OpenAI realtime guardrail testing.

Made-with: Cursor

* fix(realtime): instruct LLM to say exact guardrail message verbatim

The previous prompt gave the LLM creative freedom to paraphrase the guardrail violation message. Now it instructs the LLM to repeat the exact configured message word for word.

Made-with: Cursor

* fix(realtime): preserve wss ssl semantics and move live guardrail test

Keep TLS enabled for wss realtime sessions while honoring SSL_VERIFY=False via a no-verify SSLContext, move the OpenAI live guardrail test into llm_translation, and dedupe duplicated guardrail-detection helpers to prevent drift.

Made-with: Cursor
2026-02-26 17:06:07 -08:00
yuneng-jiang
28c77b48c9 fix +Inf user budget metric when metadata max_budget is None
Same bug as team budget: _assemble_user_object fetched user info from DB
but only used budget_reset_at, discarding max_budget. When the key cache
has a stale None for user_max_budget, _safe_get_remaining_budget returns
+Inf. Now falls back to DB max_budget when metadata value is None.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 16:57:31 -08:00
yuneng-jiang
0e1428b59d remove orphan comment from test file
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-26 16:51:18 -08:00
Ishaan Jaff
9546d9b482
_add_dd_apm_tags_for_litellm_call_id (#22219) 2026-02-26 16:42:23 -08:00
yuneng-jiang
f4e3e016a1 fixing inf budget 2026-02-26 16:30:41 -08:00
yuneng-jiang
d5ef6c7f93
Merge pull request #22238 from BerriAI/litellm_supported_endpoints
[Feature] Add /public/supported_endpoints endpoint
2026-02-26 15:38:29 -08:00
yuneng-jiang
efcc856234 Move provider_endpoints_support.json into litellm package
The file was at the repo root and excluded from pip distributions. Moving it to litellm/proxy/public_endpoints/ alongside the other provider JSON files ensures it is packaged correctly. Updates all references in the endpoint handler, coverage tests, and release notes instructions.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-26 15:15:16 -08:00
yuneng-jiang
33bb798997
Merge pull request #22222 from BerriAI/litellm_key_filter_pagination_fix
[Fix] Virtual Keys pagination displays stale totals when filtering
2026-02-26 15:09:42 -08:00