diff --git a/litellm/llms/ollama/completion/handler.py b/litellm/llms/ollama/completion/handler.py index 97e4f13b560..869e9c5f64a 100644 --- a/litellm/llms/ollama/completion/handler.py +++ b/litellm/llms/ollama/completion/handler.py @@ -13,6 +13,8 @@ from litellm.types.utils import EmbeddingResponse def _prepare_ollama_embedding_payload( model: str, prompts: List[str], optional_params: Dict[str, Any] ) -> Dict[str, Any]: + if model.startswith("ollama/"): + model = model[len("ollama/"):] data: Dict[str, Any] = {"model": model, "input": prompts} special_optional_params = ["truncate", "options", "keep_alive", "dimensions"]