Commit Graph
35648 Commits
Author SHA1 Message Date
Sameer Kankute 021540b2e2 fix: prevent double prompt management in async path, preserve optional params
- aresponses() now pops prompt_id from kwargs after the async hook runs
  and passes merged_optional_params via _async_prompt_merged_params.
  responses() checks for this internal kwarg first and skips the sync
  hook entirely when present — eliminating double-merge of template
  messages.
- merged_optional_params from async_get_chat_completion_prompt is no
  longer discarded (_); it flows through to local_vars in responses().
- Async tests now assert get_chat_completion_prompt.assert_not_called()
  to directly detect any double-execution regression.

Made-with: Cursor
2026-03-18 17:09:28 +05:30
Sameer Kankute d333dc4077 address greptile review feedback (greploop iteration 1)
- Fix async path: call async_get_chat_completion_prompt in aresponses()
  before executor dispatch, mirroring acompletion() in main.py. Discard
  merged_optional_params in async path (sync responses() handles them
  via local_vars), avoiding TypeError from duplicate kwargs in partial().
- Fix provider re-resolution: replace "/" in model heuristic with
  model != original_model comparison so bare model names are handled.
- Add 3 async tests covering hook invocation, optional param
  propagation, and non-message item filtering in aresponses().

Made-with: Cursor
2026-03-18 16:49:07 +05:30
Sameer Kankute b32f5ea379 Fix greptile comments 2026-03-18 16:37:52 +05:30
Sameer Kankute 35b3ed58a8 Fix greptile review 2026-03-18 16:19:11 +05:30
Sameer Kankute 0d70864d09 Add support for prompt management for responses 2026-03-18 15:48:31 +05:30
Krish DholakiaandGitHub cec3e9e7d4 Merge pull request #23808 from voidborne-d/fix/shared-aiohttp-session-auto-recovery
fix: auto-recover shared aiohttp session when closed
2026-03-17 22:23:01 -07:00
yuneng-jiangandGitHub cfeafbe388 Merge pull request #23921 from BerriAI/litellm_mar17_extras
[Infra] Security and Proxy Extras for Nightly

