From 651bd044e3ef828f19abc202639f78a0fcadadba Mon Sep 17 00:00:00 2001 From: dor Date: Tue, 6 Oct 2026 17:09:24 -0400 Subject: [PATCH] chore(complexity-router): drop two suppressions LIT002's removal orphaned #43971 removed the LIT002 mutable-construction rule, so the `# mutable-ok` comments on the request headers and the request body no longer suppress anything, and type_discipline_gate reports each as an unused suppression (LIT013). The one on the tier_map dict still applies and stays. Co-Authored-By: Claude Opus 5.5 --- litellm/router_strategy/complexity_router/nadir_classifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/router_strategy/complexity_router/nadir_classifier.py b/litellm/router_strategy/complexity_router/nadir_classifier.py index 738053244c0..67a4bfe8c75 100644 --- a/litellm/router_strategy/complexity_router/nadir_classifier.py +++ b/litellm/router_strategy/complexity_router/nadir_classifier.py @@ -120,7 +120,7 @@ class NadirComplexityClassifier: def _headers(self, url: str) -> dict[str, str]: env_key: Final = get_secret_str("NADIR_API_KEY") if url == _configured_bucket_url() else None api_key: Final = self._api_key or env_key - return {"X-API-Key": api_key} if api_key else {} # mutable-ok: request headers, handed straight to httpx + return {"X-API-Key": api_key} if api_key else {} async def classify(self, context: RoutingContext) -> str | None: """Return the tier Nadir places this request in, or None to decline. @@ -135,7 +135,7 @@ class NadirComplexityClassifier: return None url: Final = _bucket_url(self._api_base) if self._api_base else _configured_bucket_url() client: Final = self._client or get_async_httpx_client(llm_provider=httpxSpecialProvider.ComplexityClassifier) - body: Final = {"messages": list(messages), "source": "litellm"} # mutable-ok: one request body + body: Final = {"messages": list(messages), "source": "litellm"} response: Final = await client.post(url=url, json=body, headers=self._headers(url)) try: bucket: Final = _VERDICT.validate_python(response.json()).get("bucket")