Commit graph

39980 commits

Author SHA1 Message Date
yuneng-jiang
93faf321df
Merge pull request #25818 from jaydns/fix/custom-code-guardrail-restrictedpython
fix(guardrails): replace custom_code sandbox with RestrictedPython
2026-04-15 16:50:10 -07:00
yuneng-jiang
3f3bfdbe33
Merge pull request #25117 from stuxf/fix/credential-leak-prevention
security: prevent API key leaks in error tracebacks, logs, and alerts
2026-04-15 16:49:44 -07:00
Yuneng Jiang
55f2a898be
[Infra] Remove unused publish_proxy_extras and prisma_schema_sync jobs
publish_proxy_extras is superseded by PyPI trusted publishing (OIDC);
the CircleCI project no longer has PYPI_PUBLISH_* credentials configured.
prisma_schema_sync is a leaf smoke test with no dependents, and db push
against the current schema is already exercised by e2e_ui_testing.
2026-04-15 16:43:30 -07:00
yuneng-jiang
814fa20399
Merge pull request #25814 from BerriAI/litellm_/elastic-zhukovsky
[Refactor] UI - Deleted Keys/Teams: Enterprise notice banner
2026-04-15 16:05:21 -07:00
Yuneng Jiang
42ab3f94ce
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_yj_apr14 2026-04-15 15:59:45 -07:00
Yuneng Jiang
dabf8eaecb
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_/elastic-zhukovsky 2026-04-15 15:55:52 -07:00
harish876
5f99e52fbc Added concurrent index creation. Added necessary disclaimers to index creation.
Index creation is scoped to a single statements and hence
Validated index creation in local env
2026-04-15 22:52:47 +00:00
yuneng-jiang
bf1c52862e
Merge pull request #25819 from BerriAI/litellm_expandCiBranchFilters
[Infra] Expand CI branch filters for non-main PR targets
2026-04-15 15:51:49 -07:00
jayden
469045ba91
fix(guardrails): provide _inplacevar_ to sandbox 2026-04-15 15:45:25 -07:00
Yuneng Jiang
aff4717494
[Infra] Expand CI branch filters for non-main PR targets
Required test-unit-* and related workflows only triggered on PRs targeting
main, so feature PRs routed through litellm_internal_staging or
litellm_oss_branch never dispatched the full suite. Branch protection
reported BLOCKED even when CircleCI was green.

Expand pull_request and push branch filters to also match
litellm_internal_staging, litellm_oss_branch, and "litellm_**" (using **
so branch names containing "/" also match).
2026-04-15 15:39:57 -07:00
jayden
fc9852cea2
fix(guardrails): move test_custom_code_security.py to correct location 2026-04-15 15:27:32 -07:00
jayden
0a1b4427a6
fix(guardrails): replace custom_code sandbox with RestrictedPython 2026-04-15 15:13:52 -07:00
Yuneng Jiang
de7aad9def
[Feature] UI - Deleted Keys/Teams: Add Enterprise notice banner
Show an info banner on the Deleted Keys and Deleted Teams pages for
non-premium users indicating that deleted-record auditing is graduating
from beta into the Enterprise audit & compliance suite.
2026-04-15 13:55:13 -07:00
ishaan-berri
d8ceeb83b7
Merge pull request #25810 from BerriAI/litellm_bedrock_api_response_null_type_handling
bedrock api response null type handling
2026-04-15 13:52:42 -07:00
Ryan Crabbe
18afe6ab64
test(ui): update organization_view tests for useOrganization hook
Replace the organizationInfoCall mock with a vi.mock of the
useOrganizations hook module that stubs useOrganization (and
organizationKeys, which the component still imports for invalidation).
Each test now sets mockUseOrganization.mockReturnValue(...) instead of
mocking the underlying network call, matching the existing pattern in
TeamInfo.test.tsx.

Renders go through the canonical renderWithProviders helper from
tests/test-utils so the component's useQueryClient() call has a
QueryClientProvider in context. This is the standard wrapper used by
~96 other test files in the dashboard.

Fixes "No QueryClient set" failures in the 4 organization_view tests
introduced by the imperative-fetch -> useOrganization migration.
2026-04-15 13:47:13 -07:00
Ryan Crabbe
6e9cbbaad3
refactor(ui): migrate organization view to useOrganization hook
Replace the local orgData/loading useState + fetchOrgInfo useEffect in
OrganizationInfoView with the existing useOrganization(id) React Query
hook, and replace each post-mutation fetchOrgInfo() call with
queryClient.invalidateQueries({ queryKey: organizationKeys.all }).

