mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-17 04:34:25 +00:00
* fix(vertex_ai): return 400 with file line number for malformed batch JSONL row Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(vertex_ai): keep yield outside the JSON decode guard Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(http_handler): surface BaseLLMException raised while streaming a request body Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(http_handler): only follow __cause__ when unwrapping streamed body errors Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(http_handler): avoid recursive streamed error unwrapping Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(vertex_ai): return a 400 naming the line for wrong-shape and non-UTF-8 batch rows Keep main's error path for a directly raised provider error and only unwrap one found behind a transport error. Add the parser column to invalid JSON errors, and cover the real aiohttp chain in the _handle_error test * fix(vertex_ai): report every row conversion error as a 400 naming its line A message with no role, a non-string role, a bad temperature, or a litellm BadRequestError raised while converting a row still returned a 500, and the async upload lost the 400 for litellm's own exceptions. The stream now turns any error from one row's conversion into a 400 naming that line. _handle_error only unwraps an httpx.TransportError, which is what the aiohttp transport raises around a failing request body, so other callers keep their own status. A file that starts with a UTF-8 byte order mark now uploads, and provider messages start with 'Batch input file line N' like the proxy check. * fix(vertex_ai): reject null or missing batch bodies and unparseable rows with a 400 naming the line A chat row whose body is missing or not an object now raises a 400 naming its line instead of uploading a blank prompt, and a non-object body on line 1 no longer crashes the GCS object name lookup. Rows too deeply nested or too long to parse return a 400 from both the SDK and the proxy's own batch file check. JSON error columns now count leading whitespace. * fix(vertex_ai): keep batch rows on their file line through router and guardrail rewrites The Router model rewrite and batch guardrails now keep blank lines and blank out dropped records, so a provider error naming a line still points into the caller's file. The rewrite strips a leading BOM per line, and a non-string body.model on line 1 is reported as a 400 naming the line * test(integration): cover Vertex batch row line errors across routes, rewrites, SDK and worker chaos * fix(router): keep blank lines only for Vertex batch uploads and leave guardrail rewrites compact * test(integration): score the whole OpenAI upload after a guardrail drop and cover a mixed OpenAI and Vertex batch upload --------- Co-authored-by: jesus <jesus@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| test_aiohttp_session_rebuild_wire.py | ||
| test_anthropic_messages_bridge_mid_stream_failure_sdk.py | ||
| test_azure_prompt_shield_tuple_messages.py | ||
| test_bedrock_converse_redacted_thinking_router_sdk.py | ||
| test_bedrock_converse_stream_sync_decoder_wire.py | ||
| test_bedrock_model_discovery_sdk.py | ||
| test_cache_control_census_pydantic_messages_sdk.py | ||
| test_caching_redis_sdk.py | ||
| test_callback_logging_cache.py | ||
| test_databricks_json_schema_refs_sdk.py | ||
| test_device_code_login_guard_sdk.py | ||
| test_dual_cache_redis.py | ||
| test_generic_api_callback.py | ||
| test_http2_wire.py | ||
| test_idle_upstream_reconnect_sdk.py | ||
| test_interception_converted_stream_options_sdk.py | ||
| test_langfuse_redaction_sdk.py | ||
| test_ocr_matrix_sdk.py | ||
| test_openai_sdk_client_sessions_wire.py | ||
| test_owned_redis_ports.py | ||
| test_provider_budget_redis.py | ||
| test_redis_breaker_metrics_multiprocess_sdk.py | ||
| test_redis_cluster_iam_auth.py | ||
| test_redis_service_metrics.py | ||
| test_response_cache_sync_sdk.py | ||
| test_responses_bridge_stream_errors_sdk.py | ||
| test_responses_bridge_tool_search_sdk.py | ||
| test_router_behavior_wire.py | ||
| test_router_budget_limiter_wire.py | ||
| test_router_cooldown_fallback_sdk.py | ||
| test_router_include_fallback_errors_wire.py | ||
| test_router_lowest_latency_wire.py | ||
| test_router_redis_tls_url.py | ||
| test_router_sync_stream_fallback_wire.py | ||
| test_router_tool_call_stream_fallback_budget_wire.py | ||
| test_router_unsupported_params_fallback_wire.py | ||
| test_sagemaker_embedding_sdk.py | ||
| test_slack_daily_report_redis.py | ||
| test_sync_stream_connection_release_wire.py | ||
| test_tool_loop_server_tool_replay_sdk.py | ||
| test_topaz_image_variation_trailing_slash_sdk.py | ||
| test_usage_based_routing_sdk_redis_reads.py | ||
| test_usage_routing_counter_ttl.py | ||
| test_vertex_batch_row_line_errors_sdk.py | ||
| test_vertex_gemini_image_batch_cost_sdk.py | ||
| test_vertex_gemini_stream_timeout_wire.py | ||
| test_vertex_partner_count_tokens_sdk.py | ||