Commit graph

5760 commits

Author SHA1 Message Date
Sameer Kankute
cb8ce09b0d Add support for langchain_aws via litellm passthrough 2026-02-10 13:37:17 +05:30
Ishaan Jaff
36e0361187
[UI] M2M OAuth2 UI Flow (#20794)
* add has_client_credentials

* MCPOAuth2TokenCache

* init MCP Oauth2 constants

* MCPOAuth2TokenCache

* resolve_mcp_auth

* test fixes

* docs fix

* address greptile review: min TTL, env-configurable constants, tests, docs

- Fix zero-TTL edge case: floor at MCP_OAUTH2_TOKEN_CACHE_MIN_TTL (10s)
- Make all MCP OAuth2 constants env-configurable via os.getenv()
- Move test file to follow 1:1 mapping convention (test_oauth2_token_cache.py)
- Add MCP OAuth doc page (mcp_oauth.md) with M2M and PKCE sections
- Update FAQ in mcp.md to reflect M2M support
- Add E2E test script and config

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

* fix mypy lint

* fix oauth2

* ui feat fixes

* test M2M

* test fix

* ui feats

* ui fixes

* ui fix client ID

* fix: backend endpoints

* docs fix

* fixes greptile

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 19:28:02 -08:00
Ishaan Jaff
19024e0602
[Feat] MCP Oauth2 Fixes - Add support for MCP M2M Oauth2 support (#20788)
* add has_client_credentials

* MCPOAuth2TokenCache

* init MCP Oauth2 constants

* MCPOAuth2TokenCache

* resolve_mcp_auth

* test fixes

* docs fix

* address greptile review: min TTL, env-configurable constants, tests, docs

- Fix zero-TTL edge case: floor at MCP_OAUTH2_TOKEN_CACHE_MIN_TTL (10s)
- Make all MCP OAuth2 constants env-configurable via os.getenv()
- Move test file to follow 1:1 mapping convention (test_oauth2_token_cache.py)
- Add MCP OAuth doc page (mcp_oauth.md) with M2M and PKCE sections
- Update FAQ in mcp.md to reflect M2M support
- Add E2E test script and config

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

* fix mypy lint

* fix oauth2

* remove old files

* docs fix

* address greptile comments

* fix: atomic lock creation + validate JSON response shape

- Use dict.setdefault() for atomic per-server lock creation
- Add isinstance(body, dict) check before accessing token response fields

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

* fix: replace asserts with proper guards, wrap HTTP errors with context

- Replace `assert` statements with `if/raise ValueError` (asserts can be
  disabled with python -O in production)
- Wrap `httpx.HTTPStatusError` to provide a clear error message with
  server_id and status code
- Add tests for HTTP error and non-dict JSON response error paths
- Remove unused imports

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:35:11 -08:00
Ishaan Jaff
4555ed37c5
fix(callbacks): allow MAX_CALLBACKS override via env var (#20781)
* fix(callbacks): allow MAX_CALLBACKS override via env var (#20778)

* fix(callbacks): allow MAX_CALLBACKS override via env var

- Move MAX_CALLBACKS from logging_callback_manager.py to constants.py
- Add LITELLM_MAX_CALLBACKS env var override (default: 30)
- Add troubleshooting doc explaining the limit and override

Fixes issue where large deployments with 60+ teams using guardrails
would hit the hardcoded MAX_CALLBACKS=30 limit and fail to start.

* docs: add max_callbacks to sidebar navigation

---------

Co-authored-by: shin-bot-litellm <shin-bot-litellm@users.noreply.github.com>

* fix callbacks issue

---------

Co-authored-by: shin-bot-litellm <shin-bot-litellm@berri.ai>
Co-authored-by: shin-bot-litellm <shin-bot-litellm@users.noreply.github.com>
2026-02-09 12:11:32 -08:00
Ishaan Jaffer
f2ba120c43 docs fix 2026-02-09 10:59:57 -08:00
Ishaan Jaff
9532ad0fab
docs fix (#20768) 2026-02-09 10:03:43 -08:00
Sameer Kankute
6b2bcdb870
Merge pull request #20483 from BerriAI/litellm_completion_websearch
[Feat] Chat completion - Add Websearch support using LiteLLM /search (using web search interception hook)
2026-02-09 17:52:52 +05:30
Sameer Kankute
ef55d37bf0
Merge branch 'main' into litellm_v1_messages_claude_4_6 2026-02-09 17:14:36 +05:30
Sameer Kankute
f929461fc6
Merge pull request #20702 from emerzon/fix/issue-20698-stream-chunk-thinking-blocks
fix(streaming): preserve interleaved thinking/redacted_thinking blocks
2026-02-09 16:32:43 +05:30
Sameer Kankute
2f33445054
Merge pull request #20738 from BerriAI/main
merge main
2026-02-09 15:07:39 +05:30
Sameer Kankute
7fa4d090ec Add doc for chat completion web search 2026-02-09 13:51:26 +05:30
Sameer Kankute
319453d059 Add documentation for Fast Mode 2026-02-09 11:39:35 +05:30
Sameer Kankute
20440bcadc Add inference based costing 2026-02-09 10:51:50 +05:30
Sameer Kankute
d41df6053a Add all new feat for v1/messages 2026-02-09 10:35:11 +05:30
Varun Chawla
c9c6a5edc9
Fix: Spend logs pickle error with Pydantic models and redaction (#20685)
* docs: add callback registration optimization to v1.81.9 release notes (#20681)

* docs: add callback registration optimization to v1.81.9 release notes

* Update v1.81.9.md

---------

Co-authored-by: Alexsander Hamir <alexsanderhamirgomesbaptista@gmail.com>

* Fix spend logs pickle error with Pydantic models

Replace copy.deepcopy() with Pydantic-safe serialization to avoid
"cannot pickle '_thread.RLock' object" errors when request/response
redaction is enabled.

Changes:
- Add _convert_to_json_serializable_dict() helper that uses
  model_dump() for Pydantic models instead of pickle
- Replace copy.deepcopy() calls in request and response redaction
  paths with the new helper function
- Recursively handles nested dicts, lists, and Pydantic models

Root cause: Pydantic v2 BaseModel instances contain internal
_thread.RLock objects for thread-safety. When copy.deepcopy()
attempts to pickle these objects, it fails because threading
primitives cannot be pickled.

Fixes #20647

* chore: remove unused copy import

Remove unused copy import that was causing lint failure. The copy.deepcopy()
calls were replaced with _convert_to_json_serializable_dict() helper function
in the previous commit, making the copy module no longer needed.

---------

Co-authored-by: ryan-crabbe <128659760+ryan-crabbe@users.noreply.github.com>
Co-authored-by: Alexsander Hamir <alexsanderhamirgomesbaptista@gmail.com>
2026-02-07 23:02:29 -08:00
Cesar Garcia
1fecae0399
docs: add SDK proxy authentication (OAuth2/JWT auto-refresh) documentation (#20680)
Adds documentation for the litellm.proxy_auth feature that automatically
obtains and refreshes OAuth2/JWT tokens when connecting to a LiteLLM Proxy.
2026-02-07 22:57:04 -08:00
nuernber
55a89f279f
feat: add support for anthropic_messages call type in prompt caching (#19233)
* feat: add support for anthropic_messages call type in prompt caching

* test: move anthropic_messages prompt caching test to main router test file

* add tutorial on using claude code with prompt cache routing
2026-02-07 22:51:06 -08:00
jwang-gif
c9df996b77
Add team policy mapping for zguard (#20608)
* support policy mapping on team key level

* update document

* update document

* address comments

* update document

* add unit test for new feature

* add more test case
2026-02-07 22:44:17 -08:00
Harshit Jain
3b043ee8bf
fix critical CVE vulnerabliltes (#20683) 2026-02-07 22:23:01 -08:00
ryan-crabbe
f39c1e9045
docs: add middleware performance blog post (#20677)
* docs: add middleware performance blog post

* docs: add Krrish, Ishaan, and author details to middleware blog post
2026-02-07 17:36:53 -08:00
ryan-crabbe
94db421e67
docs: add callback registration optimization to v1.81.9 release notes (#20681)
* docs: add callback registration optimization to v1.81.9 release notes

* Update v1.81.9.md

---------

Co-authored-by: Alexsander Hamir <alexsanderhamirgomesbaptista@gmail.com>
2026-02-07 17:09:45 -08:00
Ishaan Jaffer
d8528fbfdb docs fix 2026-02-07 16:00:28 -08:00
Ishaan Jaffer
02cfc87bdb fidocs fix 2026-02-07 15:58:13 -08:00
Alexsander Hamir
5de7fe2897
docs: add LiteLLM Observatory section to v1.81.9 release notes (#20675)
- Add paragraph on release validation, extensibility, and 100% coverage goal
- Include OOMs and CPU regressions as issues surfaced under sustained load
2026-02-07 15:24:15 -08:00
yuneng-jiang
0531254899 reorganize admin UI docs 2026-02-07 15:20:24 -08:00
yuneng-jiang
ea255e2bd0 UI contributing and trouble shooting docs 2026-02-07 15:11:49 -08:00
yuneng-jiang
6e984122ba Adding to release notes + sidebar 2026-02-07 14:43:46 -08:00
yuneng-jiang
ca24f56b39 Merge remote-tracking branch 'origin' into docs_yj_feb7 2026-02-07 14:40:21 -08:00
Alexsander Hamir
0f7104f8a5
docs: polish LiteLLM Observatory blog post (#20670) 2026-02-07 14:35:28 -08:00
yuneng-jiang
5876441aa2 warning placement 2026-02-07 14:35:11 -08:00
yuneng-jiang
b29572cebc adjusting to add email integration prereq 2026-02-07 14:33:04 -08:00
yuneng-jiang
f7fbcefd26 UI team soft budget docs 2026-02-07 14:27:53 -08:00
Ishaan Jaffer
8bce48daa4 docs fix 2026-02-07 14:22:04 -08:00
Ishaan Jaff
caf51a4ca9
Litellm docs rc fixes (#20667)
* docs

* review 1

* docs fix

* docs

* docs fix

* docs
2026-02-07 13:32:15 -08:00
Ishaan Jaff
f2ba3cc6e1
[Docs] 1.81.9 stability (#20665)
* docs

* review 1

* docs fix
2026-02-07 13:15:23 -08:00
Sameer Kankute
f5ed7826a4
Merge pull request #20637 from BerriAI/litellm_blog_claude_4_6
Update opus 4.6 blog with adaptive thinking
2026-02-07 13:09:56 +05:30
Sameer Kankute
8741512183 Update opus 4.6 blog with adaptive thinking 2026-02-07 13:07:20 +05:30
Ishaan Jaffer
36be0044dc docs 2026-02-06 18:30:17 -08:00
Ishaan Jaff
1b24a0fdd7
docs (#20626) 2026-02-06 18:24:21 -08:00
Alexsander Hamir
0d7465694d
Add OpenAI/Azure release test suite with HTTP client lifecycle regression detection (#20622) 2026-02-06 18:03:05 -08:00
Krish Dholakia
ba74e6d9d2
Add http support to custom code guardrails + Unified guardrails for MCP + Agent guardrail support (#20619)
* fix: fix styling

* fix(custom_code_guardrail.py): add http support for custom code guardrails

allows users to call external guardrails on litellm with minimal code changes (no custom handlers)

Test guardrail integrations more easily

* feat(a2a/): add guardrails for agent interactions

allows the same guardrails for llm's to be applied to agents as well

* fix(a2a/): support passing guardrails to a2a from the UI

* style(code-editor): allow editing custom code guardrails on ui + add examples of pre/post calls for custom code guardrails

* feat(mcp/): support custom code guardrails for mcp calls

allows custom code guardrails to work on mcp input

* feat(chatui.tsx): support guardrails on mcp tool calls on playground
2026-02-06 17:34:32 -08:00
Sameer Kankute
eab7a99800
Merge pull request #20578 from BerriAI/litellm_claude_code_beta_headers
Add unsupported claude code beta headers in json
2026-02-06 19:10:13 +05:30
Sameer Kankute
c1a43914ee Add documentation related to new beta header json 2026-02-06 17:54:56 +05:30
Sameer Kankute
bfd21b5e00
Merge branch 'main' into litellm_opus_4.6_thinking 2026-02-06 14:17:40 +05:30
Sameer Kankute
a2b29d6328 Add complete documentation for claude_opus_4_6 2026-02-06 14:04:39 +05:30
Sameer Kankute
887a977ab4 Add doc on how to enable compaction via chat completion 2026-02-06 12:05:36 +05:30
Cesar Garcia
95f8cbe5ca
[Feat] add ElevenLabs eleven_v3 and eleven_multilingual_v2 to model cost map (#20522)
* [Feat] add ElevenLabs `eleven_v3` and `eleven_multilingual_v2` to model cost map

Register ElevenLabs TTS models for cost tracking:
- elevenlabs/eleven_v3: most expressive model, 70+ languages, audio tags
- elevenlabs/eleven_multilingual_v2: default TTS model, 29 languages

Also update ElevenLabs docs with supported models table and eleven_v3 audio tags example.

* docs: remove model-agnostic tip from ElevenLabs docs
2026-02-05 19:37:42 -08:00
Cesar Garcia
8263c8ad15
feat(web_search): add gpt-5-search-api model and docs clarifications (#20512)
* docs(web_search): clarify OpenAI search model requirements

- Add gpt-5-search-api to supported OpenAI search models
- Add warning that regular models (gpt-5, gpt-4.1) do NOT support web_search_options
- Add tip that web_search_options is optional for search models

* feat(models): add gpt-5-search-api pricing for OpenAI and Azure
2026-02-05 19:36:43 -08:00
Ishaan Jaffer
bff5f8d7b0 doc fix 2026-02-05 15:31:41 -08:00
Chesars
1d0c2f47a7 docs: add Opus 4.6 to OpenRouter model map and update Anthropic docs
- Add openrouter/anthropic/claude-opus-4.6 to model cost map
- Update Bedrock docs to list Opus 4.6 and Sonnet 4.5 as 1M context compatible
- Add missing Opus 4.6, Opus 4.5, and Opus 4.1 to Anthropic supported models table
2026-02-05 18:45:40 -03:00