This makes the org info page benefit from the React Query cache
invalidation already added for team mutations: editing a team's
organization elsewhere now refreshes the org's Teams badge list (and
all other org-derived data) without a hard reload.
2026-04-15 13:25:57 -07:00
Ryan Crabbe
c8496a2767
fix(ui): invalidate organization queries after team mutations
Team create/delete/update can change which teams belong to an organization
(via teamCreateCall, teamDeleteCall, and teamUpdateCall when organization_id
changes). Without invalidating the React Query cache for organizations, the
org info page's teams list and any useOrganizations() consumer (e.g. the
team edit form's organization dropdown) stay stale until a hard reload.

Export organizationKeys from useOrganizations and invalidate
organizationKeys.all after each successful team mutation, matching the
pattern used in hooks/projects, hooks/budgets, and hooks/accessGroups.
2026-04-15 12:55:08 -07:00
Ishaan Jaffer
aaf169c91b
resolve merge conflicts: keep null-safety tests + add L3 regression tests from base 2026-04-15 12:34:39 -07:00
Yuneng Jiang
442a5aea0d
Move Send Invitation Email field under Metadata in both forms 2026-04-15 12:33:12 -07:00
Ryan Crabbe
35559c4d60
fix(ui): use antd Select for MCP ToolTestPanel bool inputs 2026-04-15 12:32:38 -07:00
Yuneng Jiang
a7c947f9dd
Move Send Invitation Email field directly below User Email in both forms 2026-04-15 12:31:23 -07:00
ryan-crabbe-berri
f9bffbb1b7
Merge pull request #25803 from BerriAI/litellm_guardrails-monitor-antd-layout
refactor(ui): reduce Tremor usage in Guardrails Monitor layout
2026-04-15 12:30:58 -07:00
Yuneng Jiang
55829c2254
Render Send Invitation Email as a labeled form item to align with other fields 2026-04-15 12:28:41 -07:00
Yuneng Jiang
fde7c1087a
Move Send Invitation Email checkbox into modal footer, add tests
Place the checkbox inline with the submit button (left-aligned,
vertically centered) in both the embedded and standalone forms.
Add Vitest tests verifying the /user/new payload shape: default true,
false when unchecked, in both form variants, plus an initial-state
check for the modal.
2026-04-15 12:24:41 -07:00
Ishaan Jaffer
98c2d90f5c
fix(logging): update test_get_additional_headers to reflect provider header passthrough 2026-04-15 12:23:33 -07:00
Yuneng Jiang
3ce67bacad
[Feature] UI - Users: add Send Invitation Email toggle to Invite User modal
The Invite User flow was calling /user/new without send_invite_email, so
the backend invitation-email hook (gated on send_invite_email is True)
was silently skipped. Add a checkbox, default on, so admins can opt
out when needed.
2026-04-15 12:16:33 -07:00
Ryan Crabbe
f04a5e7113
fix(ui): render guardrail optional_params bool defaults in Select
The bool branch of the guardrail optional params renderer was using
string values ("true"/"false") for Select.Option, so when the backend
declared a real JS boolean as default_value (e.g. Pillar
include_scanners/include_evidence, IBM block_on_detection), antd's
Form.Item initialValue did not match any Option and the Select
rendered empty. Switching to real boolean Option values lets defaults
flow through unchanged. This matches the sibling fix already applied
in guardrail_provider_fields.tsx for Noma use_v2.
2026-04-15 11:57:52 -07:00
Ryan Crabbe
48aa776032
refactor(ui): use antd grid for guardrails monitor metrics
Replace Tailwind grid wrappers with antd Row/Col in Guardrails Monitor overview and detail metric sections to keep layout primitives consistent with the ongoing antd migration.
2026-04-15 11:34:44 -07:00
Ishaan Jaffer
cc6a33cce4
test(logging): add tests for get_additional_headers header preservation 2026-04-15 11:32:09 -07:00
Ishaan Jaffer
52708300ec
fix(logging): preserve all provider response headers in StandardLoggingPayload
get_additional_headers() was only copying the 4 typed fields from
StandardLoggingAdditionalHeaders, silently dropping everything else —
including llm_provider-x-request-id and other provider-specific headers.

