Skip to content

Commit 00affc0

Browse files
authored
Merge pull request BerriAI#22523 from BerriAI/fix/lint-undefined-kwargs
Fix undefined kwargs in InFlightRequestsMiddleware
2 parents 7f1ca95 + 22140b0 commit 00affc0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

litellm/proxy/middleware/in_flight_requests_middleware.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ def _get_gauge() -> Optional[Any]:
6262
try:
6363
from prometheus_client import Gauge
6464

65+
kwargs: dict[str, Any] = {}
6566
if "PROMETHEUS_MULTIPROC_DIR" in os.environ:
6667
# livesum aggregates across all worker processes in the scrape response
6768
kwargs["multiprocess_mode"] = "livesum"
6869
InFlightRequestsMiddleware._gauge = Gauge(
6970
"litellm_in_flight_requests",
7071
"Number of HTTP requests currently in-flight on this uvicorn worker",
71-
**kwargs, # type: ignore[arg-type]
72+
**kwargs,
7273
)
7374
except Exception:
7475
InFlightRequestsMiddleware._gauge = None

0 commit comments

Comments
 (0)