Commit graph

36764 commits

Author SHA1 Message Date
shreyes19
75438ac19a docs: add LITELLM_CORS_ORIGINS and LITELLM_CORS_ALLOW_CREDENTIALS to env vars reference 2026-04-11 23:04:32 +05:30
shreyes19
f686d33408 refactor: extract _get_cors_config() for testability, fix no-op CORS tests 2026-04-11 22:24:04 +05:30
shreyes19
e01fe01d35 fix: address Greptile P1 review comments 2026-04-11 21:57:03 +05:30
shreyes19
519095bfe5 test: add structural proxy_server CORS invariant test (Greptile review feedback)
Add test_proxy_server_cors_invariant which directly imports and checks the
module-level origins and allow_cors_credentials variables in proxy_server.py.
This catches any future drift between the mirror helper and the real code.
2026-04-11 21:13:04 +05:30
shreyes19
e079ee779f fix: harden CORS, create_views exception handling, and spend log cleanup loop
- proxy_server.py: disable allow_credentials when allow_origins=['*'] (wildcard
  + credentials is a browser security misconfiguration). Add LITELLM_CORS_ORIGINS
  env var to configure explicit allowed origins.
- create_views.py: narrow broad 'except Exception' to only catch genuine
  'view does not exist' errors; re-raise all other DB errors (auth, connection,
  etc.) that were previously silently swallowed.
- spend_log_cleanup.py: validate execute_raw() return type is int before using
  it as a deletion count; break loop safely on unexpected types to prevent
  infinite deletion loops.
2026-04-11 18:58:04 +05:30
Krrish Dholakia
4e12d3c562
docs: document april townhall announcements (#25537)
Some checks are pending
CodeQL / Analyze (actions) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
CodSpeed Benchmarks / benchmarks (push) Waiting to run
Helm unit test / unit-test (push) Waiting to run
Read Version from pyproject.toml / read-version (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
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) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Waiting to run
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) Waiting to run
Unit Tests: Security / security (push) Waiting to run
GitHub Actions Security Analysis / zizmor (push) Waiting to run
* docs: document april townhall announcements

* docs: cleanup blog post
2026-04-10 16:12:06 -07:00
yuneng-jiang
d67b5f8b08
Merge pull request #25526 from BerriAI/litellm_yj_04_09_2026
[Infra] Merge Dev Branch with Main
2026-04-10 15:30:23 -07:00
yuneng-jiang
f2f2a91a29
Merge pull request #25480 from BerriAI/litellm_/eloquent-allen
[Fix] Flush Tremor Tooltip timers in user_edit_view tests
2026-04-10 15:11:27 -07:00
yuneng-jiang
9e4352afb4
Merge pull request #25528 from BerriAI/yj_bump_10
bump: version 1.83.5 → 1.83.6
2026-04-10 13:28:51 -07:00
Yuneng Jiang
1f148ea6a1
bump: version 1.83.5 → 1.83.6 2026-04-10 13:20:58 -07:00
yuneng-jiang
193a57b5d2
Merge pull request #25478 from BerriAI/litellm_align_list_response_field_handling
[Fix] Align v1 guardrail and agent list responses with v2 field handling
2026-04-10 13:12:17 -07:00
yuneng-jiang
576e6a06e3
Merge pull request #25517 from BerriAI/litellm_bedrock-messages-cache-prompt-double-count
fix(bedrock): avoid double-counting cache tokens in Anthropic Messages streaming usage
2026-04-10 12:54:59 -07:00
yuneng-jiang
ec524a0e7a
Merge pull request #25513 from BerriAI/litellm_fix_ws_duplicate_kwarg
[Fix] Responses WebSocket Duplicate Keyword Argument Error
2026-04-10 12:41:15 -07:00
Sameer Kankute
f0d2d26301
fix(bedrock): avoid double-counting cache tokens in Anthropic Messages streaming usage
Made-with: Cursor
2026-04-11 00:03:45 +05:30
Yuneng Jiang
2a4e5b59fd
fix(responses): prevent duplicate kwargs in WebSocket call
Filter all explicitly-passed keys from remaining_kwargs before
spreading into async_responses_websocket(). The router now injects
custom_llm_provider into kwargs (via #25334), which collides with
the explicit custom_llm_provider= argument.
2026-04-10 11:13:17 -07:00
yuneng-jiang
d0e347af32
Merge pull request #25473 from BerriAI/litellm_auth_rbac_cleanup
refactor: consolidate route auth for UI and API tokens
2026-04-10 09:14:42 -07:00
Ryan Crabbe
3af7de4222
retain ui_routes enum alias for JWT config backwards compatibility 2026-04-10 08:55:32 -07:00
Yuneng Jiang
a771e1939c
Fix unhandled "window is not defined" error in user_edit_view tests
Tremor's internal Tooltip component sets a setTimeout that fires after
the jsdom test environment tears down, causing a ReferenceError. Add
afterEach that flushes pending timers before cleanup.
2026-04-10 00:10:40 -07:00
Yuneng Jiang
28bce0b05e
fix: align v1 guardrail and agent list responses with v2 field handling 2026-04-10 00:00:53 -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
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
c7f610c57e
Merge remote-tracking branch 'origin/main' into litellm_/compassionate-shannon 2026-04-09 21:15:03 -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
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
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
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
ishaan-berri
2c0d20b327
Merge pull request #25441 from csoni-cweave/per-user-mcp-oauth-token
feat(mcp): add per-user OAuth token storage for interactive MCP flows
2026-04-09 19:03:59 -07:00
yuneng-jiang
e7551a1d43
Merge pull request #25444 from joereyna/litellm_fix_vertex_fine_tuned_model_test
fix(test): mock headers in test_completion_fine_tuned_model
2026-04-09 17:36:48 -07:00