From 46ac0bb172d8e59f5347bf1e628d8035b18e042e Mon Sep 17 00:00:00 2001 From: linhongyu510 Date: Mon, 5 Oct 2026 14:57:09 +0800 Subject: [PATCH] fix(proxy): silence reportUnknownArgumentType on general_settings error path The `elif not isinstance(general_settings, dict)` branch sees `general_settings` as `Unknown` (the YAML config dict is untyped), so calling `_value_type_name(general_settings)` trips basedpyright's reportUnknownArgumentType budget by 1. Cast to `object` at the call site so the argument has a known type without changing runtime behavior (cast is a no-op). --- litellm/proxy/proxy_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 9652ff0f925..faa26893dd8 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -9,7 +9,7 @@ import sys import urllib.parse as urlparse from collections.abc import Iterable, Mapping, Sequence from pathlib import Path -from typing import TYPE_CHECKING, Any, Final +from typing import TYPE_CHECKING, Any, Final, cast import click import httpx @@ -1240,7 +1240,7 @@ def run_server( elif not isinstance(general_settings, dict): raise ValueError( "`general_settings` in the proxy config must be a mapping " - f"(got {_value_type_name(general_settings)}). Check the " + f"(got {_value_type_name(cast(object, general_settings))}). Check the " "`general_settings:` block in your config file." ) ### LOAD KEY MANAGEMENT SETTINGS FIRST (needed for custom secret manager) ###