diff --git a/litellm/router.py b/litellm/router.py index be029dbd089..d0f911bfdc3 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -57,20 +57,20 @@ class Router(_RouterSurface): if not TYPE_CHECKING: - def __init__(self, *args, **kwargs): # kwargs-ok: forwards PythonRouter.__init__'s signature + def __init__(self, *args, **kwargs) -> None: # kwargs-ok: forwards PythonRouter.__init__'s signature object.__setattr__(self, "backend", select_backend(args, kwargs)) __init__.__signature__ = inspect.signature(PythonRouter.__init__) - def __getattr__(self, name): + def __getattr__(self, name: str) -> object: if name == "backend": raise AttributeError(name) return getattr(self.backend, name) - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: object) -> None: setattr(self.backend, name, value) - def __delattr__(self, name): + def __delattr__(self, name: str) -> None: delattr(self.backend, name) diff --git a/litellm/router_backends/python_router.py b/litellm/router_backends/python_router.py index cf66dab37ed..9263414877d 100644 --- a/litellm/router_backends/python_router.py +++ b/litellm/router_backends/python_router.py @@ -3559,8 +3559,8 @@ class PythonRouter: self._ageneric_api_call_with_fallbacks_responses_attempt ) if e.generated_content and not e.is_pre_first_chunk: - initial_kwargs["input"] = ( - PythonRouter._build_responses_continuation_input( # rebind-ok: fallback hop input + initial_kwargs["input"] = ( # rebind-ok: fallback hop input + PythonRouter._build_responses_continuation_input( initial_kwargs.get("input"), e.generated_content, )