Commit Graph
27137 Commits
Author SHA1 Message Date
yuneng-jiangandGitHub 0a90283fec Change usage page to have a parent date picker (#16264) 2025-11-07 10:00:37 -08:00
huangyfandGitHub 20d1bed514 fix lobal.anthropic.claude-haiku-4-5-20251001-v1:0 supports_reasoning (#16263) 2025-11-06 19:35:57 -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
Shimon MimounandGitHub 277e370b3c inti (#16313) 2025-11-06 19:30:41 -08:00
Aleksei TerinandGitHub 514969d7f7 fix: pass aws_region_name in litellm_params (#16321) 2025-11-06 19:29:38 -08:00
Cesar GarciaandGitHub 16325024df fix: Use valid CallTypes enum value in embeddings endpoint (#16328)
* Fix embeddings endpoint call_type to use valid CallTypes enum value

Fixed bug where the `/embeddings` endpoint was passing `call_type="embeddings"`
to guardrail hooks, but "embeddings" is not a valid value in the CallTypes enum.

Changed to use `call_type="aembedding"` (async embedding) which is the correct
CallTypes enum value and matches the route_type used in the same function.

Added unit tests to verify:
- "embeddings" is not a valid CallTypes enum value
- "aembedding" is the correct valid value
- The fix prevents ValueError when guardrails are enabled

Fixes #16240

* Inline embeddings call type regression check

* Ensure embedding test preserves proxy metadata
2025-11-06 19:25:00 -08:00
yuneng-jiangandGitHub 29e8d857f7 Fix SSO Proxy Base URL input validation and remove normalizing / (#16332) 2025-11-06 19:24:05 -08:00
Sameer KankuteandGitHub 83998d3573 Update the fireworks url in tests and doc (#16346) 2025-11-06 19:22:21 -08:00
Ishaan Jaffer 93426ba331 ui new build 2025-11-06 19:20:40 -08:00
Ishaan Jaffer 9c59d42fc1 bump extras pkg 2025-11-06 19:17:03 -08:00
Ishaan Jaffer d6271ceefb test fixes mock tests 2025-11-06 19:11:19 -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 1d0b25dfa0 fix mapped tests 2025-11-06 18:47:51 -08:00
Ishaan Jaffer 5157078e0a test_delete_callbacks_in_db 2025-11-06 18:37:36 -08:00
Ishaan Jaffer 7af8acdc22 test_gpt_5_reasoning_streaming fixes 2025-11-06 18:16:18 -08:00
Ishaan Jaffer 6be5ad5902 fix _parse_request_data_by_content_type 2025-11-06 17:28:52 -08:00
Ishaan Jaffer 3b1ff2a004 test_standard_logging_payload_includes_guardrail_information 2025-11-06 17:28:27 -08:00
Ishaan Jaffer a05159dc6e docs fix 2025-11-06 17:21:23 -08:00
Ishaan Jaffer b5d81a5d9c test_completion_text_003_prompt_array, test_key_generate_with_secret_manager_call 2025-11-06 17:18:01 -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 Jaffer 79d6f40855 fix gemini-live-2.5-flash-preview-native-audio-09-2025 2025-11-06 17:02:50 -08:00
Ishaan Jaffer 1ca6125d64 fix DEFAULT_REDIS_MAJOR_VERSION 2025-11-06 17:00:15 -08:00
Ishaan Jaffer 0a8ae52014 test_guardrail_status_fields_computation 2025-11-06 16:56:50 -08:00
Ishaan Jaffer e6d7a0a153 test fixes 2025-11-06 16:29:18 -08:00
Ishaan Jaffer 89a73b853a fix cyber ark 2025-11-06 16:26:14 -08:00
Ishaan Jaffer 830a9e9585 docs fix 2025-11-06 16:22:17 -08:00
Ishaan Jaffer abd090f151 fix Tuple 2025-11-06 16:19:10 -08:00
Ishaan Jaffer 61cf169926 test_basic_openai_responses_api_streaming 2025-11-06 16:18:30 -08:00
Ishaan Jaffer 7ec2d103f6 test router endpoitns 2025-11-06 16:17:14 -08:00
Ishaan Jaffer 811b5a3c98 test_firecrawl_search_request_body 2025-11-06 16:15:02 -08:00
Ishaan Jaffer 21757af83d parse_jsonl_with_embedded_newlines 2025-11-06 16:05:12 -08:00
Ishaan JaffandGitHub bdc4969526 [Feat] UI - Allow configuring LiteLLM Custom Guardrail (#16339)
* 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

* use ENUM for PrebuiltPatternName

* fix validate_blocked_words_file

* add validateBlockedWordsFile

* LitellmContentFilterGuardrailConfigModel

* add get_config_model

* add litellm content filter

* refactored ui

* fix config

* tests for new components
2025-11-06 16:03:55 -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
Cesar GarciaandGitHub 1fec48499f fix: Pass extra_body to provider in Responses API requests (#16320)
## Problem
The `extra_body` parameter in `litellm.responses()` and `litellm.aresponses()`
was being accepted but never passed to the HTTP request sent to the LLM provider.
This prevented users from sending custom/experimental parameters to provider APIs.

## Changes
- Added `data.update(extra_body)` in `async_response_api_handler` (line 2138)
- Added `data.update(extra_body)` in `response_api_handler` (line 2012)
- Added tests to `test_openai_responses_api.py` for extra_body functionality

## Testing
- Tests verify extra_body params are passed in both sync and async modes
- Existing Responses API tests continue to pass
- Manually verified with OpenAI API that custom params are sent correctly

## Impact
Users can now pass custom/experimental parameters via extra_body:
```python
litellm.aresponses(
    model="gpt-4o",
    input="hello",
    extra_body={"custom_param": "value"}  # Now works!
)
```

This aligns with the OpenAI SDK pattern and matches behavior in other
LiteLLM endpoints (completion, embedding, etc.) that already support extra_body.
2025-11-06 14:54:40 -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 9dc22eed5c Update container documentation to be similar to others (#16327) 2025-11-06 10:08:45 -08:00
yuneng-jiangandGitHub b5956e0595 Add Azure AD Token field to Add Model Azure and make API Key not required (#16331) 2025-11-06 09:52:39 -08:00
Sameer KankuteandGitHub ee50f09e73 Added xai responses support (#16310) 2025-11-06 08:39:28 -08:00
Sameer KankuteandGitHub 11508c0339 Remove reasoning support from grok-4 models (#16265) 2025-11-05 18:44:05 -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
Sameer KankuteandGitHub 34abb7de1a Add azure gpt-5-pro in model map (#16235) 2025-11-05 18:41:53 -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
Cesar GarciaandGitHub 12284308a3 fix: Resolve MyPy type checking errors and CI linting (#16277)
* fix: Remove unused asyncio import from litellm_logging.py

- Fixes F401 linting error blocking CI

* fix: Add type ignore comments for MyPy false positives

- redis_cache.py: Add type ignore for aclose() - method exists but redis-py type stubs are incomplete
- redis_cluster_cache.py: Add type ignore for ping() and aclose() - redis-py typing issue
- responses/utils.py: Add type ignore for variable shadowing false positive
- transformation.py: Add type ignore for TypedDict expansion - runtime works correctly
- aws_secret_manager_v2.py: Add type ignore for dict[str, Any] assignment

All changes are safe - code works correctly in runtime, these are MyPy inference limitations.
Fixes 7 MyPy errors blocking CI without changing any logic.

* fix: Add type ignore for Redis async methods in cache files

- Add type: ignore[attr-defined] for aclose() in redis_cache.py
- Add type: ignore[attr-defined] for ping() and aclose() in redis_cluster_cache.py
- Methods exist but redis-py type stubs are incomplete

* refactor: Remove variable shadowing in _transform_response_api_usage_to_chat_usage

- Rename parameter 'usage' to 'usage_input' for clarity
- Rename local variable 'usage' to 'chat_usage' to avoid shadowing
- Eliminates MyPy false positive without needing type: ignore
- No functional changes - all tests pass
- Improves code readability and type safety
2025-11-05 18:36:06 -08:00