Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Fixup ollama model listing (again) (#13008)

Matthias Dittrich9211158e7380
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