Commit graph

34410 commits

Author SHA1 Message Date
Rahul Dhanawade
64c85dbc9f
Fix/claude code plugin schema (#22271)
* fix: add missing LiteLLM_ClaudeCodePluginTable to schema.prisma

- Claude Code Plugin Marketplace endpoints (/claude-code/marketplace.json,
  /claude-code/plugins) were returning 500 errors because
  LiteLLM_ClaudeCodePluginTable model was missing from both schema.prisma files
- Prisma client was generated without this table causing AttributeError:
  'Prisma' object has no attribute 'litellm_claudecodeplugintable'
- Added missing model definition to root schema.prisma and
  litellm/proxy/schema.prisma

Fixes #21310

* test: add regression test for LiteLLM_ClaudeCodePluginTable schema

* fix: address greptile review - add @updatedAt, clean up test imports
2026-02-27 15:59:37 -08:00
yuneng-jiang
03720ec08c
Merge pull request #22315 from BerriAI/litellm_projects_page
[Feature] UI - Projects: Add Projects page with list and create flows
2026-02-27 15:45:01 -08:00
yuneng-jiang
7cffd77d68
Merge pull request #22323 from BerriAI/litellm_project_list_timestamps
[Fix] Include timestamps in /project/list response
2026-02-27 15:44:02 -08:00
yuneng-jiang
8bb6457471 [Fix] Include created_at and updated_at in /project/list response
The /project/list endpoint was not returning created_at and updated_at timestamps because these fields were not defined in LiteLLM_ProjectTable. Added these fields to the model so FastAPI includes them in the response (values come from the database). This allows the UI to display project creation and last-updated times.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-27 15:41:03 -08:00
tombii
d292da2c14 fix(openrouter): pattern-based fix for native OpenRouter model double-stripping
Replace the hardcoded NATIVE_OPENROUTER_MODELS set approach with a
pattern-based check in _get_openai_compatible_provider_info: after
stripping the outer "openrouter/" provider prefix, if the remaining
model name still starts with "openrouter/", return immediately without
further stripping.

This fixes openrouter/openrouter/aurora-alpha, openrouter/openrouter/polaris-alpha,
and any future native OpenRouter models — not just the three hard-coded
ones (auto, free, bodybuilder) from the previous approach.

Fixes #16353

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:14:53 +01:00
Cesar Garcia
7d084dfb9d
Merge pull request #20525 from Chesars/docs/opus-4-6-openrouter-and-1m-context
docs: add OpenRouter Opus 4.6 to model map and update Claude Opus 4.6 docs
2026-02-27 19:07:31 -03:00
Chesars
5628ba0831 docs: remove openrouter/anthropic/claude-opus-4.6 from backup JSON
Model should only be in the main cost map, not the backup.
2026-02-27 19:05:33 -03:00
Chesars
c47d219806 docs: add openrouter/anthropic/claude-opus-4.6 to main model cost map 2026-02-27 19:04:49 -03:00
Cesar Garcia
6430173bde
Merge pull request #20516 from Chesars/fix/openrouter-native-model-double-strip
fix(adapter): double-stripping of model names with provider-matching prefixes
2026-02-27 18:58:37 -03:00
Cesar Garcia
e05865fc1f
Merge pull request #20520 from Chesars/feat/add-openrouter-native-models
feat(model_prices): add OpenRouter native models to model cost map
2026-02-27 18:54:24 -03:00
Cesar Garcia
587977e19a
Merge pull request #19792 from Chesars/fix/openrouter-register-model-index-error
fix(register_model): handle openrouter models without '/' in name
2026-02-27 18:52:14 -03:00
Chesars
77496776c1 fix(register_model): align membership check with stored value for openrouter models
The guard checked `key` (full key like "openrouter/gpt-4") but the set
stores `split_string[-1]` ("gpt-4"), so the duplicate check never matched.
2026-02-27 18:48:28 -03:00
Chesars
b5cd2820b1 Merge upstream/main into feat/add-openrouter-native-models
Resolve conflict in model_prices_and_context_window.json by keeping both
the new minimax-m2.5 model from upstream and the OpenRouter native models
from this branch.
2026-02-27 18:40:56 -03:00
Alejandro Tapia
18bc0d4ec9 reusable-credentials 2026-02-27 13:37:23 -08:00
Cesar Garcia
1e68b17a14
Merge pull request #19288 from Chesars/fix/helicone-gemini-support
fix(helicone): add Gemini and Vertex AI support to HeliconeLogger
2026-02-27 18:33:15 -03:00
yuneng-jiang
2613277ede [Feature] UI - Projects: Add Projects page with list and create flows
Add a new Projects page under ACCESS CONTROL in the left nav, positioned
between Teams and Internal Users. Projects sit between teams and keys in
the hierarchy for use-case management.

- ProjectsPage with Ant Design table (list, search, pagination)
- CreateProjectModal with team-scoped model selection
- React-query hooks for /project/list and /project/new
- New badge on Projects, removed from Access Groups
- Page metadata entry for test compliance

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-27 13:31:17 -08:00
Cesar Garcia
47a7645584
Merge pull request #22301 from Chesars/fix/count-tokens-include-system-and-tools
fix(count_tokens): include system and tools in token counting API requests
2026-02-27 18:29:31 -03:00
Cesar Garcia
c5ddbb9660
Merge pull request #19786 from Chesars/fix/python310-any-subclass-error
fix(containers): Fix Python 3.10 compatibility for OpenAIContainerConfig
2026-02-27 18:14:47 -03:00
Cesar Garcia
88c465b5ef
Merge pull request #20102 from Chesars/xai-deprecation-dates
Add deprecation dates for xAI grok-2-vision-1212 and grok-3-mini models
2026-02-27 18:11:53 -03:00
ryan-crabbe
d9cfae9092
Merge pull request #22313 from BerriAI/tests/add_llmclientcache_regression_tests
Tests: add llmclientcache regression tests
2026-02-27 13:04:02 -08:00
Ryan Crabbe
dce597b806 Close httpx clients after assertions to prevent resource leaks 2026-02-27 12:58:33 -08:00
Cesar Garcia
8f02d2d840
Merge pull request #21337 from Chesars/fix/streaming-parallel-tool-call-index
fix(responses): use output_index for parallel tool call streaming indices
2026-02-27 17:54:19 -03:00
Cesar Garcia
fc7bc9147f
Merge pull request #21629 from Chesars/fix/pydantic-serialization-warnings
fix(types): remove StreamingChoices from ModelResponse, use ModelResponseStream
2026-02-27 17:48:33 -03:00
Cesar Garcia
1552775166
Merge pull request #21595 from Chesars/fix/moonshot-preserve-image-url-content
fix(moonshot): preserve image_url blocks in multimodal messages
2026-02-27 17:47:02 -03:00
Ryan Crabbe
0b7e9a1971 Add e2e tests: httpx clients survive LLMClientCache eviction
Tests go through the real get_async_httpx_client() code path to verify
clients remain usable after both capacity eviction and TTL expiry.
Regression tests for PR #22247.
2026-02-27 12:43:08 -08:00
Ryan Crabbe
6490ad1d48 Revert "Add LLMClientCache regression tests for httpx client eviction safety"
This reverts commit ad9c70ec5d.
2026-02-27 12:43:03 -08:00
Cesar Garcia
bb8e6b1426
Merge pull request #21592 from Chesars/fix/openrouter-stream-usage-no-stream-options
fix(openrouter): use provider-reported usage in streaming without stream_options
2026-02-27 17:42:47 -03:00
Cesar Garcia
acf2fd9828
Merge branch 'main' into fix/openrouter-stream-usage-no-stream-options 2026-02-27 17:41:13 -03:00
Cesar Garcia
955bf90321
Merge pull request #21585 from Chesars/fix/vertex-gemini-image-config-params
fix(vertex_ai): pass through native Gemini imageConfig params for image generation
2026-02-27 17:39:53 -03:00
Cesar Garcia
1943e02cc7
Merge pull request #21582 from Chesars/fix/publicai-apertus-function-calling
fix(models): function calling for PublicAI Apertus models
2026-02-27 17:38:03 -03:00
Cesar Garcia
f64790c59a
Merge pull request #21581 from Chesars/fix/azure-doc-intelligence-api-base-env
fix(azure_ai): resolve api_base from env var in Document Intelligence OCR
2026-02-27 17:36:01 -03:00
Cesar Garcia
c4b3f37a02
Merge pull request #21574 from Chesars/fix/gpt5-search-supported-params
fix(openai): correct supported params for gpt-5-search models
2026-02-27 17:32:11 -03:00
Cesar Garcia
6a9ea863b9
Merge branch 'litellm_oss_staging_02_27_2026' into fix/gpt5-search-supported-params 2026-02-27 17:31:38 -03:00
Cesar Garcia
493f2e9188
Merge pull request #21576 from Chesars/fix/gpt5-supported-params-audit
fix(openai): correct supported_openai_params for GPT-5 model family
2026-02-27 16:39:49 -03:00
Cesar Garcia
761ae7e896
Merge pull request #21498 from Chesars/fix/chatgpt-streaming-tool-call-indices
fix(chatgpt): fix tool_calls streaming indexes
2026-02-27 16:39:21 -03:00
Cesar Garcia
734655137e
Merge pull request #22307 from Chesars/fix/22244-image-edit-custom-pricing
fix(images): pass model_info/metadata in image_edit for custom pricing
2026-02-27 16:38:34 -03:00
Cesar Garcia
ea5d551525
Merge pull request #22304 from Chesars/feat/add-gpt-realtime-1.5-model
feat(models): add gpt-realtime-1.5 to model cost map
2026-02-27 16:38:16 -03:00
Cesar Garcia
d8fa43a0cc
Merge pull request #22303 from Chesars/feat/add-gpt-audio-1.5-model
feat(models): add gpt-audio-1.5 to model cost map
2026-02-27 16:37:31 -03:00
Cesar Garcia
72980f4ded
Merge pull request #22300 from Chesars/fix/image-generation-extra-headers-22285
fix(images): forward extra_headers on OpenAI code path in image_generation()
2026-02-27 16:36:42 -03:00
Chesars
a08e5195e5 fix: put image_edit_request_params spread first to avoid overwriting model_info/metadata 2026-02-27 16:26:11 -03:00
Chesars
727adb0117 fix(images): pass model_info and metadata in image_edit for custom pricing
image_edit was not forwarding model_info/metadata to the logging object,
so custom_pricing was never detected. After PR #20679 stripped custom
pricing fields from the shared backend key, image_edit cost became 0.

Fixes #22244
2026-02-27 16:23:23 -03:00
ryan-crabbe
dc97e2f714
Merge pull request #22306 from BerriAI/tests/add_llmclientcache_regression_tests
Add LLMClientCache regression tests for httpx client eviction safety
2026-02-27 11:21:38 -08:00
yuneng-jiang
98e944c0cf
Merge pull request #22253 from BerriAI/litellm_access_group_sync
[Feature] Access group CRUD: Bidirectional team/key sync
2026-02-27 11:14:46 -08:00
Ryan Crabbe
ad9c70ec5d Add LLMClientCache regression tests for httpx client eviction safety
Regression tests for PR #22247 — ensures cache eviction (capacity and TTL)
does not close httpx clients that are still in use.
2026-02-27 11:14:13 -08:00
Chesars
1ca4dd8542 fix: gpt-audio-1.5 only supports /v1/chat/completions endpoint 2026-02-27 16:11:15 -03:00
Chesars
da73e54b1b fix: gpt-realtime-1.5 only supports /v1/realtime endpoint
Remove /v1/chat/completions and /v1/responses from supported_endpoints
and revert the audio model detection change since gpt-realtime-1.5 does
not go through Chat Completions.
2026-02-27 16:10:01 -03:00
Chesars
c7ab631bb0 fix(audio): detect gpt-realtime models as audio-capable for Chat Completions
gpt-realtime-1.5 supports Chat Completions with audio params but
is_model_gpt_audio_model only checked for "audio" in the model name.
Add "realtime" check so the audio parameter is passed through correctly.
2026-02-27 16:06:10 -03:00
Chesars
1f887547f6 feat(models): add gpt-realtime-1.5 to model cost map
New OpenAI realtime model released 2026-02-23. Adds pricing and capability
metadata for gpt-realtime-1.5 (32K context, 4K output, audio/image/text I/O).
Unlike gpt-realtime, this model also supports Chat Completions and Responses
endpoints (not just WebSocket).

Closes #22266
2026-02-27 16:01:09 -03:00
Gaurav Singh
29bb73ffca
fix(mcp): strip stale mcp-session-id header to prevent 400 in multi-worker deployments (#20992) (#21417)
In a multi-worker Uvicorn setup, a client that reconnects to a different
worker sends an mcp-session-id that the new worker has never seen.  The
MCP SDK returns 400 because the session is unknown.

Fix: add _handle_stale_mcp_session() which inspects the inbound
mcp-session-id header before the request reaches the SDK.  If the
session is not in this worker's _server_instances:
  - Non-DELETE: strip the header so the SDK creates a fresh session
  - DELETE: return 200 immediately (idempotent, session already gone)

No new dependencies, no Redis, no latency added to the hot path.

Fixes https://github.com/BerriAI/litellm/issues/20992
2026-02-27 10:59:08 -08:00
Chesars
1144d05cba feat(models): add gpt-audio-1.5 to model cost map
New OpenAI audio model released 2026-02-23. Adds pricing and capability
metadata for gpt-audio-1.5 (128K context, 16K output, audio I/O).

Closes #22269
2026-02-27 15:57:56 -03:00