Commit graph

39980 commits

Author SHA1 Message Date
ishaan-berri
b049aadc96
Merge pull request #25514 from milan-berri/fix/a2a-create-a2a-client-default-timeout
fix: a2a create a2a client default 60 second timeout
2026-04-10 16:51:34 -07:00
Yuneng Jiang
9a0487553d
Merge remote-tracking branch 'origin' into litellm_oss_staging_04_09_2026 2026-04-10 16:41:27 -07:00
ishaan-berri
831083b565
Merge pull request #25525 from BerriAI/feat/anthropic-advisor-tool
feat(anthropic): support advisor_20260301 tool type
2026-04-10 16:39:34 -07:00
harish876
c5d93e67f4 Enhance error handling in FileContentStreamingHandler for custom LLM provider routing
- Added validation to ensure credentials include a custom LLM provider before routing.
- Cleaned up type casting for better readability.
- Introduced a new test to verify behavior when a non-OpenAI provider is used, ensuring proper handling of streaming responses.
- Updated imports to include necessary modules for testing.
2026-04-10 23:29:44 +00:00
harish876
d1dda3d30b Enhance file content streaming handler to support custom LLM provider routing
- Updated `FileContentStreamingHandler` to utilize `custom_llm_provider` from credentials for routing.
- Added error handling for missing `custom_llm_provider` in credentials.
- Introduced new tests to validate streaming behavior with routed providers and non-OpenAI providers.
- Cleaned up imports and ensured proper type casting for improved clarity.
2026-04-10 23:29:16 +00:00
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
harish876
4e5e739559 resolve dependency cycle 2026-04-10 23:11:54 +00:00
Yuneng Jiang
bb7ac7c4ca
[Fix] Finish uv migration for redis_caching, e2e_ui, and fix prisma/black in CI
- Replace `uv run --no-sync prisma generate` with `python -m prisma generate`
  in proxy_part1, proxy_part2, and enterprise jobs (fixes spawn error)
- Migrate redis_caching_unit_tests from requirements.txt to uv sync
- Migrate e2e_ui_testing from requirements.txt to uv sync, replace bare
  prisma/python calls with uv run equivalents
- Bump venv cache keys from v1 to v2 with config.yml checksum to bust
  stale caches missing black and other dev dependencies
2026-04-10 16:10:50 -07:00
Ishaan Jaffer
9897c6d46b
refactor(advisor): replace hardcoded "advisor_20260301" with ANTHROPIC_ADVISOR_TOOL_TYPE constant 2026-04-10 15:59:46 -07:00
harish876
ccf3dc3161 Code Comments incorporated.
- Static Methods for Streaming Handler Function

 - Remove the afile_content_streaming wrapper function. Enabled with a stream boolean in afile_content

 - Cleaned up test cases after refactor
