mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(ci): repair PR 40366 lint and catalog gates
This commit is contained in:
parent
68b573ea8d
commit
8b7fe007e1
8 changed files with 42 additions and 34 deletions
|
|
@ -450,6 +450,30 @@ pub struct ModelInfo {
|
|||
pub output_cost_per_character_above_128k_tokens: Option<f64>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub output_cost_per_image: Option<f64>,
|
||||
#[serde(
|
||||
default,
|
||||
rename = "output_cost_per_image_0.5K",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub output_cost_per_image_0_5k: Option<f64>,
|
||||
#[serde(
|
||||
default,
|
||||
rename = "output_cost_per_image_1K",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub output_cost_per_image_1k: Option<f64>,
|
||||
#[serde(
|
||||
default,
|
||||
rename = "output_cost_per_image_2K",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub output_cost_per_image_2k: Option<f64>,
|
||||
#[serde(
|
||||
default,
|
||||
rename = "output_cost_per_image_4K",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub output_cost_per_image_4k: Option<f64>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub output_cost_per_image_1024: Option<f64>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue