mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-17 23:51:30 +00:00
The Gemini batch embedding transformation was spreading all optional_params into the request body via **gemini_params. Params like max_tokens (injected by add_provider_specific_params_to_optional_params) would reach the Gemini API and cause a 400 BadRequestError. Extract _filter_embed_params() that maps dimensions/task_type and keeps only the fields Gemini embeddings actually accept (outputDimensionality, taskType, title). Applied to both transform_openai_input_gemini_content and transform_openai_input_gemini_embed_content. This also fixes drop_params: true not preventing the error, since the param was re-injected after the drop_params check. Fixes #24293 |
||
|---|---|---|
| .. | ||
| a2a_protocol/providers/pydantic_ai_agents | ||
| integrations/helicone | ||
| litellm_core_utils | ||
| llms | ||
| proxy | ||
| test_batch_completion_models_all_responses.py | ||
| test_bedrock_extended_beta_models.py | ||
| test_no_hardcoded_secrets.py | ||
| test_proxy_auth.py | ||
| test_router_retry_backoff_headers.py | ||
| test_stream_chunk_builder_images.py | ||