From 8b7fe007e1fc6f762400238fc9068955816ea29d Mon Sep 17 00:00:00 2001 From: jibanez-staticduo Date: Fri, 25 Sep 2026 19:55:06 +0200 Subject: [PATCH] fix(ci): repair PR 40366 lint and catalog gates --- .../crates/model-catalog/src/model_info.rs | 24 +++++++++++++++++++ litellm/experimental_mcp_client/client.py | 1 + litellm/llms/chatgpt/realtime.py | 18 +++++++------- ...odel_prices_and_context_window_backup.json | 4 ---- .../hooks/parallel_request_limiter_v3.py | 4 +--- litellm/proxy/realtime_endpoints/live.py | 16 ++++--------- model_prices_and_context_window.json | 4 ---- .../mcp_server/test_mcp_client_unit.py | 5 +++- 8 files changed, 42 insertions(+), 34 deletions(-) diff --git a/litellm-rust/crates/model-catalog/src/model_info.rs b/litellm-rust/crates/model-catalog/src/model_info.rs index 4a56e1112d1..b695fa18437 100644 --- a/litellm-rust/crates/model-catalog/src/model_info.rs +++ b/litellm-rust/crates/model-catalog/src/model_info.rs @@ -450,6 +450,30 @@ pub struct ModelInfo { pub output_cost_per_character_above_128k_tokens: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub output_cost_per_image: Option, + #[serde( + default, + rename = "output_cost_per_image_0.5K", + skip_serializing_if = "Option::is_none" + )] + pub output_cost_per_image_0_5k: Option, + #[serde( + default, + rename = "output_cost_per_image_1K", + skip_serializing_if = "Option::is_none" + )] + pub output_cost_per_image_1k: Option, + #[serde( + default, + rename = "output_cost_per_image_2K", + skip_serializing_if = "Option::is_none" + )] + pub output_cost_per_image_2k: Option, + #[serde( + default, + rename = "output_cost_per_image_4K", + skip_serializing_if = "Option::is_none" + )] + pub output_cost_per_image_4k: Option, #[serde(default, skip_serializing_if = "Option::is_none")] pub output_cost_per_image_1024: Option, #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/litellm/experimental_mcp_client/client.py b/litellm/experimental_mcp_client/client.py index 1206f9abcbd..668bf104c84 100644 --- a/litellm/experimental_mcp_client/client.py +++ b/litellm/experimental_mcp_client/client.py @@ -869,6 +869,7 @@ class MCPClient: name=call_tool_request_params.name, arguments=call_tool_request_params.arguments, progress_callback=on_progress, + allow_input_required=False, ) try: diff --git a/litellm/llms/chatgpt/realtime.py b/litellm/llms/chatgpt/realtime.py index 9fbf5d8ca57..f6aa04fc29d 100644 --- a/litellm/llms/chatgpt/realtime.py +++ b/litellm/llms/chatgpt/realtime.py @@ -244,16 +244,14 @@ class ChatGPTRealtimeHTTPConfig(OpenAIRealtimeHTTPConfig): def transform_realtime_calls_response( self, response: Response, model: str, model_id: str | None, headers: Mapping[str, object] | None ) -> Response: - response.extensions["chatgpt_realtime"] = ( - MappingProxyType( - { - "model": model, - "model_id": model_id, - "api_base": ChatGPTRealtime.get_api_base(self._params.api_base), - "extra_headers": configured_realtime_headers(headers), - "extra_query": configured_realtime_query(self._params), - } - ) + response.extensions["chatgpt_realtime"] = MappingProxyType( + { + "model": model, + "model_id": model_id, + "api_base": ChatGPTRealtime.get_api_base(self._params.api_base), + "extra_headers": configured_realtime_headers(headers), + "extra_query": configured_realtime_query(self._params), + } ) return response diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 4b340963acf..10933090885 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -32254,7 +32254,6 @@ "gpt-image-2.5-flare": { "cache_read_input_image_token_cost": 2e-06, "cache_read_input_token_cost": 1.25e-06, - "cache_read_input_image_token_cost": 2e-06, "input_cost_per_token": 5e-06, "litellm_provider": "openai", "mode": "image_generation", @@ -32270,7 +32269,6 @@ "gpt-image-2.5-flare-2026-09-08": { "cache_read_input_image_token_cost": 2e-06, "cache_read_input_token_cost": 1.25e-06, - "cache_read_input_image_token_cost": 2e-06, "input_cost_per_token": 5e-06, "litellm_provider": "openai", "mode": "image_generation", @@ -32286,7 +32284,6 @@ "gpt-image-2.5-sunburst": { "cache_read_input_image_token_cost": 2e-06, "cache_read_input_token_cost": 1.25e-06, - "cache_read_input_image_token_cost": 2e-06, "input_cost_per_token": 5e-06, "litellm_provider": "openai", "mode": "image_generation", @@ -32302,7 +32299,6 @@ "gpt-image-2.5-sunburst-2026-09-08": { "cache_read_input_image_token_cost": 2e-06, "cache_read_input_token_cost": 1.25e-06, - "cache_read_input_image_token_cost": 2e-06, "input_cost_per_token": 5e-06, "litellm_provider": "openai", "mode": "image_generation", diff --git a/litellm/proxy/hooks/parallel_request_limiter_v3.py b/litellm/proxy/hooks/parallel_request_limiter_v3.py index 65610e46e81..ce6720291d0 100644 --- a/litellm/proxy/hooks/parallel_request_limiter_v3.py +++ b/litellm/proxy/hooks/parallel_request_limiter_v3.py @@ -1736,9 +1736,7 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger): acquire_args: list[object] = [] # mutable-ok: Redis EVAL args are flattened per slot below for key in keys: acquire_args.extend((by_key[key]["limit"], PARALLEL_REQUEST_SLOT_TTL_SECONDS, slot_id)) - (raw,) = ( - await self.parallel_acquire_script(keys=keys, args=tuple(acquire_args)), - ) + (raw,) = (await self.parallel_acquire_script(keys=keys, args=tuple(acquire_args)),) if int(raw[0]) == 1: await self._rollback_cluster_parallel_slots(tuple(attempted), slot_id, parent_otel_span) return RateLimitResponse( diff --git a/litellm/proxy/realtime_endpoints/live.py b/litellm/proxy/realtime_endpoints/live.py index 7ce17601ba7..39787c0a64f 100644 --- a/litellm/proxy/realtime_endpoints/live.py +++ b/litellm/proxy/realtime_endpoints/live.py @@ -87,15 +87,11 @@ def _json_value(value: object) -> JsonValue: raise ValueError("Live JSON nesting exceeds the supported depth") converted: JsonValue if isinstance(source, Mapping): - entries: Mapping[str, object] = _MAPPING.validate_python( - source - ) + entries: Mapping[str, object] = _MAPPING.validate_python(source) converted = {name: None for name in entries} # mutable-ok: JSON wire objects require dicts pending.extend((item, converted, name, depth + 1) for name, item in entries.items()) elif isinstance(source, (tuple, list)): - items: tuple[object, ...] = TypeAdapter(tuple[object, ...]).validate_python( - source - ) + items: tuple[object, ...] = TypeAdapter(tuple[object, ...]).validate_python(source) array: list[JsonValue] = [None] * len(items) pending.extend((item, array, index, depth + 1) for index, item in enumerate(items)) converted = array @@ -592,9 +588,7 @@ def _managed_constraints(auth: UserAPIKeyAuth) -> bool: if len(visited) > 4096: return True if isinstance(current, Mapping): - entries: Mapping[str, object] = _MAPPING.validate_python( - current - ) + entries: Mapping[str, object] = _MAPPING.validate_python(current) for key, item in entries.items(): if key in ( "rpm_limit", @@ -1409,9 +1403,7 @@ async def _wait_started( ) -> Mapping[str, JsonValue]: async def receive_started() -> Mapping[str, JsonValue]: while True: - event: Mapping[str, JsonValue] = _OBJECT.validate_json( - await connection.recv() - ) + event: Mapping[str, JsonValue] = _OBJECT.validate_json(await connection.recv()) if event.get("type") == "session.started": return event if startup is not None: diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 4b340963acf..10933090885 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -32254,7 +32254,6 @@ "gpt-image-2.5-flare": { "cache_read_input_image_token_cost": 2e-06, "cache_read_input_token_cost": 1.25e-06, - "cache_read_input_image_token_cost": 2e-06, "input_cost_per_token": 5e-06, "litellm_provider": "openai", "mode": "image_generation", @@ -32270,7 +32269,6 @@ "gpt-image-2.5-flare-2026-09-08": { "cache_read_input_image_token_cost": 2e-06, "cache_read_input_token_cost": 1.25e-06, - "cache_read_input_image_token_cost": 2e-06, "input_cost_per_token": 5e-06, "litellm_provider": "openai", "mode": "image_generation", @@ -32286,7 +32284,6 @@ "gpt-image-2.5-sunburst": { "cache_read_input_image_token_cost": 2e-06, "cache_read_input_token_cost": 1.25e-06, - "cache_read_input_image_token_cost": 2e-06, "input_cost_per_token": 5e-06, "litellm_provider": "openai", "mode": "image_generation", @@ -32302,7 +32299,6 @@ "gpt-image-2.5-sunburst-2026-09-08": { "cache_read_input_image_token_cost": 2e-06, "cache_read_input_token_cost": 1.25e-06, - "cache_read_input_image_token_cost": 2e-06, "input_cost_per_token": 5e-06, "litellm_provider": "openai", "mode": "image_generation", diff --git a/tests/unit/proxy/_experimental/mcp_server/test_mcp_client_unit.py b/tests/unit/proxy/_experimental/mcp_server/test_mcp_client_unit.py index 6438525706a..02f0c517cd9 100644 --- a/tests/unit/proxy/_experimental/mcp_server/test_mcp_client_unit.py +++ b/tests/unit/proxy/_experimental/mcp_server/test_mcp_client_unit.py @@ -289,7 +289,10 @@ class TestMCPClientUnitTests: assert result == mock_result mock_session_instance.initialize.assert_called_once() mock_session_instance.call_tool.assert_called_once_with( - name="test_tool", arguments={"arg1": "value1"}, progress_callback=ANY + name="test_tool", + arguments={"arg1": "value1"}, + progress_callback=ANY, + allow_input_required=False, )