The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_hotfix_gpt-5.5-minimal-flag
Cursor Agenta30bcc9a41ef
diff --cc litellm/llms/vertex_ai/common_utils.pyindex 8a6b5ddd70b,c72160f7d0a..e6e39651109--- a/litellm/llms/vertex_ai/common_utils.py+++ b/litellm/llms/vertex_ai/common_utils.py@@@ -597,10 -647,15 +647,17 @@@ def process_items(schema, depth=0)f"Max depth of {DEFAULT_MAX_RECURSE_DEPTH} exceeded while processing schema. Please check the schema for excessive nesting.")if isinstance(schema, dict):- if "items" in schema and schema["items"] == {}:+ # Vertex requires `items` whenever `type == "array"` (even inside anyOf).+ # Normalize: empty `items: {}` and missing-items both become {"type": "object"}.+ type_val = schema.get("type")+ if (+ isinstance(type_val, str)+ and type_val.lower() == "array"+ and ("items" not in schema or schema.get("items") == {})+ ):schema["items"] = {"type": "object"}+ elif schema.get("type") == "array" and "items" not in schema:+ schema["items"] = {"type": "object"}for key, value in schema.items():if isinstance(value, dict):process_items(value, depth + 1)diff --cc litellm/model_prices_and_context_window_backup.jsonindex 82aa4a6a0d7,6078d7e6907..b49d97dc4e3--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@@ -19367,15 -19976,15 +19976,15 @@@"supports_web_search": true,"supports_none_reasoning_effort": true,"supports_xhigh_reasoning_effort": true,- "supports_minimal_reasoning_effort": true+ "supports_minimal_reasoning_effort": false},"gpt-5.5-pro": {- "cache_read_input_token_cost": 6e-06,- "cache_read_input_token_cost_above_272k_tokens": 1.2e-05,- "input_cost_per_token": 6e-05,- "input_cost_per_token_above_272k_tokens": 0.00012,- "input_cost_per_token_flex": 3e-05,- "input_cost_per_token_batches": 3e-05,+ "cache_read_input_token_cost": 3e-06,+ "cache_read_input_token_cost_above_272k_tokens": 6e-06,+ "input_cost_per_token": 3e-05,+ "input_cost_per_token_above_272k_tokens": 6e-05,+ "input_cost_per_token_flex": 1.5e-05,+ "input_cost_per_token_batches": 1.5e-05,"litellm_provider": "openai","max_input_tokens": 1050000,"max_output_tokens": 128000,@@@ -19410,16 -20019,15 +20019,16 @@@"supports_web_search": true,"supports_none_reasoning_effort": false,"supports_xhigh_reasoning_effort": true,- "supports_minimal_reasoning_effort": true+ "supports_minimal_reasoning_effort": false,+ "supports_low_reasoning_effort": false},"gpt-5.5-pro-2026-04-23": {- "cache_read_input_token_cost": 6e-06,- "cache_read_input_token_cost_above_272k_tokens": 1.2e-05,- "input_cost_per_token": 6e-05,- "input_cost_per_token_above_272k_tokens": 0.00012,- "input_cost_per_token_flex": 3e-05,- "input_cost_per_token_batches": 3e-05,+ "cache_read_input_token_cost": 3e-06,+ "cache_read_input_token_cost_above_272k_tokens": 6e-06,+ "input_cost_per_token": 3e-05,+ "input_cost_per_token_above_272k_tokens": 6e-05,+ "input_cost_per_token_flex": 1.5e-05,+ "input_cost_per_token_batches": 1.5e-05,"litellm_provider": "openai","max_input_tokens": 1050000,"max_output_tokens": 128000,diff --cc model_prices_and_context_window.jsonindex 830988b7a2e,c38c14a1f75..76dcfc55c10--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@@ -19381,15 -19990,15 +19990,15 @@@"supports_web_search": true,"supports_none_reasoning_effort": true,"supports_xhigh_reasoning_effort": true,- "supports_minimal_reasoning_effort": true+ "supports_minimal_reasoning_effort": false},"gpt-5.5-pro": {- "cache_read_input_token_cost": 6e-06,- "cache_read_input_token_cost_above_272k_tokens": 1.2e-05,- "input_cost_per_token": 6e-05,- "input_cost_per_token_above_272k_tokens": 0.00012,- "input_cost_per_token_flex": 3e-05,- "input_cost_per_token_batches": 3e-05,+ "cache_read_input_token_cost": 3e-06,+ "cache_read_input_token_cost_above_272k_tokens": 6e-06,+ "input_cost_per_token": 3e-05,+ "input_cost_per_token_above_272k_tokens": 6e-05,+ "input_cost_per_token_flex": 1.5e-05,+ "input_cost_per_token_batches": 1.5e-05,"litellm_provider": "openai","max_input_tokens": 1050000,"max_output_tokens": 128000,@@@ -19424,16 -20033,15 +20033,16 @@@"supports_web_search": true,"supports_none_reasoning_effort": false,"supports_xhigh_reasoning_effort": true,- "supports_minimal_reasoning_effort": true+ "supports_minimal_reasoning_effort": false,+ "supports_low_reasoning_effort": false},"gpt-5.5-pro-2026-04-23": {- "cache_read_input_token_cost": 6e-06,- "cache_read_input_token_cost_above_272k_tokens": 1.2e-05,- "input_cost_per_token": 6e-05,- "input_cost_per_token_above_272k_tokens": 0.00012,- "input_cost_per_token_flex": 3e-05,- "input_cost_per_token_batches": 3e-05,+ "cache_read_input_token_cost": 3e-06,+ "cache_read_input_token_cost_above_272k_tokens": 6e-06,+ "input_cost_per_token": 3e-05,+ "input_cost_per_token_above_272k_tokens": 6e-05,+ "input_cost_per_token_flex": 1.5e-05,+ "input_cost_per_token_batches": 1.5e-05,"litellm_provider": "openai","max_input_tokens": 1050000,"max_output_tokens": 128000,diff --cc tests/test_litellm/llms/vertex_ai/test_vertex_ai_common_utils.pyindex 5d8dec75456,7cb3faf6177..6c549af2cc5--- a/tests/test_litellm/llms/vertex_ai/test_vertex_ai_common_utils.py+++ b/tests/test_litellm/llms/vertex_ai/test_vertex_ai_common_utils.py@@@ -297,19 -300,38 +300,50 @@@ def test_process_items_basic()process_items(schema)assert schema["items"] == {"type": "object"}+ # Test array missing items inside anyOf branch+ schema = {+ "type": "object",+ "properties": {+ "callbacks": {+ "anyOf": [{"type": "array"}, {"type": "object"}],+ }+ },+ }+ process_items(schema)+ assert schema["properties"]["callbacks"]["anyOf"][0]["items"] == {"type": "object"}++ def test_build_vertex_schema_array_branch_missing_items_in_anyof():+ """+ Regression: an `anyOf` branch with `{"type": "array"}` (no items) must+ end up with synthesized `items: {"type": "object"}` after the schema+ transform — Vertex returns INVALID_ARGUMENT otherwise.+ """+ from litellm.llms.vertex_ai.common_utils import _build_vertex_schema++ parameters = {+ "properties": {+ "callbacks": {+ "anyOf": [+ {"type": "array"},+ {"type": "object"},+ {"type": "null"},+ ]+ }+ },+ "type": "object",+ }++ result = _build_vertex_schema(parameters)+ callbacks_anyof = result["properties"]["callbacks"]["anyOf"]+ array_branches = [b for b in callbacks_anyof if b.get("type") == "array"]+ assert array_branches, "expected an array branch to remain after transform"+ for branch in array_branches:+ assert branch.get("items") == {+ "type": "object"+ }, f"array branch must have items synthesized; got {branch}"++def test_vertex_ai_complex_response_schema():import jsonfrom copy import deepcopy