Commit Graph
36810 Commits
Author SHA1 Message Date
yuneng-jiangandGitHub 0169f140bf Merge pull request #25571 from BerriAI/yj_apr11_build
[Infra] Build UI for release
2026-04-11 13:31:23 -07:00
ishaan-berriandGitHub da75012a50 Merge pull request #25569 from BerriAI/litellm_harish_april11
Litellm harish april11
2026-04-11 13:26:18 -07:00
Yuneng Jiang 18caee3ef4 chore: update Next.js build artifacts (2026-04-11 20:19 UTC, node v22.16.0) 2026-04-11 13:19:41 -07:00
harish-berriandGitHub ec0cd5c17d Update streaming.py. Provide Type Annotation for empty dict 2026-04-11 13:04:25 -07:00
yuneng-jiangandGitHub 150c37c47d Merge pull request #25568 from BerriAI/litellm_yj_apr_10_2026
[Infra] Merge dev with main
2026-04-11 13:03:52 -07:00
Yuneng Jiang 218daca867 [Fix] Address Greptile review: POST /organization/info auth bypass, inline imports, team access denial tests
- Add _verify_org_access to deprecated POST /organization/info endpoint
- Move get_user_object to module-level import in organization_endpoints.py
- Add tests for _verify_team_access 403 denial path
2026-04-11 12:40:55 -07:00
ishaan-berriandGitHub c70a3c7093 Merge pull request #25450 from harish876/oom-file-fix-openai
Add file content streaming support for OpenAI and related utilities
2026-04-11 12:25:36 -07:00
ishaan-berriandGitHub 5cb9b087ad Merge pull request #25545 from BerriAI/litellm_ishaan_april10
Litellm ishaan april10
2026-04-11 12:14:08 -07:00
harish876 69eb34597c Refactor file content streaming handling to improve routing and support
- Introduced a new method in `FileContentStreamingHandler` to resolve streaming request parameters, enhancing the routing logic based on credentials.
- Updated the `should_stream_file_content` method to check against supported providers.
- Cleaned up type hints and imports across multiple files for better organization and clarity.
- Added comprehensive tests to validate the new routing behavior and ensure original data integrity during streaming requests.
2026-04-11 18:56:15 +00:00
yuneng-jiangandGitHub 57b77fecbd Merge pull request #25554 from BerriAI/litellm_cross_tenant_resource_checks
[Fix] Align Org and Team Endpoint Permission Checks
2026-04-11 11:52:04 -07:00
Ishaan Jaffer 011e087939 fix(anthropic): guard against non-dict messages in strip_advisor_blocks_from_messages 2026-04-11 11:33:29 -07:00
Ishaan Jaffer 082f0afb83 refactor(anthropic): extract output_config validation to helper to fix ruff PLR0915 2026-04-11 11:09:59 -07:00
Ishaan Jaffer f40995418b fix(types): annotate ANTHROPIC_ADVISOR_TOOL_TYPE as Literal to satisfy mypy 2026-04-11 11:09:55 -07:00
ryan-crabbe-berriandGitHub eabb6a31f1 Merge pull request #25542 from BerriAI/litellm_fix-timestamp
fix(spend): session-TZ-independent date filtering for spend/error log queries
2026-04-11 10:57:25 -07:00
01b9b50b43 Add Screenshots / Proof of Fix section to PR template (#25564)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
2026-04-11 10:20:34 -07:00
Ryan Crabbe 423677f19e fix(spend): convert string dates to tz-aware UTC datetimes in _get_spend_report_for_time_range
This helper takes start_date/end_date as plain strings and passed them
straight to query_raw. Prisma forwards untyped text to Postgres, which
parses `'2026-04-10'::timestamptz` using the session timezone because
there's no +00:00 offset to respect. Under a non-UTC session this shifts
the resolved instant by the session offset, and the AT TIME ZONE 'UTC'
wrap introduced in the previous commit then strips it to a plain
timestamp that's still offset by the same amount — producing the exact
4h drift that wrap was meant to prevent.

Normalize the strings to datetime(..., tzinfo=timezone.utc) at the top of
the function so Prisma serializes them with the explicit +00:00 suffix,
which makes the ::timestamptz cast session-TZ-independent. Also replaces
the $1::date comparison in the team_alias query with the same
::timestamptz AT TIME ZONE 'UTC' pattern used by every other site in
this PR, so both queries share one consistent shape.

Verified live on a real Postgres under session TZ America/New_York:
the function now returns exactly the April 10 UTC demo rows
($4.20 / 10 rows) whereas the previous shape returned 13 rows
(2 correct April 10 rows dropped, 5 rows from April 11 early-morning
wrongly shifted in).
2026-04-11 09:47:09 -07:00
Yuneng Jiang ef71016dfe address greptile review feedback (greploop iteration 1) 2026-04-10 22:24:14 -07:00
Yuneng Jiang 09ffc87734 fix: align org and team endpoint permission checks with existing patterns
Brings organization info and team management endpoints in line with the
access-control patterns used elsewhere in the proxy.
2026-04-10 22:17:05 -07:00
harish876 f523ccb2fe Update import paths in tests for StorageBackendFileService
- Changed the import path for `upload_file_to_storage_backend` in test files to reflect the new module structure.
- Ensured consistency in mocking for storage backend service tests.
2026-04-11 00:07:52 +00:00
harish876 68bc6de214 resolving dependency issues 2026-04-11 00:07:41 +00:00
Ryan Crabbe c7934c460d fix(spend): session-TZ-independent date filtering for spend/error log queries
The raw SQL queries in spend_management_endpoints.py, spend_tracking_utils.py,
and analytics_endpoints.py cast date params to ::timestamptz while comparing
against the plain-timestamp "startTime" column. Postgres resolves the type
mismatch by promoting the column using the DB session timezone, which drifts
the filter window and date_trunc buckets whenever session TZ is not UTC —
silently dropping rows at UTC day boundaries and, for narrow windows, losing
rows entirely.

Wraps every such comparison with `AT TIME ZONE 'UTC'` so the param side
resolves to a plain timestamp matching the column type. Both sides end up
as plain timestamp, Postgres does no implicit conversion, and session TZ
plays no role in the query. The fix is constant-foldable so the existing
startTime index (PR #17504) remains usable.

Also marks strptime-produced datetimes as tz-aware UTC at the call sites
for intent clarity and consistency with parse_date.

Fixes #22529 (Logs page missing recent rows under non-UTC session TZ) and
the Global Usage single-day-returns-two-days symptom reported internally.
2026-04-10 17:04:52 -07:00
ishaan-berriandGitHub 02b4934e87 Merge pull request #25424 from BerriAI/litellm_fix-websearch-interception-logging
fix(websearch_interception): ensure spend/cost logging runs when stream=True
2026-04-10 16:52:22 -07:00
ishaan-berriandGitHub 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
ishaan-berriandGitHub 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 DholakiaandGitHub 4e12d3c562 docs: document april townhall announcements (#25537)
* 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
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-jiangandGitHub 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-jiangandGitHub 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-jiangandGitHub 9e4352afb4 Merge pull request #25528 from BerriAI/yj_bump_10
bump: version 1.83.5 → 1.83.6
v1.83.6-nightly
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-jiangandGitHub 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-jiangandGitHub 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-jiangandGitHub 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 KankuteandGitHub bec448dd5d Merge pull request #25524 from BerriAI/main
merge main
2026-04-11 00:41:36 +05:30