From 9211158e73808475c0dd798e2892dc7f0a99c656 Mon Sep 17 00:00:00 2001 From: Matthias Dittrich Date: Sat, 26 Jul 2025 20:07:49 +0200 Subject: [PATCH] Fixup ollama model listing (again) (#13008) --- litellm/__init__.py | 1 + litellm/types/router.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/__init__.py b/litellm/__init__.py index 48610203c3a..412f552e9c2 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -797,6 +797,7 @@ models_by_provider: dict = { "bedrock": bedrock_models + bedrock_converse_models, "petals": petals_models, "ollama": ollama_models, + "ollama_chat": ollama_models, "deepinfra": deepinfra_models, "perplexity": perplexity_models, "maritalk": maritalk_models, diff --git a/litellm/types/router.py b/litellm/types/router.py index 275b94e89cf..11076205339 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -342,7 +342,8 @@ class LiteLLM_Params(GenericLiteLLMParams): args.pop("__class__", None) if max_retries is not None and isinstance(max_retries, str): max_retries = int(max_retries) # cast to int - super().__init__(max_retries=max_retries, **args, **params) + args["max_retries"] = max_retries + super().__init__(**{ **args, **params }) def __contains__(self, key): # Define custom behavior for the 'in' operator