Commit graph

36177 commits

Author SHA1 Message Date
yuneng-jiang
3c389ad6f7
Merge pull request #22857 from BerriAI/litellm_fix_key_org_id_serialization
[Fix] UI - Keys: Organization always shows Not Set
2026-03-04 20:33:29 -08:00
yuneng-jiang
7eafac8e7f Fix remaining org_id fallbacks in filter_helpers and TeamVirtualKeysTable
filter_helpers.ts was not populating the Organization ID filter dropdown
(always empty). TeamVirtualKeysTable was showing the team's org for all
keys instead of each key's own org.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 20:18:54 -08:00
yuneng-jiang
96b75be03d [Feature] RBAC for Vector Stores and Agents
Add proxy-admin-configurable toggles to restrict internal users (and optionally
team admins) from accessing agent and vector store management features.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 20:13:14 -08:00
yuneng-jiang
51d876ce79 [Fix] UI - Keys: Organization shows Not Set due to org_id/organization_id mismatch
The /key/list API returns `org_id` (the Pydantic field name), but the UI
was reading `organization_id`, causing the Organization field to always
show "Not Set" and the Organization ID filter to never match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 20:11:42 -08:00
Sameer Kankute
335c4d4946
Merge pull request #22851 from BerriAI/litellm_v182-messages-routing-note
docs(v1.82.0): add v1/messages routing note and caution to release notes
2026-03-05 09:31:51 +05:30
yuneng-jiang
6aeceb6512
Merge pull request #22846 from BerriAI/litellm_hide_bounce_icon
[Feature] Add option to hide bouncing icon in header
2026-03-04 19:59:29 -08:00
yuneng-jiang
6e59fe839d
Merge pull request #22845 from BerriAI/litellm_mcp_tab_spacing
[Fix] UI - MCP Servers: Current Team spacing alignment
2026-03-04 19:57:11 -08:00
Sameer Kankute
caa0296d15 docs(v1.82.0): add v1/messages routing note and caution to release notes
Made-with: Cursor
2026-03-05 09:26:51 +05:30
yuneng-jiang
726a8cc938 [Feature] Add option to hide bouncing icon in header
Adds a localStorage-based toggle to hide the bouncing 🌑 icon next to
the version tag in the navbar, following the same pattern used for
hiding prompts, usage indicator, new feature badges, and blog posts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 19:20:08 -08:00
yuneng-jiang
cb4aee5ce6 fix: remove px-6 from table wrapper to align with tabs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 19:18:42 -08:00
yuneng-jiang
fa1b7b1042 [Fix] UI - MCP Servers: align Current Team section with tabs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 19:09:01 -08:00
Gustavo Martin Alvarez
b3a17596fe
fix(gemini): resolve image token undercounting in usage metadata (#22608)
* fix(gemini): ensure image token accumulation in usage metadata

Fixed an issue where image tokens were being overwritten instead of accumulated in Gemini responses. Added support for both camelCase and snake_case token count keys. Fixes #22082.

* test: add regression test for image token accumulation and cleanup files

* fix(gemini): ensure consistent accumulation for responseTokensDetails

* fix(gemini): harden token count parsing and add vertex accumulation test

Parse tokenCount/token_count as int-safe values to satisfy mypy and avoid None/object arithmetic. Add regression test for duplicate modality accumulation in Vertex _calculate_usage.
2026-03-04 18:52:08 -08:00
Ishaan Jaff
38ea5aba80
Delete ttft-logs-screenshot.png 2026-03-04 18:51:02 -08:00
Cesar Garcia
bdb02c092e
Merge pull request #18144 from Chesars/feat/bfl-image-generation 2026-03-04 23:38:16 -03:00
Chesars
d693007726 fix(bfl): check HTTP status when downloading image from URL
Add raise_for_status() to avoid sending error page content as image data to BFL API.
2026-03-04 23:36:44 -03:00
Shivam Rawat
7f4d1bc1ca
Merge pull request #22838 from BerriAI/doc_update_v1.81.14.pip
doc change
2026-03-04 18:28:06 -08:00
shivam
5bd692e649 doc change 2026-03-04 18:27:40 -08:00
Shivam Rawat
588b9b7797
Merge pull request #22837 from BerriAI/doc_update_v1.81.14.stable
new update
2026-03-04 18:25:10 -08:00
shivam
1c46495c01 new update 2026-03-04 18:24:04 -08:00
Chesars
fac6c068a0 fix(bfl): add mask to supported params for inpainting
mask was missing from get_supported_openai_params, causing it to be
dropped before reaching transform_image_edit_request where it is
already handled correctly for flux-pro-1.0-fill inpainting.
2026-03-04 23:17:15 -03:00
Shivam Rawat
9c20f4f6d1
Merge pull request #22834 from BerriAI/doc_update_v1.81.14.stable
chore
2026-03-04 18:17:12 -08:00
shivam
c60ea1878d chore 2026-03-04 18:15:45 -08:00
Chesars
fc54a65c2b fix(bfl): remove timeout from polling GET calls — HTTPHandler.get() doesn't accept timeout 2026-03-04 23:07:02 -03:00
Shivam Rawat
440ae8933e
Merge pull request #22833 from BerriAI/doc_update_for_v1.82.0
[Fix] chore for release notes
2026-03-04 18:04:48 -08:00
Chesars
fa165a68d9 fix(bfl): add BFL-specific params to image edit get_supported_openai_params for consistency 2026-03-04 23:04:48 -03:00
shivam
b6c2028294 chore for release notes 2026-03-04 18:03:54 -08:00
Ishaan Jaff
9897df5089
feat(mcp): allow admins to override tool name and description per MCP server (#22828)
* feat(mcp): add tool_name_to_display_name and tool_name_to_description overrides for MCP servers

* docs(mcp): add mcp_openapi.md with OpenAPI→MCP guide and tool override section

* docs(mcp): add sequential UI screenshots to mcp_openapi.md

* fix(mcp): apply tool overrides after permission filtering; reverse-map display names in tools/call
2026-03-04 17:58:05 -08:00
Ishaan Jaff
dd183a7fcb
[Feat] UI - Allow sorting MCPs by created_at, Display name date (#22825)
* Add column sorting to MCP servers table

- Added sorting state management to DataTable component
- Enabled getSortedRowModel for tanstack/react-table
- Made column headers clickable with sort indicators (↑↓⇅)
- Added enableSorting: true to sortable columns in mcp_server_columns
- Columns now support ascending/descending sort by clicking headers
- Updated package-lock.json and tsconfig.json from build process

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* Make table sorting opt-in to avoid conflicts with existing consumers

Address Greptile feedback (score 2/5):
- Added enableSorting prop to DataTable (defaults to false)
- Only enable sorting features when explicitly requested
- Pass enableSorting=true from MCP servers component
- This prevents unintended sorting on other DataTable consumers:
  * view_logs (has server-side sorting)
  * pass_through_settings
  * UsagePage
- Sorting UI (indicators, click handlers) only shown when enabled

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-03-04 17:47:01 -08:00
yuneng-jiang
a33d3e035d
Merge pull request #22830 from BerriAI/litellm_fix_docs_build
[Fix] Docs build broken due to mismatched @docusaurus package versions
2026-03-04 17:41:26 -08:00
yuneng-jiang
e4dd3efe11
Merge pull request #22829 from BerriAI/litellm_projects_vitest
[Test] UI - Projects: add Vitest unit tests for all Projects components
2026-03-04 17:39:59 -08:00
yuneng-jiang
6ca7187999
Merge pull request #22827 from BerriAI/litellm_cleanup_networking_exports
[Refactor] UI - Dashboard: remove unused exports from networking.tsx
2026-03-04 17:38:43 -08:00
Chesars
f3cb45765b fix(bfl): close docstring in get_supported_openai_params, prevent quality/n param leak for non-ultra models 2026-03-04 22:36:13 -03:00
yuneng-jiang
9501a161e7 [Fix] Docs build broken due to mismatched @docusaurus package versions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 17:35:01 -08:00
Cesar Garcia
315a483ace
Update litellm/llms/black_forest_labs/image_generation/transformation.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-04 22:32:30 -03:00
yuneng-jiang
06d1616b9f remove unused exports from networking.tsx
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-04 17:26:18 -08:00
yuneng-jiang
e34960b3f0 [Test] UI - Projects: add Vitest unit tests for all Projects components
Adds 77 tests across 8 files covering ProjectsPage, ProjectDetailsPage,
ProjectKeysSection, ProjectKeysTable, CreateProjectModal, EditProjectModal,
ProjectBaseForm, and projectFormUtils.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 17:26:11 -08:00
Chesars
f2c75bdbe0 fix(bfl): add timeout to polling requests, validate initial POST status code
- Propagate timeout to each polling GET request to prevent indefinite hangs
- Validate HTTP status code of initial POST before parsing JSON
- Fix inline import and add 60s timeout to image URL download in _read_image_bytes
2026-03-04 22:20:59 -03:00
Ishaan Jaff
e3810b4009
feat: make model selection optional when creating virtual keys (#22826)
- Remove required validation for models field in create_key_button.tsx
- Update help text to clarify models are optional
- If no models selected, key will have access to all models
- This allows users to create keys for MCP-only access without selecting LLM models
- Fixes LIT-1791: Cannot create virtual key without LLM provider if user only has MCP access

Backend already supports empty models list (defaults to all models).
This change only updates the UI source to match backend behavior.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-03-04 17:19:07 -08:00
Ishaan Jaff
614a9fe9b7
Fix MCP server search in playground (#22824)
- Added showSearch prop to enable search input in MCP server selector
- Added filterOption to search across server name, alias, server_id, and description
- Search is case-insensitive and filters in real-time
- Added test to verify search input appears when dropdown opens
- Updated tsconfig.json with Next.js auto-configuration (jsx: react-jsx)

Fixes issue where MCP server search was not working in the playground.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-03-04 17:14:18 -08:00
Cesar Garcia
b0e644b017
Merge pull request #22823 from Chesars/docs/thinking-summary-field
docs: add thinking.summary field to /v1/messages and reasoning docs
2026-03-04 22:12:43 -03:00
Chesars
57c0b466e1 docs: add thinking.summary field to /v1/messages and reasoning_content docs
Document the `summary` optional field in the `thinking` object for the
Anthropic `/v1/messages` adapter, and add a section on summary preservation
when routing to non-Anthropic providers via the adapter.
2026-03-04 22:04:15 -03:00
Cesar Garcia
6693723588
Merge pull request #22809 from Chesars/worktree-count-tokens-api
feat(openai): add litellm.acount_tokens() public API + OpenAI token counting support
2026-03-04 22:03:23 -03:00
Harshit Jain
07cb6d5bec
Merge pull request #22372 from BerriAI/litellm_jwt_vkey_map
Litellm jwt vkey map
2026-03-05 06:24:49 +05:30
Chesars
abc381cfe2 fix: use chat format in tools test, include tools/system in local fallback 2026-03-04 21:53:03 -03:00
Cesar Garcia
5c1e01673f
Merge pull request #21441 from Chesars/fix/20998-preserve-thinking-summary
fix(anthropic): preserve thinking.summary when routing to OpenAI Responses API
2026-03-04 21:51:01 -03:00
Chesars
8786e674ee fix: address PR review feedback — F821, double auth, strict field, docs format, system-only fallback
- Fix F821: add BaseTokenCounter TYPE_CHECKING import in gpt_transformation.py
- Remove duplicate auth invocation in count_response_input_tokens endpoint
- Preserve `strict` field during chat→Responses API tool conversion
- Fix docs tools example to use chat completions format (not Responses API format)
- Return None early for system-only messages to avoid noisy error logs
2026-03-04 21:35:39 -03:00
tombii
28fe9fabae
fix: complexity_router crashes on list-format message content (OpenAI multi-part messages) (#22761)
* fix: complexity_router fails on list-format message content (OpenAI multi-part messages)

When a client sends messages with list-format content
(e.g. [{"type": "text", "text": "..."}] as used by the OpenAI JS SDK
and other clients), the complexity_router's async_pre_routing_hook
skipped those messages because it only handled str content. This caused
user_message to be None, the hook returned None, and the router fell
through to selecting the complexity_router deployment itself
(model="auto_router/complexity_router") which litellm cannot dispatch,
resulting in LiteLLMUnknownProvider.

Fixes:
- Extract text from list-format content parts (type=text) before
  classifying
- Return default_model instead of None when no user message can be
  extracted, preventing the crash fallthrough
- Loosen PreRoutingHookResponse.messages type from Dict[str, str] to
  Dict[str, Any] to accommodate list-format content values

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: update messages type annotation in async_pre_routing_hook to Dict[str, Any]

Consistent with PreRoutingHookResponse.messages type change and the
list-format content support added in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: normalize None content to empty string in complexity_router message parsing

msg.get("content", "") returns None when the key exists with value None
(e.g. assistant messages with tool calls). Use `or ""` to normalize
None to an empty string explicitly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: strip whitespace from joined list content parts in complexity_router

Prevents leading/trailing spaces when some content parts have empty
text values (e.g. " ".join(["", "hello"]) → " hello").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 16:18:49 -08:00
Ishaan Jaff
9a4bacd85d
fix: add missing spec_path column to LiteLLM_MCPServerTable schema (#22820)
The OpenAPI-to-MCP feature (PR #21575) added spec_path to the code
(_types.py, mcp_server_manager.py) but missed adding the column to
the Prisma schema files. This causes "Could not find field spec_path"
errors when creating OpenAPI-based MCP servers via the UI or API.

Adds `spec_path String?` to LiteLLM_MCPServerTable in all three
schema files (root, litellm/proxy, litellm-proxy-extras).

Made-with: Cursor
2026-03-04 16:07:05 -08:00
Guilherme Segantini
e335dd70f8
fix(sap provider layer): enable response-format for anthropic models and improve compatibility for GPT models via LangChain (#22804)
* (sap) ensure tool parameters have type='object' for SAP compatibility

Fix SAP GenAI Hub Orchestration Service rejecting tool calls with error:
"400 - LLM Module: tools.0.custom.input_schema.type: Input should be 'object'"

Root cause: When Claude Code uses tools (like web_search) with the SAP provider
through LiteLLM's Anthropic experimental pass-through adapter, Anthropic's
input_schema format doesn't always include the required type="object" field.

The adapter's translate_anthropic_tools_to_openai() function was directly
copying input_schema to OpenAI's parameters field without ensuring the
type="object" requirement that SAP's API strictly enforces.

Changes:
- Modified translate_anthropic_tools_to_openai() to check if input_schema
  is missing the type field and add type="object" if absent
- Preserves existing type field if already present
- Added comprehensive test suite (6 tests) covering:
  - Missing type field scenario (now adds type="object")
  - Existing type preservation
  - Empty input_schema handling
  - Multiple tools transformation
  - Additional schema properties preservation
  - SAP-specific compatibility regression test

Testing:
- All new tests pass (6/6 in test_anthropic_tool_schema_fix.py)
- All existing Anthropic tool tests pass (57/57 tool-related tests)
- SAP tool parameter validation tests pass (9/9 in test_sap_tool_parameters.py)

* (sap) enable native response_format for anthropic models

* (sap) filter strict param from model_params for GPT models only

* (sap) revert Anthropic adapter type='object' fix

The SAP FunctionTool Pydantic validator in litellm/llms/sap/chat/models.py
already ensures type='object' is added to all tool parameters for SAP
API compatibility.

The Anthropic adapter change affected ALL consumers, not just SAP, which
was broader scope than intended for this PR.

- Revert input_schema modification in Anthropic adapter
- Remove Anthropic-specific test file (SAP tests still cover this case)

* (sap) gate markdown stripping to Anthropic models only

SAP GenAI Hub with Anthropic models sometimes returns JSON wrapped in
markdown code blocks. GPT/Gemini/Mistral models don't exhibit this
behavior, so stripping is now gated to avoid accidentally modifying
valid responses that may contain markdown in JSON string values.
2026-03-04 16:03:59 -08:00
Cesar Garcia
92b0585f2e
Update litellm/llms/openai/responses/count_tokens/handler.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-04 20:57:29 -03:00