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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Fix import error
Sameer Kankutebaf19b4413fd
diff --git a/litellm/llms/ollama/chat/transformation.py b/litellm/llms/ollama/chat/transformation.pyindex 18a8c79ab83..c990cc2e093 100644--- a/litellm/llms/ollama/chat/transformation.py+++ b/litellm/llms/ollama/chat/transformation.py@@ -16,6 +16,7 @@ from httpx._models import Headers, Responsefrom pydantic import BaseModelimport litellm+from litellm.litellm_core_utils.core_helpers import map_finish_reasonfrom litellm.litellm_core_utils.prompt_templates.common_utils import (_extract_reasoning_content,convert_content_list_to_str,@@ -349,7 +350,7 @@ class OllamaChatConfig(BaseConfig):response_json = raw_response.json()## RESPONSE OBJECT- _done_reason = response_json.get("done_reason") or "stop"+ _done_reason = map_finish_reason(response_json.get("done_reason") or "stop")model_response.choices[0].finish_reason = _done_reasonresponse_json_message = response_json.get("message")if response_json_message is not None:diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex 67f8c896dc3..2d789b982da 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -496,7 +496,6 @@ from litellm.proxy.utils import (_get_openapi_url,_get_projected_spend_over_limit,_get_redoc_url,- _get_openapi_url,_is_projected_spend_over_limit,_is_valid_team_configs,get_custom_url,diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.pyindex 8b8b11bf6d5..feb938200aa 100644--- a/litellm/proxy/utils.py+++ b/litellm/proxy/utils.py@@ -5312,19 +5312,6 @@ def get_error_message_str(e: Exception) -> str:return error_message-def _get_openapi_url() -> Optional[str]:- """- Get the OpenAPI schema URL from the environment variables.-- - If NO_OPENAPI is True, return None.- - Otherwise, default to "/openapi.json".- """- if str_to_bool(os.getenv("NO_OPENAPI")) is True:- return None-- return "/openapi.json"--def _get_redoc_url() -> Optional[str]:"""Get the Redoc URL from the environment variables.