Commit Graph

4801 Commits

Author SHA1 Message Date
ripepersimmon be970735de feat: Add gemini-3-pro-image-preview model support for imageSize parameters (#17019)
- Add model identifier to FLASH_IMAGE_PREVIEW_MODEL_IDENTIFIERS
- Add imageSize parameter support (1K, 2K, 4K) with GeminiImageSize type
- Add tests for imageSize parameter transformation
- Update documentation with new model
2025-11-25 19:38:29 -08:00
Igal Boxerman e6e1e8fca4 feat(pillar): add automatic LiteLLM context headers (#17076)
- Automatically pass LiteLLM virtual key context as X-LiteLLM-* headers
- Includes key_alias, user_id, team_id, org_id, and user_email
- No configuration required - always enabled for application/user tracking
- Excludes sensitive data (metadata, API tokens) for security
- Add comprehensive tests (30 tests, all passing)
- Update documentation with header details
2025-11-25 19:35:39 -08:00
Ishaan Jaff 5c192a23c3 [Feat] Add new RAG API on LiteLLM AI Gateway (#17109)
* init RAG api types

* add RAG endpoints

* init main.py for RAG ingest API

* init RecursiveCharacterTextSplitter

* add BaseRAGIngestion

* fix OpenAIRAGIngestion

* fix img handler

* init OpenAIRAGIngestion

* init BedrockRAGIngestion

* init BedrockRAGIngestion

* init rag tests

* init BedrockVectorStoreOptions

* implement BedrockRAGIngestion

* add BaseRAGAPI

* add endpoint for RAG ingest

* add ingest RAG endpoints

* add test doc

* add parse_rag_ingest_request

* update endpoints

* docs add docs for new RAG API

* fix qa check

* fix linting

* docs ficx

* docs

* add max depth checks

* docs anthropic
2025-11-25 17:54:29 -08:00
Krrish Dholakia 5cb5c2a7b7 docs: more doc cleanup 2025-11-25 16:04:27 -08:00
Krrish Dholakia 8ee6812edf docs: cleanup launch post 2025-11-25 15:58:51 -08:00
Krrish Dholakia 70a1325847 docs: more doc cleanup 2025-11-25 15:01:22 -08:00
Krrish Dholakia f3d5775920 fix: fix doc load issue 2025-11-25 14:40:26 -08:00
Ishaan Jaff be712908a3 [Feat] Add OpenAI compatible bedrock imported models. - qwen etc (#17097)
* test_bedrock_openai_imported_model

* AmazonBedrockOpenAIConfig

* add openai route for bedrock

* docs fix

* fix code qa check
2025-11-25 12:20:39 -08:00
Krrish Dholakia db2c8e3631 docs: initial doc cleanup 2025-11-25 11:57:51 -08:00
Sameer Kankute 67622fb040 Add day 0 support for anthropic new feat (#17091)
* Added tool search support for anthropic

* Add programtic tool calling support

* Add tool use input examples support

* Add anthropic effort param support

* Add anthropic effort param support

* Add blog for new features

* fix mypy and lint errors

* fix mypy and lint errors

* fix mypy and lint errors

* fix mypy and lint errors

* Add better handling

* Add better handling
2025-11-25 11:28:47 -08:00
Sameer Kankute 3249f6dd2d Merge pull request #17070 from BerriAI/litellm_add_vertex_ai_image_support
Add vertex ai image gen support for both gemini and imagen models
2025-11-26 00:04:03 +05:30
Sameer Kankute 83a9dcd2d2 Merge pull request #16886 from BerriAI/litellm_anthopic_azure_support
Added support for azure anthopic models via chat completion
2025-11-26 00:03:52 +05:30
Sameer Kankute 59b4b9a07c fix documentation of anthropic azure 2025-11-26 00:02:48 +05:30
Krish Dholakia 00e17c81a1 Add enforce user param functionality (#17088)
* feat: Add reject_metadata_tags to proxy config

Co-authored-by: krrishdholakia <krrishdholakia@gmail.com>

* Refactor: Rename reject_metadata_tags to reject_clientside_metadata_tags

Co-authored-by: krrishdholakia <krrishdholakia@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-25 09:36:24 -08:00
Sameer Kankute e0396e5fa7 Merge pull request #17082 from BerriAI/main
merge main
2025-11-25 18:49:52 +05:30
Sameer Kankute dd4c8ecbef Add v1/messages support for azure anthropic models 2025-11-25 18:36:39 +05:30
Sameer Kankute f52f05748d Update docs related to vertex ai image gen 2025-11-25 13:31:50 +05:30
Cesar Garcia 650b18974f fix(gemini): skip thinking config for image models (#17027)
* fix(gemini): exclude image models from automatic thinking_level parameter (#17013)

- gemini-3-pro-image-preview does not support thinking_level parameter
- Added check to skip adding thinkingConfig for models containing "image"
- Fixes BadRequestError: "Thinking level is not supported for this model"
- Only affects automatic default behavior, user can still pass reasoning_effort explicitly

Fixes #17013

* test: add tests for gemini-3 image models thinking_level exclusion

* update docs
2025-11-24 20:54:12 -08:00
Krish Dholakia 1ae80955e8 Docs: Add link to logging payload spec (#17049)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-24 20:48:10 -08:00
Sameer Kankute fc219c7db8 Integrate eleven labs text-to-speech (#16573)
* Add elevenlaps tts support

* fix mypy error

* add simple usage in docs
2025-11-24 18:49:30 -08:00
Mubashir Osmani aec6590486 add strands tutorial (#17039)
* add strands tutorial

* configgg
2025-11-24 17:31:59 -08:00
YutaSaito f5a3349fef feat: add UI support for configuring tool permission guardrails (#17050)
* feat: add UI support for configuring tool permission guardrails

* chore: rename UI/Docs references to "LiteLLM Tool Permission Guardrail"
2025-11-24 17:13:07 -08:00
Ishaan Jaff d2b90e6644 [Docs] Claude Skills API (#17052)
* add skillls api

* init doc

* docs fix

* skills API
2025-11-24 15:32:03 -08:00
Mubashir Osmani a807fe4450 add claude opus 4.5 (#17043)
* add claude opus 4.5

* Apply suggestion from @Chesars

Co-authored-by: Cesar Garcia <128240629+Chesars@users.noreply.github.com>

---------

Co-authored-by: Cesar Garcia <128240629+Chesars@users.noreply.github.com>
2025-11-24 14:30:36 -08:00
Lior Drihem 62b84d6aad Prompt security litellm (#16365)
* add prompt security guardrails provider

* cosmetic

* small

* add file sanitization and update context window

* add pdf and OOXML files support

* add system prompt support

* add tests and documentation

* remove print

* fix PLR0915 Too many statements (96 > 50)

* cosmetic

* fix mypy error

* Fix failed tests due to naming conflict of responses directory with same-named pip package

* Fix mypy error: use 'aembedding' instead of 'embeddings' for async embedding call type

* Fix: Install enterprise package into Poetry virtualenv for tests

The GitHub Actions workflow was installing litellm-enterprise to system Python
using 'python -m pip install -e .', but tests run in Poetry's virtualenv using
'poetry run pytest'. This caused ImportError for enterprise package types.

Changed to 'poetry run pip install -e .' so the package is available in the
same virtualenv where pytest executes.

Fixes enterprise test collection errors in GitHub Actions CI.

* Move Prompt Security guardrail tests to tests/test_litellm/

Per reviewer feedback, move test_prompt_security_guardrails.py from
tests/guardrails_tests/ to tests/test_litellm/proxy/guardrails/ so
it will be executed by GitHub Actions workflow test-litellm.yml.

This ensures the Prompt Security integration tests run in CI.

---------

Co-authored-by: Ori Tabac <oritabac@prompt.security>
Co-authored-by: Vitaly Neyman <vitaly@prompt.security>
2025-11-24 11:44:20 -08:00
Krish Dholakia 559142a738 Add table explaining different callback hooks (#17035)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-24 08:37:35 -08:00
Krish Dholakia 7c1dfd4462 docs: Clarify optional user_allowed_email_domain (#17034)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-24 08:34:35 -08:00
Krish Dholakia c368b4c180 Document model pricing contribution process (#17031)
* Add doc for adding model pricing and context window

Co-authored-by: krrishdholakia <krrishdholakia@gmail.com>

* Refactor model pricing documentation to include sample spec and examples

Co-authored-by: krrishdholakia <krrishdholakia@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-24 08:28:24 -08:00
Krish Dholakia f18cec2fe3 Update release notes to v1.80.5.rc.2 (#17032)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-24 08:25:57 -08:00
Krish Dholakia 760bce24bd feat(proxy_server.py): preserve content field even if null (#16988)
* feat(proxy_server.py): preserve content field even if null

* fix(proxy/utils.py): fix recursive function

* docs: new params

* docs: cleanup docs

* fix: fix linting errors
2025-11-23 22:05:58 -08:00
Ishaan Jaffer 73d3d151ab fix 1.80.5 2025-11-22 19:24:46 -08:00
YutaSaito 06f2ecef42 feat: tool permission argument check (#16982) 2025-11-22 19:21:25 -08:00
Ishaan Jaff f3cd0b0bc4 docs - ai gateway prompt management (#16990)
* docs prompt management

* docs

* add prompt mgmt imgs

* docs fix

* docs prompt management

* docs fix

* docs prompt versions

* docs fix
2025-11-22 18:49:29 -08:00
Ishaan Jaffer 1c864dc0de docs 1.80.5 2025-11-22 17:54:50 -08:00
Ishaan Jaffer 7e338f1beb docs sso roles 2025-11-22 17:36:44 -08:00
Ishaan Jaffer 2ebfc92dca docs fix 2025-11-22 17:34:45 -08:00
Ishaan Jaffer 036b2848e3 docs 2025-11-22 17:33:57 -08:00
Ishaan Jaffer f1e4242cbf docs fix 2025-11-22 17:33:57 -08:00
Alexsander Hamir 815136fbef perf release notes (#16978) 2025-11-22 17:23:31 -08:00
Ishaan Jaffer 023eefb6d5 docs fix 2025-11-22 16:54:30 -08:00
Ishaan Jaffer 93c2103097 fix docs 2025-11-22 16:16:56 -08:00
Ishaan Jaffer 7cbb159997 v1.80.0-stable 2025-11-22 16:09:52 -08:00
Krrish Dholakia d0cb2db0c6 docs(ai_hub.md): document mcp servers on ai hub 2025-11-22 16:07:38 -08:00
yuneng-jiang c6e0a0209f Docs for Model Compare UI (#16979) 2025-11-22 15:48:42 -08:00
Krish Dholakia c966c122ad feat: Add Presidio PII masking tutorial (#16969)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-11-22 15:45:43 -08:00
Krish Dholakia b9f2cc1c98 Model Armor - Logging guardrail response on llm responses (#16977)
* Litellm dev 11 22 2025 p1 (#16975)

* fix(model_armor.py): return response after applying changes

* fix: initial commit adding guardrail span logging to otel on post-call runs

sends it as a separate span right now, need to include in the same llm request/response span

* fix(opentelemetry.py): include guardrail in received request log + set input/ouput fields on parent otel span instead of nesting it

allows request/response to be seen easily on observability tools

* fix(model_armor.py): working model armor logging on post call events

* fix: fix exception message

* fix(opentelemetry.py): add backwards compatibility for litellm_request

allow users building on the spec change to use previous spec
2025-11-22 15:44:28 -08:00
Ishaan Jaffer 4fb9e33a95 fixes 2025-11-22 14:11:13 -08:00
Ishaan Jaffer b43b68a072 docs fix 2025-11-22 14:02:14 -08:00
Alexsander Hamir b02baf53a9 Fix: prevent memory blowout in LoggingWorker (#16559)
* fix: prevent memory blowout in LoggingWorker

Tasks were being executed sequentially with each task awaited before
processing the next one. When the queue had 10k+ tasks, only one could
execute at a time. Since the request rate exceeded execution speed,
objects accumulated in memory (50k+), holding references to heavy
objects and causing memory blowout.

The new implementation uses a semaphore to allow up to 1000 concurrent
tasks while properly tracking and cleaning up each task, significantly
improving throughput and preventing queue buildup.

* fix: require semaphor before removing task from queue

* fix: make worker concurrency configurable

* fix: clean comments

* fix: clarify new env purpose

* fix: add missing lib

* make constants configurable instead of hardcoded

* add more aggressive cleaning when queue is full

* add helpers function for the aggressive cleaning functionality

* use envs instead of static constants

* import and document constants

* add unit test for new functionality

* fix default value on config_settings

* fix: remove unused variables and imports to resolve linter errors

- Remove unused time_since_last_clear variable in logging_worker.py
  The variable was calculated but never used in _handle_queue_full()
  method, causing F841 linter error.

- Remove unused TYPE_CHECKING import in mcp_server/server.py
  The import was not used anywhere in the file, causing F401 linter error.

These changes improve code cleanliness and ensure the codebase passes
all linter checks without affecting functionality.

* add missing log expected by test_queue_full_handling

* fix: clean config_setting.md file

* fix: handle logging errors gracefully during shutdown in _flush_on_exit

During process shutdown, logging handlers may be closed while _flush_on_exit
tries to flush queued logging coroutines. This causes 'ValueError: I/O
operation on closed file' errors when coroutines attempt to log.

Changes:
- Add _safe_log helper method that wraps logging calls and suppresses
  errors when logging handlers are closed (ValueError, OSError, AttributeError)
- Replace all verbose_logger calls in _flush_on_exit with _safe_log
- Remove logging from exception handler in coroutine execution loop
  to prevent cascading errors during shutdown

This ensures graceful shutdown even when logging handlers are closed,
which is common during process termination.
2025-11-22 13:58:29 -08:00
Ishaan Jaffer a06e7edd85 docs 1.80.5 2025-11-22 13:52:26 -08:00