Only known flaky tests failing. The fix for security and proxy extras worked
v1.82.4-nightly
2026-03-17 18:01:19 -07:00
Krish DholakiaandGitHub 5e570b3a66 Merge pull request #23911 from kelvin-tran/fix/cache-control-params-anthropic-document-file-message-blocks 2026-03-17 18:00:05 -07:00
Krish DholakiaandGitHub 3bd4422a97 Merge pull request #23881 from xianzongxie-stripe/xianzong-upstream-changes 2026-03-17 17:58:36 -07:00
d 🔹 88f59e1465 fix: use AsyncMock for concurrent test consistency
Address review feedback from greptile — use new_callable=AsyncMock
on the concurrent test's patch.object to ensure the mock is properly
typed as async, even though side_effect already handles the coroutine.
2026-03-18 00:54:23 +00:00
Ishaan Jaffer bae2eddd73 docs fix sidebar 2026-03-17 17:50:58 -07:00
Ishaan JaffandGitHub fc315ab4af docs(mcp_zero_trust): add MCP zero trust auth guide (#23918)
* docs(mcp_zero_trust): add MCP zero trust auth guide with hero image

* fix(docs): move hero image to static/img/ for Docusaurus build
2026-03-17 17:45:16 -07:00
yuneng-jiang 62835ff03d adding package-lock 2026-03-17 17:44:01 -07:00
yuneng-jiang 3e2845181c bumping next version 2026-03-17 17:38:09 -07:00
yuneng-jiang cc37bf5934 adding build 2026-03-17 17:37:25 -07:00
yuneng-jiang 9fa1809c30 bump: version 0.4.56 → 0.4.57 2026-03-17 17:37:04 -07:00
yuneng-jiangandGitHub ac0de1d6a2 Merge pull request #23919 from BerriAI/mar17_ver_bump
[Infra] bump: version 1.82.3 → 1.82.4
2026-03-17 17:33:21 -07:00
yuneng-jiang 709581c5f9 bump: version 1.82.3 → 1.82.4 2026-03-17 17:31:45 -07:00
yuneng-jiangandGitHub 195c0ee54d Merge pull request #23917 from BerriAI/litellm_/loving-noyce
[Fix] Add contents:write permission to ghcr_deploy release job
2026-03-17 17:27:36 -07:00
yuneng-jiangandClaude Opus 4.6 b8ffbba352 [Fix] Add contents:write permission to release job in ghcr_deploy workflow
The release job was failing with "Resource not accessible by integration"
because other jobs explicitly set permissions, causing GitHub to scope the
default token down for all jobs. The release job needs contents:write to
create GitHub releases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 17:23:39 -07:00
Kelvin TranandGitHub c6e9a2a40f Merge branch 'main' into fix/cache-control-params-anthropic-document-file-message-blocks 2026-03-17 15:34:00 -07:00
Kelvin Tran d0c5f494a8 fix: cache_control directive dropped anthropic document/file blocks 2026-03-17 14:30:12 -07:00
voidborne-d ca8f5cffa0 style: apply black formatting to fix CI lint check 2026-03-17 18:52:57 +00:00
Xianzong Xieandcodex cb88836486 Add incomplete response error propagation test
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
2026-03-17 11:39:12 -07:00
Xianzong Xieandcodex bd5c39c4d1 Log incomplete details in background streaming
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
2026-03-17 11:35:50 -07:00
Xianzong Xieandcodex 3ff4ac3de3 Capture incomplete terminal error in background streaming
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
2026-03-17 11:21:26 -07:00
d 🔹 ef22144854 address P2 feedback: add lock docstring warning, remove redundant mock write
- Add WARNING docstring to _get_shared_session_lock() about not resetting
  the lock to None while coroutines may be in the recovery path
- Remove redundant proxy_server_module.shared_aiohttp_session assignment
  in mock_init (add_shared_session_to_data overwrites it synchronously)
2026-03-17 18:07:15 +00:00
ryan-crabbeandGitHub ef9cc33ee3 Merge pull request #23822 from BerriAI/litellm_ryan_march_16
Litellm ryan's daily branch march 16
2026-03-17 10:03:01 -07:00
yuneng-jiangandGitHub a622a1fa35 Merge pull request #23827 from BerriAI/litellm_internal_dev_03_16_2026
[Infra] Merge daily dev branch with main
2026-03-17 09:58:06 -07:00
yuneng-jiangandGitHub b4c9c8a9f0 Merge pull request #23868 from BerriAI/revert-22188-litellm_langfuse_key_leakage
Revert "fix: langfuse trace leak key on model params"
2026-03-17 08:58:30 -07:00
yuneng-jiangandGitHub 467706ea30 Revert "fix: langfuse trace leak key on model params" 2026-03-17 08:58:07 -07:00
d 32ecd24116 fix: address P2 review feedback - exception handling and warning accuracy
- Add try/except around _initialize_shared_aiohttp_session call to catch
  and log exceptions (instead of letting them bubble to outer handler)
- Fix warning message when re-checked session is None (was incorrectly
  logging closed session ID on a None session)
- Add debug logging to outer except handler instead of bare pass
- Add test for _initialize_shared_aiohttp_session raising exception
2026-03-17 13:09:26 +00:00
d 🔹 9e09bbc1df fix: reset _shared_session_lock in all tests for event loop isolation
Address Greptile P1 review: tests that exercise the closed-session code
path need to reset the module-level lock to avoid RuntimeError on
Python < 3.10 when asyncio.Lock is reused across different event loops.
2026-03-17 09:54:01 +00:00
voidborne-d ab4fda2eeb fix: add asyncio.Lock to prevent session/connector leak on concurrent recreation
When multiple requests detect a closed shared session simultaneously,
they would each create a new aiohttp.ClientSession, leaking intermediate
sessions and their TCP connectors. Added double-checked locking pattern
with asyncio.Lock to ensure only one coroutine recreates the session.

Added concurrent recreation test case.
2026-03-17 08:08:44 +00:00
yuneng-jiangandGitHub dcbaa0512b Merge pull request #23826 from BerriAI/litellm_yj_march_16_2026
[Infra] Merge personal dev branch with daily dev branch
2026-03-16 23:47:50 -07:00
yuneng-jiangandGitHub ad62071fd3 Merge pull request #22188 from BerriAI/litellm_langfuse_key_leakage
fix: langfuse trace leak key on model params
2026-03-16 23:46:06 -07:00
Ryan Crabbe 302292c805 Merge remote-tracking branch 'origin/main' into litellm_ryan_march_16 2026-03-16 22:51:45 -07:00
ryan-crabbeandGitHub cde28aa018 Merge pull request #23819 from BerriAI/litellm_fix-csv-export
fix(ui): CSV export empty on Global Usage page
2026-03-16 22:46:36 -07:00
yuneng-jiangandGitHub a087c44c95 Merge pull request #23812 from BerriAI/litellm_disable_custom_api_keys
[Feature] Disable Custom Virtual Key Values via UI Setting
2026-03-16 22:37:48 -07:00
Ryan Crabbe c098eca509 fix(ui): CSV export empty on Global Usage page
Aggregated endpoint returns empty breakdown.entities; fall back to
grouping breakdown.api_keys by team_id.
2026-03-16 22:36:23 -07:00
yuneng-jiangandClaude Opus 4.6 471e0f147e [Fix] Remove "API" from custom key description text
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 22:35:44 -07:00
yuneng-jiangandClaude Opus 4.6 0b0fe7e263 [Fix] Rename toggle label to "Disable custom Virtual key values"
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 22:26:53 -07:00
Krish DholakiaandGitHub 245a3d2b26 Revert "docs: add v1.82.3 release notes and update provider_endpoints_support…" (#23817)
This reverts commit 966124966f.
2026-03-16 22:26:45 -07:00
yuneng-jiangandClaude Opus 4.6 c687e631b4 [Feature] Add disable_custom_api_keys toggle to UI Settings page
Adds a toggle switch to the admin UI Settings page so administrators can
enable/disable custom API key values without making direct API calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 22:26:11 -07:00
Joe ReynaandGitHub 966124966f docs: add v1.82.3 release notes and update provider_endpoints_support.json (#23816) 2026-03-16 22:25:55 -07:00
Harshit JainGitHubClaude Haiku 4.5greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
d15c2d546e fix: Register DynamoAI guardrail initializer and enum entry (#23752)
* fix: Register DynamoAI guardrail initializer and enum entry

Fix the "Unsupported guardrail: dynamoai" error by:
1. Adding DYNAMOAI to SupportedGuardrailIntegrations enum
2. Implementing initialize_guardrail() and registries in dynamoai/__init__.py

The DynamoAI guardrail was added in PR #15920 but never properly registered
in the initialization system. The __init__.py was missing the
guardrail_initializer_registry and guardrail_class_registry dictionaries
that the dynamic discovery mechanism looks for at module load time.

Fixes #22773

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Update litellm/proxy/guardrails/guardrail_hooks/dynamoai/__init__.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* Update litellm/proxy/guardrails/guardrail_hooks/dynamoai/__init__.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* test: Add tests for DynamoAI guardrail registration

Verifies enum entry, initializer registry, class registry,
instance creation, and global registry discovery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-16 22:24:29 -07:00
yuneng-jiangandClaude Opus 4.6 72aa5fc219 [Fix] Add disable_custom_api_keys to UISettings Pydantic model
Without this field on the model, GET /get/ui_settings omits the setting
from the response and field_schema, preventing the UI from reading it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 22:10:02 -07:00
yuneng-jiangandClaude Opus 4.6 53d96c8353 [Feature] Disable custom API key values via UI setting
Add disable_custom_api_keys UI setting that prevents users from specifying
custom key values during key generation and regeneration. When enabled, all
keys must be auto-generated, eliminating the risk of key hash collisions
in multi-tenant environments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 21:35:21 -07:00
voidborne-d 7b66c970e9 fix: auto-recover shared aiohttp session when closed (#23806)
When the shared aiohttp session closes (due to network interruption,
idle timeout, or Redis failover side effects), the proxy permanently
falls back to creating a new HTTPS connection per request, losing the
benefit of connection pooling for the entire pod lifetime.

Fix: make add_shared_session_to_data() async and recreate the session
when it is found closed, restoring connection pooling automatically.

Fixes #23806
2026-03-17 03:11:58 +00:00
yuneng-jiangandClaude Opus 4.6 a771fe55e4 [Fix] Update log filter test to match empty-result behavior
The test expected fallback to all logs when backend filters return empty,
but the source was intentionally changed to show empty results instead of
stale data. Updated test to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 18:19:02 -07:00