mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-13 03:59:12 +00:00
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).
This commit is contained in:
parent
e8162412d1
commit
46ac0bb172
1 changed files with 2 additions and 2 deletions
|
|
@ -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) ###
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue