Commit Graph
34679 Commits
Author SHA1 Message Date
Sameer KankuteandGitHub 28b312f87a Merge pull request #22382 from davidvpe/add-gemini-3.1-flash-image-preview
[Feature] Add Gemini 3.1 Flash Image Preview pricing details
2026-03-09 09:02:31 +05:30
yuneng-jiangandGitHub 160e2d9642 Merge pull request #23098 from BerriAI/litellm_org_admin_team_fix
[Fix] UI - Agents: fix stale test assertions after AgentsPanel table refactor
2026-03-07 23:51:04 -08:00
yuneng-jiang 81b223138a fix(test): update agents.test.tsx for AgentsPanel table refactor
AgentsPanel no longer renders AgentCardGrid — it uses a Table directly.
The two tests that looked for agent-card-grid are updated to instead verify
the Actions column header appears for admins and is absent for non-admins.
2026-03-07 23:50:06 -08:00
yuneng-jiangandGitHub 5acb25fd9e Merge pull request #23095 from BerriAI/litellm_org_admin_add_user_e2e
[Feature] Org Admin Access to Team Management Endpoints
2026-03-07 23:29:38 -08:00
yuneng-jiangandClaude Opus 4.6 3a1ac964f7 fix: pass organization_ids=None in get_users test calls
When calling get_users() directly (not via FastAPI), Query() defaults
are not resolved. Pass organization_ids=None explicitly to avoid
'Query' object has no attribute 'split' error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-07 23:15:16 -08:00
yuneng-jiangandClaude Opus 4.6 70066426d0 fix: missing closing paren in agent_endpoints get_agents Query()
The `health_check` Query() call was missing its closing parenthesis,
causing a SyntaxError that blocked all proxy_server imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-07 23:13:42 -08:00
yuneng-jiangandClaude Opus 4.6 ac5128493e fix: repair test regressions from org admin auth changes
- test_get_users_*: pass proxy admin user_api_key_dict since get_users
  now calls _authorize_user_list_request which checks user_role
- test_validate_team_member_add_permissions_non_admin: set
  organization_id on mock team since _is_user_org_admin_for_team
  accesses it

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-07 23:10:53 -08:00
yuneng-jiangandClaude Opus 4.6 063198cf8e fix: push org filter into DB query for /team/list, fix agents.tsx build
- _authorize_and_filter_teams now uses Prisma WHERE clause
  (organization_id IN ...) instead of fetching the full team table
- Add missing Switch import in agents.tsx (pre-existing build error)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-07 23:04:08 -08:00
yuneng-jiang 8f33983389 Merge remote-tracking branch 'origin' into litellm_org_admin_add_user_e2e 2026-03-07 22:58:57 -08:00
yuneng-jiangandClaude Opus 4.6 f77b5a24c3 fix: resolve ruff PLR0915 and F401 lint errors
Extract _authorize_user_list_request and _authorize_and_filter_teams
helpers to reduce statement count in get_users and list_team. Remove
unused _is_user_team_admin import.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-07 22:49:26 -08:00
yuneng-jiangandClaude Opus 4.6 ce317148b9 feat: org admin access to team management — backend auth, UI visibility, tests
- Add _is_user_org_admin_for_team() reusable helper to common_utils.py
- Grant org admins access to /team/list, /team/info, /team/member_add,
  /team/member_delete, /team/member_update, /team/model/add,
  /team/model/delete, /team/permissions_list, /team/permissions_update
- Make validate_membership async with org admin fallback
- Add /user/list to self_managed_routes (endpoint handles own auth)
- UI: org admins see Members, Member Permissions, Settings tabs in team view
- UI: CreateUserButton uses useOrganizations() for org dropdown
- UI: org admin delete-member respects disable_team_admin_delete_team_user
- Add 16 unit tests for _is_user_org_admin_for_team, validate_membership,
  _user_is_org_admin route check, and privilege escalation prevention

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-07 22:43:09 -08:00
yuneng-jiangandClaude Sonnet 4.6 8bf3c0c67f fix: org admin invite user — multi-org selector, organizations list in POST body, auth check
- Thread org objects {organization_id, organization_alias} instead of bare IDs from
  users/page.tsx → view_users.tsx → CreateUserButton so the selector can show aliases
