diff --git a/litellm/llms/ollama/completion/transformation.py b/litellm/llms/ollama/completion/transformation.py index c619fd8cfb7..b2557a53e95 100644 --- a/litellm/llms/ollama/completion/transformation.py +++ b/litellm/llms/ollama/completion/transformation.py @@ -150,6 +150,7 @@ class OllamaConfig(BaseConfig): "frequency_penalty", "stop", "response_format", + "max_completion_tokens", ] def map_openai_params( @@ -160,7 +161,7 @@ class OllamaConfig(BaseConfig): drop_params: bool, ) -> dict: for param, value in non_default_params.items(): - if param == "max_tokens": + if param == "max_tokens" or param == "max_completion_tokens": optional_params["num_predict"] = value if param == "stream": optional_params["stream"] = value @@ -257,9 +258,13 @@ class OllamaConfig(BaseConfig): model_response.choices[0].finish_reason = "stop" if request_data.get("format", "") == "json": response_content = json.loads(response_json["response"]) - + # Check if this is a function call format with name/arguments structure - if isinstance(response_content, dict) and "name" in response_content and "arguments" in response_content: + if ( + isinstance(response_content, dict) + and "name" in response_content + and "arguments" in response_content + ): # Handle as function call (original behavior) function_call = response_content message = litellm.Message( diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding.html deleted file mode 100644 index 755880844d4..00000000000 --- a/litellm/proxy/_experimental/out/onboarding.html +++ /dev/null @@ -1 +0,0 @@ -