From b7530315f88c1440faa67ebab701afa8c04e62a2 Mon Sep 17 00:00:00 2001 From: yyouretoast Date: Fri, 16 Oct 2026 16:34:12 +0300 Subject: [PATCH] fix(openrouter): add strict typing annotations to config and exception classes --- litellm/exceptions.py | 2 +- litellm/llms/openrouter/chat/transformation.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/exceptions.py b/litellm/exceptions.py index df77c2c8f91..eb5437a9121 100644 --- a/litellm/exceptions.py +++ b/litellm/exceptions.py @@ -238,7 +238,7 @@ class OpenRouterRegionNotSupportedError(NotFoundError): max_retries: int | None = None, num_retries: int | None = None, region: str | None = None, - ): + ) -> None: self.region = region super().__init__( message=message, diff --git a/litellm/llms/openrouter/chat/transformation.py b/litellm/llms/openrouter/chat/transformation.py index 49c429cdfc7..61d527b6e48 100644 --- a/litellm/llms/openrouter/chat/transformation.py +++ b/litellm/llms/openrouter/chat/transformation.py @@ -52,8 +52,8 @@ class OpenrouterConfig(OpenAIGPTConfig): def __init__( self, region: str | None = None, - **kwargs, - ): + **kwargs: object, + ) -> None: self.region = region super().__init__(**kwargs)