Commit Graph
1296 Commits
Author SHA1 Message Date
YutaSaitoandGitHub 6eb74bd62a Feat/persist mcp credentials in db (#16308)
* feat: persist mcp credentials in db

* feat: remove Auth Value field from MCP Tool Testing Playground

* fix: test
2025-11-07 19:22:49 -08:00
Jack CherngandGitHub 2ab34f9a52 Fix HostedVLLMRerankConfig will not be used (#16352)
* Fix HostedVLLMRerankConfig will not be used

Signed-off-by: Jun-Fei Cherng <jfcherng@realtek.com>

* Fix no usage statistics in rerank with hosted_vllm

Signed-off-by: Jun-Fei Cherng <jfcherng@realtek.com>

* Revise typo in comment

Signed-off-by: Jun-Fei Cherng <jfcherng@realtek.com>

---------

Signed-off-by: Jun-Fei Cherng <jfcherng@realtek.com>
2025-11-07 19:11:59 -08:00
Ishaan Jaffer a8533dc5c4 Revert "Added xai responses support (#16310)"
This reverts commit ee50f09e73.
2025-11-07 18:39:38 -08:00
Ishaan Jaffer 736b6b3e1e TestVertexAIRerankTransform 2025-11-07 18:18:48 -08:00
Ishaan JaffandGitHub 674d4b4cab [Feat] Guardrails - LiteLLM Content Filter, Allow Viewing/Editing Content Filter Settings (#16383)
* fix safe dumps

* add patterns.json

* add PrebuiltPattern

* add test patterns

* fix edit and view

* fix backend handling

* fix CF ui edit

* fix init
2025-11-07 18:15:09 -08:00
Ishaan JaffandGitHub ca229fe030 [Feat] LiteLLM Guardrail - UI Fix, ensure you can see UI Friendly name for PII Patterns (#16382)
* fix safe dumps

* add patterns.json

* add PrebuiltPattern

* add test patterns
2025-11-07 18:14:58 -08:00
Alan PonnachanandGitHub 5b01fe0a81 fix(vertex_ai): Correctly map 429 Resource Exhausted to RateLimitError (#16363) 2025-11-07 14:36:20 -08:00
Emerson GomesandGitHub 940a72ceb0 Add Vertex MiniMAX m2 (#16373) 2025-11-07 14:27:42 -08:00
Sameer KankuteandGitHub 94e1a1ecac Use vertex creds passed via arguments (#16266) 2025-11-06 19:35:22 -08:00
Jason RobertsandGitHub 5733f711fd feat(guardrails): panw prisma airs guardrail deduplication and enhanced session tracking (#16273)
* feat(guardrails): Add deduplication and session tracking

- Implement deduplication logic to prevent duplicate scans (via call_id; add _check_and_mark_scanned) caused by LiteLLM callback system
- Add session tracking using litellm_trace_id as AI Session ID for Prisma AIRS SCM logging
- Extract helper methods _extract_prompt_from_request maintainability
- Use httpxSpecialProvider import (LoggingCallback -> GuardrailCallback)
- Add comprehensive tests for deduplication and session tracking (7 new tests)
- Update documentation with multi-turn conversation tracking examples

* docs: update PANW Prisma AIRS multi-turn conversation example to use industry-standard terminology

- Clearer example for conversation tracking
- Updated terminology from 'AI Session ID' to 'Prisma AIRS AI Session ID' for clarity

* fix: remove unused asyncio import

* fix: correct mypy type ignore comment
2025-11-06 19:34:37 -08:00
Andrii KislitsynandGitHub c497b6f239 Add retry-after header support for errors 502, 503, 504 (#16288)
* retry-after-header-support-for-502-503-504-initial

* retry-after-header-support-for-502-503-504-tests-and-linters
2025-11-06 19:33:29 -08:00
Ishaan JaffandGitHub bd7d653bae Revert "Update perplexity cost tracking (#15743)" (#16345)
This reverts commit ad6a0f4d44.
2025-11-06 19:00:45 -08:00
Ishaan Jaffer 5157078e0a test_delete_callbacks_in_db 2025-11-06 18:37:36 -08:00
Ishaan Jaffer dc71eb12e3 fix _get_spend_logs_metadata 2025-11-06 17:08:53 -08:00
Ishaan Jaffer 8e73e11fc8 SEARCH_PROVIDERS 2025-11-06 17:07:53 -08:00
Ishaan Jaffer 8a9fe7b056 fix delete callbacks 2025-11-06 17:06:34 -08:00
Ishaan Jaffer c727a2ad63 test noma, presidio 2025-11-06 17:06:03 -08:00
Ishaan Jaffer 0a4e2a88e3 TestIsAllowedToCallVectorStoreEndpoint 2025-11-06 17:02:59 -08:00
Ishaan JaffGitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
18a5c4f75a [Feat] Add LiteLLM Gateway built in guardrail (#16338)
* add ContentFilterAction

* store pre-built regex patterns

* add v0 of content filter guard

* add _filter_messages

* test content filter guard

* init ContentFilterGuardrail

* fix ContentFilterGuardrail enums

* rename folder

* fix litellm_content_filter

* refactor content filter guard

* test content filter

* add streaming for ContentFilterGuardrail

* test_streaming_hook_mask

* add litellm_content_filter

* docs show litellm content filter

* docs litellm content filter

* fix lnting

* Potential fix for code scanning alert no. 3675: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-06 16:02:28 -08:00
Ishaan JaffandGitHub c98b125851 [Feat] OTEL - Log Cost Breakdown on OTEL Logger (#16334)
* add gen_ai cost metrics

* TestOpenTelemetryCostBreakdown

* fix QA check

* validate_redacted_message_span_attributes
2025-11-06 13:53:53 -08:00
Sameer KankuteandGitHub b762493ec5 Remove aws params from claude4_5 request (#16315) 2025-11-06 10:10:30 -08:00
Sameer KankuteandGitHub ee50f09e73 Added xai responses support (#16310) 2025-11-06 08:39:28 -08:00
Krish DholakiaandGitHub 80440e11a7 Revert "Update MCP version from 1.10.1 to 1.20.0 (#16281)" (#16300)
This reverts commit 34c12d0131.
2025-11-05 18:42:34 -08:00
Jamie GoodyearandGitHub 2c9970742f [LiteLLM-16250] Proxy to Bedrock will add name to file content, breaks when cache_control in use (#16275) 2025-11-05 18:39:38 -08:00
Guan Zheng HuangandGitHub 34c12d0131 Update MCP version from 1.10.1 to 1.20.0 (#16281)
* Update MCP version from 1.10.1 to 1.20.0

- Update mcp dependency: 1.10.1 -> 1.20.0 in requirements.txt, pyproject.toml, and CI config
- Update uvicorn dependency: 0.29.0 -> 0.31.1 (required by MCP 1.20.0)
- Update PyJWT constraint to support newer versions required by MCP
- Update all CI pipeline references to MCP 1.20.0
- Add test to verify MCP version and import compatibility

MCP 1.20.0 requires uvicorn >=0.31.1 and PyJWT >=2.10.1.
MCP package remains Python >=3.10 only (no change to version constraint).

* Update poetry.lock for MCP 1.20.0
2025-11-05 18:34:28 -08:00
yuneng-jiangandGitHub 812c8b88e9 Fixed /model_group/info returning entire model list for SSO users (#16296) 2025-11-05 18:30:30 -08:00
Ishaan JaffGitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
630a746c84 [Feat] Add Custom Secret Manager - Allow users to define and write a custom secret manager (#16297)
* add CustomSecretManager class

* docs custom secret manager

* add TestCustomSecretManager

* add KeyManagementSystem.CUSTOM

* add get_secret_from_manager

* add custom secret manager

* Potential fix for code scanning alert no. 3662: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* docs fix

* load_custom_secret_manager

* initialize_secret_manager

* add custom_secret_manager

* fix add custom secret manager

* add custom secret manager to KeyManagementSystem

* fix KeyManagementSystem.CUSTOM

* fix custom secret manager within cookbook

* fix link for custom secret manager

* Potential fix for code scanning alert no. 3663: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-05 17:20:26 -08:00
Ishaan JaffandGitHub 2541a54023 [Feat] Email Notifications - Ensure Users get Key Rotated Email (#16292)
* add virtual_key_rotated

* add KEY_ROTATED_EMAIL_TEMPLATE

* fix base email

* add _send_key_rotated_email

* fix _send_key_rotated_email

* key rotated email fix

* fix: async_key_generated_hook ensure behavior matches regenerate

* test_send_key_rotated_email

* expose EMAIL_INCLUDE_API_KEY

* docs mask api keys

* add email regen

* docs key regen

* docs email

* docs email

* docs fix

* fix code qa check
2025-11-05 15:56:49 -08:00
3ef210e5f4 Add allowing Key based prefix to s3 path (#16237)
* add Key based prefix

* add Key based prefix

* update documentation

* correct doc

---------

Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-11-05 14:43:21 -08:00
dean-zavadandGitHub f19356db60 Litellm noma guardrail support images (#16199)
* noma support v2 api and images with during call

* supporting streams and images with texts

* Supporting text now

* annonymization works

* removing function

* fixing noma.py

* all old tests pass

* adding new tests

* removing changes

* Fixing application id headers

* fix whitespace

* deleting unused imports
2025-11-05 11:23:39 -08:00
Sameer KankuteandGitHub c45fad3855 Fix: Send Gemini API key via x-goog-api-key header with custom api_base (#16085)
* Add gemini api key in the custom api url

* Update tests

* Use api key n the header

* Use api key n the header

* fix mypy error

* fix mypy error

* fix test gemini auth
2025-11-05 07:12:13 -08:00
Alexsander HamirandGitHub 727fe504bb fix(redis): handle float redis_version from AWS ElastiCache Valkey (#16207)
* fix(redis): handle float redis_version from AWS ElastiCache Valkey

AWS ElastiCache Valkey returns redis_version as a float (7.0) instead
of a string ('7.0.0'), causing AttributeError: 'float' object has no
attribute 'split' in async_lpop when parsing version for LPOP count.

Changes:
- Extract version parsing into _parse_redis_major_version() helper
- Add DEFAULT_REDIS_MAJOR_VERSION constant (replaces magic number)
- Support multiple version formats: string, float, int, malformed
- Add comprehensive test coverage for all version format edge cases

Fixes: 'LiteLLM Redis Cache LPOP: - Got exception from REDIS' error
during db_spend_update_job cronjobs

* refactor: move DEFAULT_REDIS_MAJOR_VERSION to constants.py
2025-11-04 19:20:00 -08:00
Alan PonnachanandGitHub b564ed81f5 add reasoning effort and test (#16261) 2025-11-04 18:53:02 -08:00
YutaSaitoandGitHub 8e27b6c0b4 [MCP] configure static mcp header (#16179)
* feat: configure extra mcp headers in ui

* doc: static header

* build: add new migration file

* chore: add missing image file

* fix: test
2025-11-03 21:06:36 -08:00
Alan PonnachanandGitHub 45cf6fc289 feat: support dashscope tiered pricing
* add helper functions

* update generic_cost_per_token function

* add test

* formatting

* add examples in docstring for _calculate_tiered_cost

* Restore files to upstream/main version

* dashscope specific calculation

* improve for different costs

* remove _calculate_flat_cost function
2025-11-03 20:27:25 -08:00
Niv GoldenbergandGitHub 232d1558dd fix(anthropic-adapter): properly translate Anthropic image format to OpenAI (#16202)
* fix(anthropic-adapter): properly translate Anthropic image format to OpenAI

Fixed bug where images were stripped during Anthropic Messages API to Azure
OpenAI translation. Image source data was being stringified instead of having
fields properly extracted.

- Added _translate_anthropic_image_to_openai() helper method
- Support both base64 and URL image formats per Anthropic API spec
- Refactored user message and tool result image handling

* test(anthropic-adapter): add comprehensive image translation tests

Add 5 unit tests covering image translation from Anthropic to OpenAI format:
- User messages with base64 images
- User messages with URL images
- Tool results with base64 images
- Tool results with URL images
- Mixed content with multiple images
2025-11-03 18:53:44 -08:00
Ishaan JaffandGitHub 0737cc7c13 [Feat] s3 logger, add support for ssl_verify when using minio logger (#16211)
* fixes s3_v2 verify

* test_s3_verify_false_async_client

* fix

* ruff fixes
2025-11-03 13:56:00 -08:00
Sameer KankuteandGitHub ad6a0f4d44 Update perplexity cost tracking (#15743)
* Update perplexity cost tracking

* fix lint errors

* fix code

* fix tests in perplexity

* fix test realted to api call

* fix exception test
2025-11-03 08:45:34 -08:00
Krish DholakiaandGitHub 07d2a27f14 Milvus - Passthrough API support - adds create + read vector store support via passthrough API's (#16170)
* feat(llm_passthrough_endpoints.py): support milvus passthrough api

* fix(llm_passthrough_endpoints.py): move streaming request value to the top of the function

* docs: document new milvus vector store passthrough flow
2025-11-02 09:47:58 -08:00
6ed76ff809 feat: change guardrail_information to list type (#16127)
* feat: change guardrail_information to list type to support displaying multiple guardrails

* fix: add missing commit and revert auto-format changes in utils.py

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2025-11-02 09:47:49 -08:00
Krish DholakiaandGitHub 74ae7aed44 build: Squashed commit of the following: (#16176)
commit bb0b050fb01633d83c1c2932f8e9c11432911847
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Sat Nov 1 20:00:01 2025 -0700

    test: update tests

commit b2da4bdac23868e69a9452805b231f8830e49912
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Wed Oct 22 14:58:01 2025 -0700

    fix(langfuse_otel_attributes.py): log tools and other optional params

commit 75bee1f2748f32b230467de0b085c55bf1d687a9
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Wed Oct 22 14:42:05 2025 -0700

    feat(langfuse_otel/): working request/response logging on spans

    Closes https://github.com/BerriAI/litellm/issues/13764

commit a3e4fa5b81e82f71c74fb9e7dc859c6cb40495f5
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Wed Oct 22 14:20:39 2025 -0700

    fix: initial commit fixing langfuse request/response logging with OTEL

commit 09fc9deac844004104822810e42975cd9c68f0e3
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Wed Oct 22 13:33:52 2025 -0700

    fix(litellm_logging.py): for responses api - return a unified usage object for logging

    ensures logging integrations all pull the right usage information
2025-11-02 09:46:40 -08:00
Geoffray ViossatandGitHub 3922bb6ed5 fix: return the diarized transcript when it's required in the request (#16133) 2025-11-02 09:45:18 -08:00
99775fa0f8 Support responses API streaming in langfuse otel (#16153)
* streaming support in langfuse otel

* Added testing for Langfuse Otel tracing in the response API

---------

Co-authored-by: eycjur <eycjur@example.com>
2025-11-02 09:36:34 -08:00
Krish DholakiaandGitHub 3f40613c56 fix(ui_sso.py): support dot notation on ui sso (#16135) 2025-11-02 09:35:52 -08:00
20b95e9a80 strip base64 in s3 (#16157)
* strip base64

* strip base64

* s3 use key prefix

* s3 use key prefix

* strip base64 doc

---------

Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-11-02 09:06:53 -08:00
steve-gore-snapdocsandGitHub 88240c4cba Fix Anthropic token counting for VertexAI (#16171)
* transform anthropic messages in gemini handler

* initial

* linting

* remove extra testt

* maintain consistency

* more tests

* Revert "transform anthropic messages in gemini handler"

This reverts commit 805e60fd2887991bb4b4554b9394437b874835f9.

* don't lint file we aren't changing

* cleanup

* cleanup

* Cleanup
2025-11-02 09:02:07 -08:00
Ishaan JaffandGitHub 579843b4bc UI - Fix regression where Guardrail Entity Could not be selected and entity was not displayed (#16165)
* fix PiiEntityCategoryMap

* fix OpenAIChatCompletionsHandler

* fix lint
2025-11-01 18:00:54 -07:00
0c743e1adc Add E2E Container API Support (#16136)
* Add v1 cut of container api

* fix lint errors

* Add proxy support to container apis & logging support (#16049)

* Add proxy support to container apis

* Add logging support

* Add cost tracking support for containers and documentation

* Add new constant documentation

* Add container cost in model map

* fix failing azure tests

* Update tests based on model map changes

* fix model map tests

* fix model map tests

* Container modeshould be container

* Container tests fix

* Merge branch 'main' into litellm_sameer_oct_staging_2

---------

Co-authored-by: Ishaan Jaffer <ishaanjaffer0324@gmail.com>
2025-11-01 14:03:51 -07:00
Sameer KankuteandGitHub 2337d150e4 Fix azure doesn't accept extra body param (#16116)
* Fix azure doesn't accept extra body param

* add test issue
2025-11-01 13:31:40 -07:00
Sameer KankuteandGitHub f804ab6de5 Add LLM provider response headers to Responses API (#16091)
* Add llm headers to responses api

* fix mock test
2025-11-01 13:25:56 -07:00