Commit graph

39980 commits

Author SHA1 Message Date
Yuneng Jiang
3ac0d7c88c
[Fix] Let setSecureItem propagate storage errors to callers
Remove the silent try/catch from setSecureItem so OAuth hooks can
surface actionable "enable storage" guidance instead of a cryptic
"state lost" error after the round-trip. Add a local try/catch in
ChatUI where the storage write is non-critical.
2026-04-09 23:58:35 -07:00
yuneng-jiang
f9dc5f5ad3
Update docker/Dockerfile.custom_ui
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-04-09 23:58:35 -07:00
Yuneng Jiang
a29e2eea62
[Fix] Address review feedback on storage utility and Dockerfiles
- Dockerfile.health_check: HEALTHCHECK now verifies the script is intact
  instead of unconditionally exiting 0
- secureStorage.ts: replace deprecated escape/unescape with
  encodeURIComponent/decodeURIComponent; don't delete legacy values on
  decode failure so in-flight flows can time out naturally
- OAuth callback: add same-origin check before redirecting to stored
  return URL
2026-04-09 23:58:35 -07:00
Yuneng Jiang
20bd668bfa
fix(docker): add non-root USER and HEALTHCHECK to Dockerfile.custom_ui
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 23:58:35 -07:00
Yuneng Jiang
9baf586791
[Fix] UI: resolve CodeQL security alerts and Dockerfile.health_check hardening
Port security fixes from litellm_v1.82.3.dev.6:
- Use secureStorage (sessionStorage wrapper) instead of raw storage for tokens
- Add URL validation for stored worker URLs to prevent open redirects
- Add same-origin checks before redirecting to stored return URLs
- Harden Dockerfile.health_check with non-root user and exec-form HEALTHCHECK
2026-04-09 23:58:35 -07:00
Chetan Soni
422b7b3357
feat(mcp): add per-user OAuth token storage for interactive MCP flows 2026-04-09 23:58:35 -07:00
joereyna
148dd7096c
format vertex test file 2026-04-09 23:58:35 -07:00
joereyna
7a482a83ab
fix(test): mock headers in test_completion_fine_tuned_model 2026-04-09 23:58:35 -07:00
Krrish Dholakia
a6d81e1575
docs: add Docker Image Security Guide for cosign verification and deployment best practices (#25439)
- New doc page covering all signed image variants, verification commands,
  CI/CD enforcement (K8s Sigstore Policy Controller, GCP Binary Authorization,
  AWS/EKS, GitHub Actions), digest pinning, and safe upgrade patterns
- Added to sidebar under Setup & Deployment
- Cross-linked from the existing deploy.md cosign section

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
2026-04-09 23:58:35 -07:00
harish876
af4d4ab2ee Introduced Content-Length response headers into the streaming response. This provides a 1:1 behaviour mapping similar to the non streaming behaviour. 2026-04-10 06:54:08 +00:00
Yuneng Jiang
2e0af3795a
fix(e2e): broaden Copy Key button regex to match both modal versions
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, 20, 8) (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled
On case-sensitive Linux CI, the old regenerate_key_modal.tsx from main
can coexist with the new RegenerateKeyModal.tsx after merge. The old
modal renders "Copy Virtual Key" while the new one renders "Copy Key".
Use /Copy.*Key/ to match both.
2026-04-09 23:36:35 -07:00
Yuneng Jiang
89320a955c
fix(e2e): remove flaky banner check and increase regenerate key timeout 2026-04-09 23:21:01 -07:00
yuneng-jiang
5666ed04ca
Merge pull request #25475 from BerriAI/litellm_harden_skill_file_paths
[Fix] Harden file path resolution in skill archive extraction
2026-04-09 23:00:57 -07:00
Yuneng Jiang
9a4f5d7316
fix: remove unnecessary f-string prefix in SQL query 2026-04-09 22:47:13 -07:00
Yuneng Jiang
820b45784c
Merge remote-tracking branch 'origin/main' into litellm_harden_skill_file_paths 2026-04-09 22:46:23 -07:00
Yuneng Jiang
6a15adcd64
fix: harden file path resolution in skill archive extraction 2026-04-09 21:59:23 -07:00
Yuneng Jiang
e828a91eee
[Docs] Add missing MCP per-user token env vars to config_settings
MCP_PER_USER_TOKEN_DEFAULT_TTL and MCP_PER_USER_TOKEN_EXPIRY_BUFFER_SECONDS
were added in #25441 but not documented, causing test_env_keys.py to fail.
2026-04-09 21:49:06 -07:00
joereyna
b7d7b93eb9
fix(responses-ws): use urllib.parse to append model param, fix test mocking 2026-04-09 21:49:06 -07:00
joereyna
1264bf3f8e
fix(responses-ws): append ?model= to backend WebSocket URL 2026-04-09 21:49:06 -07:00
Yuneng Jiang
236bb4f59f
address greptile review feedback (greploop iteration 1)
Remove leftover 10000ms per-test timeout in add_model_tab.test.tsx that was
missed in the initial sweep. The test now inherits the 30000ms global.
2026-04-09 21:49:06 -07:00
Yuneng Jiang
06f3679778
[Test] UI - Unit tests: raise global vitest timeout and remove per-test overrides
Raise vitest testTimeout from 10s to 30s and drop per-test timeout overrides
across UI unit tests. Group CreateUserButton and TeamInfo tests under nested
describe blocks to make the most flaky suites easier to scan.
2026-04-09 21:49:06 -07:00
Yuneng Jiang
df3ddd7a81
[Fix] Let setSecureItem propagate storage errors to callers
Remove the silent try/catch from setSecureItem so OAuth hooks can
surface actionable "enable storage" guidance instead of a cryptic
"state lost" error after the round-trip. Add a local try/catch in
ChatUI where the storage write is non-critical.
2026-04-09 21:49:06 -07:00
yuneng-jiang
4e068718c9
Update docker/Dockerfile.custom_ui
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-04-09 21:49:06 -07:00
Yuneng Jiang
464c98878e
[Fix] Address review feedback on storage utility and Dockerfiles
- Dockerfile.health_check: HEALTHCHECK now verifies the script is intact
  instead of unconditionally exiting 0
- secureStorage.ts: replace deprecated escape/unescape with
  encodeURIComponent/decodeURIComponent; don't delete legacy values on
  decode failure so in-flight flows can time out naturally
- OAuth callback: add same-origin check before redirecting to stored
  return URL
2026-04-09 21:49:06 -07:00
Yuneng Jiang
4272d80c83
fix(docker): add non-root USER and HEALTHCHECK to Dockerfile.custom_ui
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:49:06 -07:00
Yuneng Jiang
a12ba1f4d1
[Fix] UI: resolve CodeQL security alerts and Dockerfile.health_check hardening
Port security fixes from litellm_v1.82.3.dev.6:
- Use secureStorage (sessionStorage wrapper) instead of raw storage for tokens
- Add URL validation for stored worker URLs to prevent open redirects
- Add same-origin checks before redirecting to stored return URLs
- Harden Dockerfile.health_check with non-root user and exec-form HEALTHCHECK
2026-04-09 21:49:06 -07:00
Chetan Soni
8dc5ab39f0
feat(mcp): add per-user OAuth token storage for interactive MCP flows 2026-04-09 21:49:06 -07:00
joereyna
f8ae642736
format vertex test file 2026-04-09 21:49:06 -07:00
joereyna
fb527ae250
fix(test): mock headers in test_completion_fine_tuned_model 2026-04-09 21:49:06 -07:00
Yuneng Jiang
d4288b4ff4
ci: fix LITELLM_LICENSE interpolation in e2e_ui_testing
Remove LITELLM_LICENSE from the run step's environment block — YAML
environment maps may pass the literal string "${LITELLM_LICENSE}" instead
of interpolating the project env var, overriding it with a value that
fails license validation. The project-level env var is inherited
automatically by the proxy process.
2026-04-09 21:45:34 -07:00
Ryan Crabbe
26e99f22b3
refactor: consolidate route auth for UI and API tokens
Unify UI and API token authorization through the shared RBAC path
and backfill missing routes in role-based route lists.
2026-04-09 21:36:35 -07:00
yuneng-jiang
9e6d2d2069
Merge pull request #25468 from BerriAI/litellm_/compassionate-shannon
[Test] UI - Unit tests: raise global vitest timeout and remove per-test overrides
2026-04-09 21:35:43 -07:00
Yuneng Jiang
9071dbba12
fix(ui): remove leftover setIsOwnKey call after state removal 2026-04-09 21:24:22 -07:00
yuneng-jiang
cc43d09d79
Potential fix for pull request finding 'CodeQL / Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-09 21:19:02 -07:00
Yuneng Jiang
c7f610c57e
Merge remote-tracking branch 'origin/main' into litellm_/compassionate-shannon 2026-04-09 21:15:03 -07:00
Yuneng Jiang
71640f062c
Merge remote-tracking branch 'origin/main' into litellm_regen_key_modal_antd 2026-04-09 21:14:57 -07:00
yuneng-jiang
42e5583788
Merge pull request #25471 from BerriAI/litellm_doc_mcp_per_user_token_env_vars
[Docs] Add missing MCP per-user token env vars to config_settings
2026-04-09 21:13:10 -07:00
Yuneng Jiang
ee374c4884
ci: pass LITELLM_LICENSE to e2e_ui_testing proxy
Key regeneration is an enterprise feature — without LITELLM_LICENSE the
endpoint returns a 403 and the Playwright test for "Regenerate key"
never sees the success view. Other CircleCI jobs already pass this
secret; the e2e_ui_testing job was missing it.
2026-04-09 21:09:29 -07:00
Yuneng Jiang
ce0b57b4ff
[Docs] Add missing MCP per-user token env vars to config_settings
MCP_PER_USER_TOKEN_DEFAULT_TTL and MCP_PER_USER_TOKEN_EXPIRY_BUFFER_SECONDS
were added in #25441 but not documented, causing test_env_keys.py to fail.
2026-04-09 21:04:34 -07:00
yuneng-jiang
1214dc93b3
Merge pull request #25467 from jaydns/fix/parameterize-combined-view-query
fix(proxy): use parameterized query for combined_view token lookup
2026-04-09 21:03:24 -07:00
yuneng-jiang
9b33d9d427
Merge pull request #25445 from jaydns/fix/proxy-input-validation
fix(proxy): improve input validation on management endpoints
2026-04-09 21:02:52 -07:00
Yuneng Jiang
d0168bcff1
ci: retrigger e2e 2026-04-09 20:57:03 -07:00
Yuneng Jiang
92dbd2c491
address greptile review feedback (greploop iteration 1)
Remove leftover 10000ms per-test timeout in add_model_tab.test.tsx that was
missed in the initial sweep. The test now inherits the 30000ms global.
2026-04-09 20:54:36 -07:00
yuneng-jiang
aa0fa104ba
Merge pull request #25437 from joereyna/litellm_fix_responses_websocket_model_query_param
fix(responses-ws): append ?model= to backend WebSocket URL
2026-04-09 20:46:47 -07:00
Yuneng Jiang
3a316b9131
[Test] UI - Unit tests: raise global vitest timeout and remove per-test overrides
Raise vitest testTimeout from 10s to 30s and drop per-test timeout overrides
across UI unit tests. Group CreateUserButton and TeamInfo tests under nested
describe blocks to make the most flaky suites easier to scan.
2026-04-09 20:42:30 -07:00
Yuneng Jiang
1d50f774e2
fix(ui): support all duration suffixes in regenerate expiry preview
calculateNewExpiryTime only handled s/h/d, but the grace-period
validation and backend accept m, w, and mo as well. Entering any of
those in the Expire Key field caused the function to return null,
which then propagated as expires: null in the onKeyUpdate payload —
the parent UI would then render the expiry as "Never" even though
the backend had correctly applied the new expiry.

Extend the suffix check to cover s/m/h/d/w/mo, matching "mo" before
"m" so "1mo" isn't misread as minutes. Also nullish-coalesce the
call site so an unparseable duration falls back to the previous
expiry instead of null. Add parametric tests for each supported
suffix plus a regression test for the null fallback.
2026-04-09 20:31:35 -07:00
Yuneng Jiang
f95ef935ef
fix(ui): prefer form values over API echo in regenerate update payload
The regenerate endpoint returns a GenerateKeyResponse that inherits
max_budget/tpm_limit/rpm_limit from KeyRequestBase, so the API echoes
the existing values back. The previous updatedKeyData layout spread
...response *after* the explicit formValues assignments, which meant
the user's just-submitted edits were silently overwritten by the API
echo before being propagated to the parent via onKeyUpdate.

Reorder so the response spread comes first and the formValues-derived
fields override it, and add a regression test that mocks a response
with stale limits to lock the behavior in. Also drop the two leftover
debug console.log statements.
2026-04-09 20:25:10 -07:00
Yuneng Jiang
839d9bd5f3
refactor(ui): polish regenerate key success view
- Label the key block with a small "Virtual Key" caption so the gray
  box is clearly the key container.
- Move the Copy Key action to the modal footer as a primary button
  with icon; inline copy icon next to the key is removed.
- Swap the button to "Copied" with a check icon on success instead of
  firing a notification — less noisy and keeps feedback in place.
- Disable clicking outside the modal to close (maskClosable=false) so
  users must explicitly dismiss via Close or X.
- Enlarge the key text and let its container span the full modal
  width.
- Tests updated accordingly, including a new test for the copied-state
  swap and the "Virtual Key" label.
2026-04-09 20:14:01 -07:00
jayden
4dc416ee74
fix(proxy): use parameterized query for combined_view token lookup 2026-04-09 20:10:40 -07:00
yuneng-jiang
ce75598f97
Merge pull request #25384 from BerriAI/litellm_/bold-pare
[Fix] UI: improve storage handling and Dockerfile consistency
2026-04-09 19:55:24 -07:00