- Replace single-select org dropdown with multi-select; always shown when organizationIds
  is non-null; disabled/pre-selected for single-org admins; displays "Alias (id)"
- handleCreate: maps organization_ids → organizations before POST, removes redundant
  organizationMemberAddCall (backend _add_user_to_organizations handles it)
- _user_is_org_admin: also checks organizations list field in addition to singular
  organization_id so /user/new succeeds for org admins
- Add 5 backend unit tests for _user_is_org_admin and 2 frontend tests for new form behavior

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 20:34:12 -08:00
yuneng-jiangandClaude Sonnet 4.6 67884c279a fix: allow any authenticated user to call /user/available_roles
Org admins and team admins opening the invite-user modal could not see
the 4 global proxy roles because GET /user/available_roles has no
request body, so the org-admin route check (which requires
organization_id in the payload) always returned False and blocked them.

Add /user/available_roles to self_managed_routes so the route-access
check passes for any authenticated user. The endpoint's existing
Depends(user_api_key_auth) still requires a valid API key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 20:11:35 -08:00
1c3787264b fix(bedrock): strip output_config from Bedrock Invoke requests (#23042)
* fix(bedrock): strip output_config from Bedrock Invoke requests

Bedrock Invoke API does not support the output_config parameter
(added to Anthropic Messages API). Requests with output_config cause
400 errors: 'extraneous key [output_config] is not permitted'.

Strip output_config in both Bedrock Invoke transformation layers
(messages and chat), consistent with how output_format is already
handled and how VertexAI strips both parameters.

Fixes: https://github.com/BerriAI/litellm/issues/22797

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* test(bedrock): add output_config test for chat/invoke path

Addresses review feedback — the chat/invoke_transformations path now has
symmetric test coverage matching the messages/invoke_transformations path.

Fixes: https://github.com/BerriAI/litellm/issues/22797

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: giulio-leone <6887247+giulio-leone@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-07 19:33:53 -08:00
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
e156507ca7 chore: regenerate poetry.lock to match pyproject.toml (#23088)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-08 03:30:22 +00:00
Joshua BronsonandGitHub 5801f0b97f Don't pin to exact versions of optional deps (#23052) 2026-03-07 19:29:36 -08:00
52ae17746b docs: link dynamic TPM/RPM limiting to request prioritization doc (#22988)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-03-07 19:27:41 -08:00
cf439c269c Agents - add max budget + tpm/rpm limiting per agent AND per agent session (#22849)
* feat: enforce x-litellm-trace-id in header, if required

* feat: update spend for agent

* refactor: update agent table to follow similar format as other entities - also add a spend column - allows us to see spend of an agent

* fix: cleanup ui

* feat: return spend on agent endpoints

* feat: scope pr

* feat(agents/): support budgets + rate limiting on agents + agent sessions

* fix: address PR review feedback

- Add missing tpm_limit, rpm_limit, session_tpm_limit, session_rpm_limit
  columns to root schema.prisma to match proxy and extras schemas
- Add backwards-compatible fallback to key metadata for max_iterations
  so existing users don't silently lose enforcement

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

* fix: qa'ed RPM limiting on agents

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 19:12:42 -08:00
Krish DholakiaGitHubCursor AgentClaude Opus 4.6greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
03ca98123f Agents health checks (#23044)
* feat: add health check toggle to agents page

Backend:
- Add health_check query parameter to GET /v1/agents endpoint
- When health_check=true, performs concurrent GET requests to each agent's
  URL and filters out agents with unreachable URLs (5s timeout)
- Agents returning HTTP <500 are considered healthy; 5xx and connection
  errors mark agents as unhealthy

UI:
- Add Health Check toggle (Switch) to agents panel header
- Toggle triggers re-fetch with health_check=true, filtering the agent list
- Icon color changes (green/gray) to indicate toggle state
- Tooltip explains behavior: 'only agents with reachable URLs are shown'

Networking:
- Update getAgentsList to accept optional healthCheck boolean parameter

Tests:
- Backend: 9 new tests covering health check filtering, _check_agent_url_health
  helper (no URL, 200, 404, 500, connection error cases)
- UI: 3 new tests verifying toggle renders, initial fetch without health check,
  and fetch with health check after toggle click

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>

* fix: fix greptile comment re: security issue

* fix: fix based on greptile feedback

* fix: align health check tests with implementation

- Rename test_should_return_unhealthy_when_no_url to
  test_should_return_healthy_when_no_url (implementation returns
  healthy=True for agents without a URL)
- Patch get_async_httpx_client instead of httpx.AsyncClient so mocks
  actually intercept the HTTP calls made by _check_agent_url_health
- Remove unnecessary __aenter__/__aexit__ context-manager mocks

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

* chore: undo _experimental/out renames from cherry-pick

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

* Update litellm/proxy/agent_endpoints/endpoints.py

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

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-07 18:32:47 -08:00
yuneng-jiangandGitHub 0a0c0d8017 Merge pull request #23080 from BerriAI/litellm_org_admin_invite_users
[Feature] UI - Internal Users: Allow Org Admins to View and Invite Users
2026-03-07 18:31:38 -08:00
e7714f0ce6 Fix CVEs: bump tar/minimatch/pypdf + harden Docker SBOM patching (#23082)
* fix(docker): bump tar/minimatch/pypdf for CVE fixes + harden SBOM patching

- Bump tar 7.5.8→7.5.10, minimatch 10.2.1→10.2.4, pypdf 6.6.2→6.7.3
- Add sed-based SBOM metadata patching with properly indented find/sed
- Add npm package manager cleanup (apk del / apt-get purge) to remove
  stale SBOM entries from image scanners
- Scope || true to only apk del via brace grouping { ... || true; }
- Guard npm root -g with non-empty assertion to prevent silent failures
- Scope minimatch sed regex to ^10.x to avoid matching other major versions

Addresses: CVE-2026-27903, CVE-2026-27904, GHSA-qffp-2rhf-9h96, CVE-2026-27888

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

* fix(docker): scope find to /usr/local/lib /usr/lib, drop autoremove

- Replace `find /` with `find /usr/local/lib /usr/lib` to avoid
  traversing /proc, /sys, /dev during SBOM metadata patching
- Remove `apt-get autoremove -y` from Debian-based Dockerfiles to
  prevent nodejs from being removed as an auto-installed dependency

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:31:27 -08:00
yuneng-jiangandClaude Opus 4.6 fd29d15a64 fix: use comma-separated organization_ids param instead of repeated query params
UI sends organization_ids=org1,org2,org3 and backend parses the
comma-separated string, matching the existing pattern used elsewhere.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:30:59 -08:00
yuneng-jiangandClaude Opus 4.6 41d89ab84e fix: address review feedback for org admin user management
- Backend authorization: enforce server-side org scoping on /user/list.
  Non-proxy-admin callers must be org_admin; their permitted org IDs are
  fetched from the DB and intersected with any requested org filter.
- Race condition: gate userListQuery on org data being loaded for
  non-proxy-admin users (undefined = loading, null = no filter needed).
- Silent failure: surface organizationMemberAddCall errors via
  NotificationsManager instead of only console.error.
- Multi-org: org admins managing multiple orgs can choose which org to
  add the new user to via a dropdown (defaults to first org).
- Change organization_id param to List[str] (repeated query params)
  instead of comma-separated string.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 18:28:01 -08:00
yuneng-jiangandGitHub 9e531195ec Merge pull request #23057 from BerriAI/litellm_fix_user_filter_scope
[Fix] User Filter Scope - Make Org-Scoping Opt-In
2026-03-07 18:22:26 -08:00
yuneng-jiangandGitHub ec9791f72b Merge pull request #23085 from BerriAI/litellm_fix_team_info_test
[Fix] UI - Team: TeamInfo Virtual Keys Test Assertions
2026-03-07 18:20:09 -08:00
yuneng-jiangandClaude Haiku 4.5 efcde74711 fix(test): update TeamInfo virtual keys tests for removed member count display
Updates two tests in TeamInfo.test.tsx that were asserting for "X Members" text that was removed from the TeamVirtualKeysTable component in commit ec4ef9c924.

- Changed test "should display X Members in Virtual Keys tab when navigated to" to assert for pagination controls instead
- Changed test "should show Filters and pagination controls in Virtual Keys tab" to wait for Filters button instead of member count

All 29 tests now pass.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-07 18:10:49 -08:00
yuneng-jiangandClaude Opus 4.6 bd9fe1cd63 fix: improve error messages and extract helper to fix C901 complexity
- Extract _resolve_org_filter_for_user_search and _resolve_team_org_filter
  helpers from ui_view_users to bring complexity under the ruff C901 limit.
- Fix misleading error when a team admin searches but team has no org:
  now says "this team is not part of an organization" instead of the
  generic "only admins can search" message.
- Add distinct errors for team-not-found and not-a-team-admin cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:56:49 -08:00
Ishaan JaffandGitHub fc81edc4c4 revert: undo PR #22589 and follow-up vertex anyOf fixes (#23083)
* Revert "fix(vertex): drop bare {} schemas from anyOf before adding nullable=True (#23060)"

This reverts commit 3ad9a536d3.

* Revert "Merge pull request #22589 from Chesars/fix/vertex-preserve-any-type-schema"

This reverts commit da941e4261, reversing
changes made to f77f28a5f8.
2026-03-07 17:49:49 -08:00
yuneng-jiangandGitHub 906288a1b2 Merge pull request #23065 from BerriAI/litellm_fix_team_scoped_virtual_keys
fix: scoping virtual keys in the teams view to be applying the team filter
2026-03-07 17:43:25 -08:00
yuneng-jiangandClaude Opus 4.6 cb7da3044d feat: allow org admins to view Internal Users page and invite users
Org admins can now see the Internal Users page in the left nav, view
users scoped to their organization(s), and invite new users who are
automatically added to the org. Proxy admins remain unaffected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:40:29 -08:00
Ishaan JaffandGitHub 2b8db87a35 fix(pass_through): inject cost into Anthropic streaming chunks + fix SSE parsing in tests (#23078)
streaming_handler.py: EndpointType.ANTHROPIC was missing from the cost
injection block — only VERTEX_AI was handled, so Anthropic passthrough
streaming never got cost injected into message_delta chunks even with
include_cost_in_streaming_usage: true.

test_anthropic_passthrough.py: AnthropicResponsesStreamWrapper yields
full multi-line SSE frames as single bytes objects (e.g.
"event: message_delta\ndata: {...}\n\n"). The tests were checking
startswith('data: ') on the whole chunk, which starts with 'event:',
so every message_delta event was silently skipped. Fix: split each chunk
by \n before checking for the data: prefix. Also removes the
@pytest.mark.skip added with wrong diagnosis on the OpenAI model test.
2026-03-07 17:27:51 -08:00
yuneng-jiangandGitHub d1abe15bbe Merge pull request #23067 from BerriAI/litellm_fix_e2e_create_key
[Fix] Flaky E2E Tests for Create Key and Auth Redirect
2026-03-07 17:07:23 -08:00
Ishaan JaffandGitHub 517a929ccd fix(streaming): return None from count_reasoning_tokens when no reasoning content found (#23076)
Prevents spurious reasoning_tokens=0 from being injected into
completion_tokens_details for non-reasoning models (e.g. gpt-4o-audio-preview).

Previously count_reasoning_tokens always returned int (defaulting to 0),
so the if reasoning_tokens is not None guard in calculate_usage always
fired and wrote reasoning_tokens=0 into completion_tokens_details even
when the model never emitted any reasoning content. This caused
stream_chunk_builder to produce a usage dict with an extra
reasoning_tokens=0 field that was not in the original streaming chunk,
breaking the equality assertion in test_stream_chunk_builder_openai_audio_output_usage.

Fix: return Optional[int] -- None means no reasoning content seen,
0 means reasoning_content was present but counted zero tokens.
2026-03-07 17:03:53 -08:00
ryan-crabbeandGitHub ada8877aeb Merge pull request #23074 from BerriAI/litellm_fix_member_count_tests
tests: update tests to not assert member count text
2026-03-07 17:01:19 -08:00
Ishaan JaffandGitHub a30b71c946 fix(tests): generate square PNG in image_url fixture for DALL-E 2 variation test (#23073)
DALL-E 2 create_variation requires a square PNG. The old fixture fetched
the LiteLLM logo from S3 which is non-square, causing API rejections.
Replace with a programmatically-generated 1024x1024 RGBA PNG via Pillow.
2026-03-07 16:58:27 -08:00
Ryan Crabbe ec4ef9c924 tests: update tests to not assert member count text because we removed that from this view 2026-03-07 16:56:15 -08:00
Ishaan JaffandGitHub 34984d22ae fix(test): update openrouter image generation assertion for gemini-2.5-flash-image (#23070)
* fix(anthropic/skills): remove ?beta=true query param from Skills API URLs

Beta access is controlled via the anthropic-beta header (already set
to skills-2025-10-02), not a URL query param. The spurious ?beta=true
was causing 500 errors from Anthropic's server.

* fix(test): update openrouter image generation assertion to accept any image format

gemini-2.5-flash-image returns JPEG, not PNG. The assertion was hardcoded
to png after the model was swapped from gemini-2.5-flash-image-preview
(which returned PNG) in commit 34e8e972.
2026-03-07 16:52:04 -08:00
Ishaan JaffandGitHub 7f6adf2e1a fix(anthropic/skills): remove ?beta=true query param from Skills API URLs (#23069)
Beta access is controlled via the anthropic-beta header (already set
to skills-2025-10-02), not a URL query param. The spurious ?beta=true
was causing 500 errors from Anthropic's server.
2026-03-07 16:46:26 -08:00
yuneng-jiangandClaude Opus 4.6 08e2ec3412 Fix flaky e2e tests by using regex selectors
The createKey test broke because the Models field changed from required
to optional (PR #22826), removing the asterisk from the accessible name.
The unauthenticated redirect test broke because the login URL now
includes a redirect_to query param. Both selectors now use regex to be
resilient to these kinds of changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:43:33 -08:00
Ishaan JaffandGitHub 66c822435e fix(ci): image variation openai sdk 2.24.0 compat + swap bedrock nova-premier to nova-pro (#23066)
* fix(ci): fix image variation test for openai sdk 2.24.0 and swap nova-premier to nova-pro

image_gen_tests: openai==2.24.0 (bumped Feb 25) requires BytesIO objects to have
a .name attribute for MIME type detection in multipart uploads. Add .name to the
fixture so create_variation works. Also guard with OPENAI_API_KEY skipif.

proxy_e2e_anthropic_messages_tests: nova-premier requires provisioned throughput
not available via standard on-demand cross-region inference on the CI account.
Swap to nova-pro which uses standard inference profiles.

* fix: remove skipif, keep only .name fix for openai sdk compat
2026-03-07 16:41:54 -08:00
Ryan Crabbe 2cd0c767ee fix: regression test 2026-03-07 16:40:29 -08:00
yuneng-jiangandClaude Opus 4.6 c11477fb6f fix: add 10-minute TTL to UI settings cache and refresh on GET
All async_set_cache calls for UI settings now use a 600s TTL so entries
auto-expire in multi-instance deployments without Redis. The GET
/ui_settings endpoint also refreshes the cache after reading from DB,
ensuring the admin who just toggled the flag sees fresh values propagated
to other code paths immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:25:52 -08:00
Ryan Crabbe daf7c0c3a8 fix: scoping virtual keys in the teams view to be applying the team filter globally instead of an or branch 2026-03-07 16:23:12 -08:00
Ishaan JaffandGitHub e8a7116899 fix(tests): fix repeating chunk and audio usage streaming tests (#23061)
- Replace ModelResponse(stream=True) with ModelResponseStream in
  test_unit_test_custom_stream_wrapper_repeating_chunk — stream=True
  stores delta as a plain dict causing AttributeError in CustomStreamWrapper
- Accept MidStreamFallbackError alongside InternalServerError in the
  repeating-chunk safety check assertion
- Add @pytest.mark.flaky(retries=3) to the live OpenAI audio output
  usage test
2026-03-07 16:18:51 -08:00
Ishaan JaffandGitHub a50a84c16c fix(tests): update redaction assertion + remove flaky qwen3 streaming test (#23062)
test_standard_logging_payload_audio: the response field in standard_logging_object
is now a ModelResponse choices dict (since d84e5e381a), not {text: redacted-by-litellm}.
Update both audio and non-audio variants to check choices[0].message.content instead.
Audio is still correctly redacted - the new code creates a fresh ModelResponse with no
audio field, so audio bytes never appear in the payload.

test_partner_models_httpx_streaming: remove qwen3-coder-480b (us-south1) from the
parametrize list - same treatment as llama-4-scout which was removed earlier.
The endpoint is unavailable in CI and the test has been consistently failing.
2026-03-07 16:07:14 -08:00
Ishaan JaffandGitHub 3ad9a536d3 fix(vertex): drop bare {} schemas from anyOf before adding nullable=True (#23060)
When anyOf contains a mix of concrete types, bare {} (any-type), and null,
convert_anyof_null_to_nullable was adding nullable=True to the {} entry,
producing {nullable: True} with no type field. Gemini rejects this as an
anyOf entry without a concrete type, breaking tool calls that use
Optional[List[...]] or similar union types (common in LangChain/Pydantic).

Fix: strip any-type schemas from anyOf before the nullable=True pass.
If only any-type schemas remain after null removal (anyOf: [{}, null]),
collapse the anyOf entirely and set nullable=True on the parent schema
instead — correctly representing 'any nullable value' for Gemini.

Regression introduced by da941e4261.
2026-03-07 15:59:10 -08:00
Ishaan JaffandGitHub 15cc641b7e fix: sync poetry.lock with pyproject.toml (litellm-proxy-extras 0.4.51 → 0.4.52) (#23059)
poetry.lock was regenerated for 0.4.51 but pyproject.toml was subsequently
bumped to 0.4.52 without re-running poetry lock. This caused the
proxy_e2e_azure_batches_tests CI job to fail at the Install Dependencies step
('pyproject.toml changed significantly since poetry.lock was last generated'),
preventing all 3 tests in that job from running.
2026-03-07 15:58:33 -08:00
Ishaan JaffandGitHub 4a14683c7e fix: guard prisma import in config_override_endpoints (#23058)
* fix: guard prisma import in config_override_endpoints to fix proxy import without prisma

Top-level `from prisma.errors import RecordNotFoundError` was introduced in the
Hashicorp Vault feature PR and breaks `import litellm.proxy.proxy_server` when
prisma is not installed (e.g. plain `pip install litellm[proxy]` in CI).

Wraps the import in try/except ImportError so the module loads cleanly when
prisma is absent; the except branch aliases RecordNotFoundError to Exception,
which is safe because the code path that catches it only logs a debug message.

* fix: sync poetry.lock with pyproject.toml (litellm-proxy-extras 0.4.51 → 0.4.52)

poetry.lock was regenerated for 0.4.51 but pyproject.toml was subsequently
bumped to 0.4.52 without re-running poetry lock. This caused the
proxy_e2e_azure_batches_tests CI job to fail at the Install Dependencies step
('pyproject.toml changed significantly since poetry.lock was last generated'),
preventing all 3 tests in that job from running.

* Revert "fix: sync poetry.lock with pyproject.toml (litellm-proxy-extras 0.4.51 → 0.4.52)"

This reverts commit 249ec7c9c2.
2026-03-07 15:57:57 -08:00
yuneng-jiangandClaude Opus 4.6 af61132a3f refactor: use DualCache for UI settings reads and get_team_object for team lookup
- Add get_ui_settings_cached() helper that reads from DualCache first,
  falls back to DB, and populates cache on miss.
- Update update_ui_settings() to set cache after DB write so subsequent
  reads see new values immediately.
- Replace raw prisma_client.db.litellm_teamtable.find_unique with the
  existing get_team_object helper which uses DualCache.
- Update all tests to mock get_ui_settings_cached and get_team_object
  instead of raw DB calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:56:43 -08:00
ryan-crabbeandGitHub 0790163396 Merge pull request #23056 from BerriAI/litellm_fix_team_member_count
fix member count being on an irrelevant page
2026-03-07 15:42:24 -08:00