2026-04-10 22:41:13 +00: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
Ishaan Jaffer
d6e2a74c0f
docs: move advisor tool doc to completion/ guides section in sidebar 2026-04-10 15:08:25 -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
Ishaan Jaffer
ed973c049f
docs: add Advisor Tool documentation page 2026-04-10 13:15:54 -07:00
Ishaan Jaffer
318196f793
test(advisor): add tests for auto-strip advisor_tool_result blocks 2026-04-10 13:15:51 -07:00
Ishaan Jaffer
9742bcd3ae
feat(advisor): call strip_advisor_blocks in /messages transform path 2026-04-10 13:15:48 -07:00
Ishaan Jaffer
ab8d92c14c
feat(advisor): call strip_advisor_blocks in chat/completions transform_request 2026-04-10 13:15:45 -07:00
Ishaan Jaffer
3a89465d18
feat(advisor): auto-strip advisor_tool_result blocks when advisor tool absent
Prevents Anthropic 400 invalid_request_error on follow-up turns where
the caller has removed the advisor tool but message history still contains
server_tool_use(advisor) + advisor_tool_result blocks.
2026-04-10 13:15:41 -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
Ishaan Jaffer
91f6d49b87
feat(anthropic): register advisor-tool-2026-03-01 in beta headers config
Add advisor-tool-2026-03-01 to anthropic_beta_headers_config.json so the
beta headers manager forwards it to Anthropic (was being silently dropped).
Mark as null for all non-native providers.
2026-04-10 12:39:30 -07:00
Ishaan Jaffer
55f0e6605b
test(anthropic): add advisor tool tests for /messages beta header path 2026-04-10 12:39:30 -07:00
Ishaan Jaffer
ed4aa84235
feat(anthropic/messages): auto-inject advisor-tool-2026-03-01 beta header in /messages path 2026-04-10 12:39:30 -07:00
Ishaan Jaffer
0f9eba4de0
test(anthropic): add advisor tool transformation tests 2026-04-10 12:39:30 -07:00
Ishaan Jaffer
a30a538ae5
feat(anthropic): support advisor_20260301 tool and auto-inject advisor beta header 2026-04-10 12:39:30 -07:00
Ishaan Jaffer
506de4527e
feat(anthropic): add AnthropicAdvisorTool type and ADVISOR_TOOL_2026_03_01 beta header enum 2026-04-10 12:39:30 -07:00
Sameer Kankute
ebdc34e226
Fix mypy 2026-04-11 00:48:06 +05:30
Sameer Kankute
bec448dd5d
Merge pull request #25524 from BerriAI/main
merge main
2026-04-11 00:41:36 +05:30
Sameer Kankute
5805609fb6
Merge pull request #25521 from BerriAI/main
merge main
2026-04-11 00:30:03 +05:30
harish876
1c74e17bed E2E test to assert response headers from the openai files change 2026-04-10 18:45:00 +00: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
harish876
baba3ebed8 Refactor file content streaming implementation
- Removed unused imports and streamlined type hints in `litellm/utils.py` and `litellm/files/main.py`.
- Moved `FileContentStreamingResult` to a new `litellm/files/types.py` for better organization.
- Updated `FileContentStreamingResponse` in `litellm/files/streaming.py` to include asynchronous close methods and improved logging capabilities.
- Enhanced tests to ensure proper closure of streaming iterators in `tests/test_litellm/llms/openai/test_openai_file_content_streaming.py` and `tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py`.
2026-04-10 18:30:28 +00:00
Milan
824269d585
test(a2a): assert create_a2a_client default timeout uses DEFAULT_A2A_AGENT_TIMEOUT
Made-with: Cursor
2026-04-10 21:18:15 +03:00
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
Milan
2ea6e89b2c fix(a2a): default create_a2a_client timeout to DEFAULT_A2A_AGENT_TIMEOUT
Align with aget_agent_card and the DEFAULT_A2A_AGENT_TIMEOUT env var so
A2A message/send uses the same default as agent card fetch instead of a
hardcoded 60s HTTP read timeout.

Also correct aget_agent_card docstring for the timeout parameter.

Made-with: Cursor
2026-04-10 21:06:44 +03: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
CHANGE
87d7e86479 feat(helm): add tpl support to extraContainers and extraInitContainers
Wrap toYaml with tpl in deployment and migration job templates so
users can reference Helm values (e.g. {{ .Values.image.repository }})
inside extraContainers and extraInitContainers definitions.
2026-04-10 09:41:33 -04:00
harish876
044d434b50 remove unused iterator imports 2026-04-10 07:11:31 +00: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
4b6eb02b66
[Fix] Pin uv/pip versions and fix bare prisma calls in CI
- Pin `pip==26.0.1` and `uv==0.10.9` in CCI jobs that used unpinned
  `pip install uv` (redis_caching_unit_tests, ui_e2e_tests)
- Replace bare `prisma generate` with `uv run --no-sync prisma generate`
  in proxy_part1, proxy_part2, and enterprise test jobs
- Remove duplicate `check=True` kwarg in test_basic_python_version.py
  that caused TypeError with `_run_uv()` helper
2026-04-10 00:04:32 -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
a889dea8cc
[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 23:58:36 -07:00
joereyna
7ad5d6551d
fix(responses-ws): use urllib.parse to append model param, fix test mocking 2026-04-09 23:58:36 -07:00
joereyna
7f87c1f7fb
fix(responses-ws): append ?model= to backend WebSocket URL 2026-04-09 23:58:36 -07:00
Yuneng Jiang
c42594ab3e
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 23:58:35 -07:00
Yuneng Jiang
92cf642c2f
[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 23:58:35 -07:00