mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix(google_genai): honor snake_case generation_config on generateContent
Read the request config from generationConfig or generation_config in the shared setup step, and map maxOutputTokens, topP and stopSequences from either spelling on the non-Gemini adapter path, so a snake_case output cap is no longer dropped.
* fix(google_genai): read snake_case generation_config in the rate limiter
* test(google_genai): cover the limiter's Google config precedence
Covers an empty config next to a filled generationConfig and both config spellings in one request, for the cap check and the injected cap, and types the new test params as Mapping.
* fix(google_genai): give a custom generateContent hook an empty config as {} again
* fix(google_genai): read quoted generationConfig numbers and answer 400 for an invalid config
The adapter now reads temperature, the output cap, topP and the stop
sequences as Google types them, so a quoted number like "16" reaches
non-Gemini models as a number. A config that is not an object, or a
field value Google refuses, answers 400 in either spelling before any
provider call, where camelCase answered 500 and snake_case was dropped
* fix(google_genai): read numbers the way the Gemini API types them and accept a typed GenerateContentConfig
* fix(google_genai): read signed and leading-dot number strings and refuse non-finite floats as the Gemini API does
* fix(google_genai): match number strings without backtracking so a long malformed value cannot stall the event loop
---------
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| litellm_skills | ||
| model_capacity_golden | ||
| __init__.py | ||
| native_capacity_handler.py | ||
| parallel_request_limiter_v3_golden.json | ||
| test_async_post_call_streaming_iterator_hook.py | ||
| test_autorouter_baseline_cache.py | ||
| test_banned_keyword_list.py | ||
| test_batch_enqueued_tokens.py | ||
| test_batch_enqueued_tokens_rust.py | ||
| test_batch_file_validation.py | ||
| test_batch_rate_limiter.py | ||
| test_dynamic_rate_limiter.py | ||
| test_dynamic_rate_limiter_v3_on_native_limiter_rust.py | ||
| test_dynamic_rate_limiter_v3_rust.py | ||
| test_image_generation_guardrails.py | ||
| test_key_management_event_hooks.py | ||
| test_max_budget_per_session_limiter.py | ||
| test_max_iterations_limiter.py | ||
| test_message_thread_ownership.py | ||
| test_model_budget_shared_windows.py | ||
| test_model_capacity_native.golden.json | ||
| test_model_capacity_native.py | ||
| test_model_max_budget_limiter.py | ||
| test_parallel_request_limiter.py | ||
| test_parallel_request_limiter_v3.py | ||
| test_parallel_request_limiter_v3_native.py | ||
| test_parallel_request_limiter_v3_rust.py | ||
| test_post_call_failure_hook_integration.py | ||
| test_post_call_response_headers_hook.py | ||
| test_post_call_streaming_hook_integration.py | ||
| test_post_call_success_hook_integration.py | ||
| test_priority_class_share.py | ||
| test_prompt_cache_observer.py | ||
| test_prompt_injection_detection.py | ||
| test_proxy_hooks_init.py | ||
| test_proxy_rate_limit_provider_field.py | ||
| test_proxy_rate_limit_provider_field_capacity_rust.py | ||
| test_proxy_rate_limit_provider_field_rust.py | ||
| test_proxy_track_cost_callback.py | ||
| test_rate_limiter_toctou_capacity_rust.py | ||
| test_rate_limiter_toctou_rust.py | ||
| test_search_free_tier.py | ||
| test_send_invite_email.py | ||
| test_sensitive_data_routing.py | ||
| test_tpm_concurrent.py | ||
| test_tpm_concurrent_rust.py | ||
| test_unit_test_max_model_budget_limiter.py | ||
| test_user_management_event_hooks.py | ||