Now it copies all remaining headers verbatim after handling the typed fields.
Fixes #22341
2026-04-15 11:32:06 -07:00
Ishaan Jaffer
fbd15a05f7
fix(types): add missing x_ratelimit_reset_* fields to StandardLoggingAdditionalHeaders 2026-04-15 11:31:58 -07:00
ishaan-berri
fb245b746f
Merge pull request #25801 from BerriAI/litellm_rebuild_ui_cache_breakdown
build(ui): rebuild dashboard for cache token cost breakdown changes
2026-04-15 11:29:04 -07:00
Ishaan Jaffer
31fd681de0
build(ui): rebuild dashboard for cache token cost breakdown changes 2026-04-15 10:46:48 -07:00
ishaan-berri
645e0a7831
Merge pull request #25735 from BerriAI/litellm_bedrock_cache_cost_breakdown
fix(bedrock/anthropic): accurate cache token cost breakdown in UI and SpendLogs
2026-04-15 10:44:37 -07:00
Ryan Crabbe
b599c8bfd4
refactor(ui): reduce Tremor usage in Guardrails Monitor layout
Move Guardrails Monitor overview/detail layout wrappers and section heading components to antd/plain Tailwind while keeping the existing Tremor chart and date picker behavior unchanged for a smaller, low-risk migration step.
2026-04-15 10:39:25 -07:00
Yuneng Jiang
922c6174fa
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_bedrock_cache_cost_breakdown 2026-04-15 10:37:47 -07:00
Yuneng Jiang
eba43b5c04
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_migration_projects
Some checks failed
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py, 30, 8) (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled
2026-04-15 10:14:06 -07:00
Yuneng Jiang
ff5bd43b0f
Point contributors toward litellm_oss_branch in guard error messages 2026-04-15 09:52:24 -07:00
Yuneng Jiang
d9b89bc2ca
Also reject PRs from forks, not just non-allowlisted branches 2026-04-15 09:52:24 -07:00
Yuneng Jiang
a305eb866a
[Infra] Guard main branch with PR source-branch check
Adds a GHA that fails PRs to main unless the head branch is
'litellm_internal_staging' or 'litellm_hotfix_*'. Also fails merge_group
events since merge queue is not in use.
2026-04-15 09:52:24 -07:00
Yuneng Jiang
557accbb2a
bump: version 1.83.7 → 1.83.8 2026-04-15 09:52:24 -07:00
joereyna
571faae0ed
fix(ci): increase test-server-root-path timeout to 30m 2026-04-15 09:52:24 -07:00
joereyna
213b1ea0b4
fix: remove non-existent litellm_mcps_tests_coverage from coverage combine 2026-04-15 09:52:24 -07:00
shivam
5af74b6930
docs update 2026-04-15 09:52:24 -07:00
Yuneng Jiang
1e50925d9b
[Test] add request-body mock test for bedrock gpt-oss tool schema
Complements the stubbed-out live integration test by verifying the
outgoing Bedrock Converse request body for GPT-OSS is well-formed when
the caller supplies a tool schema with OpenAI-style metadata
($id, $schema, additionalProperties, strict):
- correct converse URL for bedrock/converse/openai.gpt-oss-20b-1:0
- toolConfig.tools[0].toolSpec has the expected name/description
- inputSchema.json keeps type/properties/required and strips fields
  Bedrock does not accept
2026-04-15 09:52:24 -07:00
Yuneng Jiang
c8a94ff1ec
[Test] stub flaky bedrock gpt-oss function-calling stream test
GPT-OSS on Bedrock intermittently emits truncated toolUse.input deltas
(e.g. accumulated args of '{"":"'), causing
test_function_calling_with_tool_response to hard-fail on json.loads.
The model flakiness is not a litellm regression: the same base test
passes for Anthropic in the same CI run, and the streaming delta path
at invoke_handler.py has not changed recently.

Follow the existing override pattern in TestBedrockGPTOSS
(test_prompt_caching, test_completion_cost, test_tool_call_no_arguments)
and stub the test to pass. The underlying bedrock converse streaming
tool-call path is already covered by Claude/Nova/Llama Converse suites
in test_bedrock_completion.py and test_bedrock_llama.py, so removing
the live GPT-OSS check loses no unique litellm-side signal.
2026-04-15 09:52:24 -07:00
Yuneng Jiang
be9053d957
[Test] mark bedrock gpt-oss function-calling stream test flaky
Bedrock GPT-OSS occasionally emits truncated toolUse.input deltas
(e.g. accumulated args of '{"":"'), which causes
test_function_calling_with_tool_response to hard-fail on json.loads.
Other overrides in TestBedrockGPTOSS already handle similar
model-side flakiness; apply retries=6 delay=5 scoped to this subclass
so other providers keep strict behavior.
2026-04-15 09:52:24 -07:00
shivam
19070d326d
update 2026-04-15 09:52:24 -07:00
shivam
2933b213db
fallbacks image 2026-04-15 09:52:24 -07:00
Yuneng Jiang
641a377d05
[Fix] Test - Together AI: replace deprecated Mixtral with serverless Qwen3.5-9B
Mixtral-8x7B-Instruct-v0.1 is no longer on Together AI's serverless tier
and now requires a dedicated endpoint, causing multiple tests to fail in CI:

  - test_together_ai.py::TestTogetherAI::test_empty_tools
  - test_completion.py::test_completion_together_ai_stream
  - test_completion.py::test_customprompt_together_ai
  - test_completion.py::test_completion_custom_provider_model_name
  - test_text_completion.py::test_async_text_completion_together_ai

Qwen/Qwen3.5-9B is currently serverless on Together AI and supports
function calling, satisfying BaseLLMChatTest capability requirements.
2026-04-15 09:52:24 -07:00