- Implemented VolcEngineEmbeddingHandler for synchronous and asynchronous embedding requests.
- Created VolcEngineEmbeddingConfig for transforming requests and responses to/from Volcengine format.
- Added integration tests for embedding functionality, covering various scenarios including error handling and parameter validation.
- Established test structure for Volcengine embedding, ensuring compliance with LiteLLM testing patterns.
- Included comprehensive tests for parameter mapping, request transformation, and response handling.
* Fix issue #13995: Handle None metadata in batch requests
- Added null check in add_key_level_controls method to prevent NoneType error
- Updated type hint to Optional[dict] for better type safety
- Added comprehensive test suite to verify the fix works correctly
- All existing tests pass, confirming no regression
Fixes#13995
Co-authored-by: openhands <openhands@all-hands.dev>
* Move test file to tests/test_litellm/proxy/ directory
- Moved test_batch_metadata_none_fix.py from tests/ to tests/test_litellm/proxy/
- Updated import structure to match existing test patterns
- This ensures the test runs in GitHub Actions as requested by @krrishdholakia
Co-authored-by: openhands <openhands@all-hands.dev>
---------
Co-authored-by: openhands <openhands@all-hands.dev>
* fix: pass extra_headers parameter through responses API transformation chain
Ensure extra_headers parameter is properly forwarded from the responses() function
through the transformation handler and config to maintain header propagation in
litellm_completion_request dict.
* Add tests
- Updated the "supports_tool_choice" field to true in the model_prices_and_context_window.json file, allowing for tool choice functionality in the specified model.
Signed-off-by: Ifta Khairul Alam Adil <ikaadil007@gmail.com>
- Cleaned up the code by removing an extra blank line in the GoogleImageGenConfig class.
- This minor adjustment improves code readability without affecting functionality.
Signed-off-by: Ifta Khairul Alam Adil <ikaadil007@gmail.com>
- Remove unnecessary model name prefix stripping
- Directly use the model name in the API URL construction
This change streamlines the URL generation process for the Google AI API, ensuring compatibility with model names without the 'gemini/' prefix.
Signed-off-by: Ifta Khairul Alam Adil <ikaadil007@gmail.com>
- Fix URL construction in Gemini image generation to strip 'gemini/' prefix
- Google AI API expects base model name without the prefix
- Update model references and pricing information for consistency
- Remove outdated image generation pricing entries
Fixes issue where models like 'gemini/imagen-4.0-fast-generate-preview-06-06'
were being rejected by the Google AI API due to incorrect URL formatting.