## 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.
* 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
* 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
* Fix bug, add new unit test
* Extract payload builder code to a separate namespace
* Update opik.py to use logic from the new namespace
* Code cleanup, type hints improvements
* Run linter
* Log model name as span field
* Reformat arguments in payload builders
* Use dataclasses for payloads, use opik native client if it's available
* Add cost and provider
* Add provider mapping
- Add HCP_VAULT_MOUNT_NAME env var to override default 'secret' mount
- Add HCP_VAULT_PATH_PREFIX env var to add prefix to secret paths
- Update get_url() method to construct URLs with configurable mount and prefix
- Add test coverage for custom mount names and path prefixes
- Maintain backward compatibility with existing configurations
This allows users to configure Vault paths like:
- Custom mount: {VAULT_ADDR}/v1/{MOUNT_NAME}/data/{SECRET}
- With prefix: {VAULT_ADDR}/v1/secret/data/{PREFIX}/{SECRET}
- Both: {VAULT_ADDR}/v1/{MOUNT_NAME}/data/{PREFIX}/{SECRET}
Resolves issue where mount name was hardcoded and path prefixes weren't supported.
* KeyManagementSystem add cyberark
* add CyberArkSecretManager
* add CyberArkSecretManager
* add CyberArkSecretManager
* docs add CyberArkSecretManager
* docs
* refactor to use get_secret_from_manager
* Potential fix for code scanning alert no. 3645: Clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 3650: Clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 3649: Clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 3646: 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>
* 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
* 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
* Update langfuse.py
Fixing issue with input_tokens and cache_read_tokens
* Clarify input token calculation in langfuse.py
Add comment to clarify input token calculation based on Langfuse documentation.
* 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
* Fix: Remove automatic summary field from reasoning_effort transformation
Problem:
The _map_reasoning_effort() function was automatically adding
reasoning.summary field when users specified reasoning_effort parameter,
causing 400 errors for users with unverified OpenAI organizations.
Root Cause:
According to OpenAI's official documentation, the summary field is opt-in
and requires organization verification:
"Reasoning summary output [...] will not be included unless you explicitly
opt in to including reasoning summaries."
"Before using summarizers with our latest reasoning models, you may need
to complete organization verification"
Source: https://platform.openai.com/docs/guides/reasoning#reasoning-summaries
Solution:
Remove the automatic inclusion of summary field from all reasoning_effort
levels (high, medium, low, minimal). Users who want reasoning summaries
can explicitly pass reasoning={"effort": "high", "summary": "auto"} in
their requests.
Impact:
- Fixes#16032
- Works for all organizations (verified and unverified)
- Maintains backward compatibility for users passing reasoning object directly
- Follows OpenAI's recommended opt-in approach
Testing:
- All existing tests pass (4/4 tests in transformation suite)
- Manual verification confirms only effort field is included
* test: Fix MockResponse missing headers attribute in test_openai_responses_api
The MockResponse class was missing the 'headers' attribute which caused
APIConnectionError when processing the mock response. Added headers={}
to fix the test.
* feat: Add dict support to reasoning_effort parameter
Allow users to pass reasoning_effort as either:
- String: reasoning_effort="high" (no summary, safe default)
- Dict: reasoning_effort={"effort": "high", "summary": "detailed"} (opt-in)
This preserves backward compatibility while giving users flexibility
to explicitly opt-in to the summary field when needed (for verified
OpenAI organizations).
---------
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
This change enables HTTP client session reuse by:
- Adding shared_session parameter to all responses API methods (responses, delete_responses, get_responses, list_input_items, cancel_responses)
- Passing shared_session to get_async_httpx_client() for connection pooling
- Adding debug logging to track shared session usage
This helps reduce memory overhead by reusing HTTP connections instead of creating new clients for each request, which is particularly important for high-throughput proxy scenarios.