From 0ebc0fe2f3586855cd2b19dd8250ec017e5f1d1d Mon Sep 17 00:00:00 2001 From: Rick Sanchez <101627789+m4tinbeigi-official@users.noreply.github.com> Date: Tue, 13 Oct 2026 10:08:32 +0330 Subject: [PATCH] fix(v1m): match OpenAIGPTConfig signatures for basedpyright compliance --- litellm/llms/v1m.py | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/litellm/llms/v1m.py b/litellm/llms/v1m.py index ed09853f38e..a4518d7c39b 100644 --- a/litellm/llms/v1m.py +++ b/litellm/llms/v1m.py @@ -1,4 +1,3 @@ -from collections.abc import Mapping from typing import Final from litellm.llms.base_llm.chat.transformation import BaseLLMException @@ -10,13 +9,16 @@ class V1MError(BaseLLMException): self, status_code: int, message: str, - headers: Mapping[str, str] | None = None, + headers: object = None, ) -> None: super().__init__(status_code=status_code, message=message, headers=headers) class V1MConfig(OpenAIGPTConfig): - """Configuration for v1m (System One) calibrated decision engine.""" + """Configuration for v1m (System One) calibrated decision engine. + + Website: https://v1m.ir + """ def __init__( self, @@ -29,27 +31,7 @@ class V1MConfig(OpenAIGPTConfig): if key != "self" and value is not None: setattr(self.__class__, key, value) - @classmethod - def get_config(cls) -> OpenAIGPTConfig: - return super().get_config() - def get_supported_openai_params( self, model: str - ) -> list[str]: # mutable-ok: required list signature for OpenAIGPTConfig - return [ - "temperature", - "max_tokens", - "stream", - ] - - def get_error_class( - self, - error_message: str, - status_code: int, - headers: Mapping[str, str] | None, - ) -> BaseLLMException: - return V1MError( - status_code=status_code, - message=error_message, - headers=headers, - ) + ) -> list: # mutable-ok: inherited contract + return super().get_supported_openai_params(model)