# Ollama stopped working since update to CrewAI 0.60.0

**URL:** <https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433>\
**Category:** General\
**Created:** [September 17, 2024, 9:55am UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433 "2024-09-17T09:55:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [September 17, 2024, 9:55am UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/1 "2024-09-17T09:55:33Z")

</div>

I updated to CrewAI 0.60.0 after watching the live stream last night. I now find that my local Ollma has stopped working with CrewAI.

```auto
  File "/home/jonathan/PycharmProjects/Development/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/get_llm_provider_logic.py", line 507, in get_llm_provider
    raise litellm.exceptions.BadRequestError( # type: ignore
litellm.exceptions.BadRequestError: litellm.BadRequestError: GetLLMProvider Exception - 'Ollama' object has no attribute 'split'

original model: Ollama
Params: {'model': 'llama3.1', 'format': None, 'options': {'mirostat': None, 'mirostat_eta': None, 'mirostat_tau': None, 'num_ctx': None, 'num_gpu': None, 'num_thread': None, 'num_predict': None, 'repeat_last_n': None, 'repeat_penalty': None, 'temperature': None, 'stop': None, 'tfs_z': None, 'top_k': None, 'top_p': None}, 'system': None, 'template': None, 'keep_alive': None, 'raw': None}

```

Any suggestions/help appreciated.

---

<div class="post-metadata">

**Author:** ![matt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/matt/32/3_2.png) [@matt](https://community.crewai.com/u/matt)\
**Post date:** [September 17, 2024, 10:20am UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/2 "2024-09-17T10:20:24Z")

</div>

How is the LLM configured?

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [September 17, 2024, 10:27am UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/3 "2024-09-17T10:27:14Z")

</div>

```auto
import os
from langchain_community.llms import OpenAI, Ollama
from langchain_openai import ChatOpenAI
from langchain_groq import ChatGroq

@staticmethod
class LLMS:
    def __init__ (self):
        self.OpenAIGPT35 = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0.7)
        self.OpenAIGPT4oMini = ChatOpenAI(model_name="gpt-4o-mini", temperature=0.8)
        self.OpenAIGPT4o = ChatOpenAI(model_name="gpt-4o", temperature=0.8)
        self.OpenAIGPT4 = ChatOpenAI(model_name="gpt-4", temperature=0.8)
        # self.Phi3 = Ollama(model="phi3:mini")
        self.Llama3_1 = Ollama(model="llama3.1")
        self.Phi3 = Ollama(model="phi3:medium-128k")
        # self.Phi3 = ChatOpenAI(model_name="phi3:medium-128k", temperature=0, api_key="ollama", base_url="http://localhost:11434")
        self.groqLama3_8B_3192 = ChatGroq(temperature=0.5, groq_api_key=os.environ.get("GROQ_API_KEY"),
                                          model_name="llama3-8b-8192")

```

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [September 17, 2024, 10:52am UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/4 "2024-09-17T10:52:59Z")

</div>

@matt  
FYI: Groq has also stopped working:

```auto
  File "/home/jonathan/PycharmProjects/Development/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/get_llm_provider_logic.py", line 479, in get_llm_provider
    raise litellm.exceptions.BadRequestError( # type: ignore
litellm.exceptions.BadRequestError: litellm.BadRequestError: LLM Provider NOT provided. Pass in the LLM provider you are trying to call. You passed model=llama3-8b-8192
 Pass model as E.g. For 'Huggingface' inference endpoints pass in `completion(model='huggingface/starcoder',..)` Learn more: https://docs.litellm.ai/docs/providers

```

---

<div class="post-metadata">

**Author:** ![Dabnis](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Dabnis](https://community.crewai.com/u/Dabnis)\
**Post date:** [September 17, 2024, 12:03pm UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/5 "2024-09-17T12:03:13Z")

</div>

Hi @matt,  
FYI, llm=‘groq/llama3-8b-8192’ via LiteLLM works OK.

Today I learned about how CrewAI integrates LiteLLM 😁

I still need to be able to run local ollama based models!

---

<div class="post-metadata">

**Author:** ![matt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/matt/32/3_2.png) [@matt](https://community.crewai.com/u/matt)\
**Post date:** [September 17, 2024, 12:53pm UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/6 "2024-09-17T12:53:54Z")

</div>

With ollama you can still use Litellm. You just need to change the base URL via the env variable for example

api\_base=“[http://localhost:11434](http://localhost:11434)”

---

<div class="post-metadata">

**Author:** ![ryanhurling](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/ryanhurling/32/1233_2.png) [@ryanhurling](https://community.crewai.com/u/ryanhurling)\
**Post date:** [November 28, 2024, 3:43pm UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/7 "2024-11-28T15:43:22Z")

</div>

I have a similar issue, we have ollama running in a local docker container and our python container cannot reach it, feom various testing it looks like base\_url is simply ignored. I out random values and it would still try to hit localhost:11434. Is this a known issue? Ive tried specifying the url by overriding the env variable to no avail!

---

<div class="post-metadata">

**Author:** ![Claes\_Nygren](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@Claes\_Nygren](https://community.crewai.com/u/Claes_Nygren)\
**Post date:** [December 5, 2024, 9:57am UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/8 "2024-12-05T09:57:53Z")

</div>

Try using the env variable OLLAMA\_API\_BASE. I’m running litellm==1.53.4 , crewai==0.83.0  
crewai-tools==0.14.0 , and that works for me.

---

<div class="post-metadata">

**Author:** ![stardustlizardleoi](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@stardustlizardleoi](https://community.crewai.com/u/stardustlizardleoi)\
**Post date:** [March 15, 2025, 11:27pm UTC](https://community.crewai.com/t/ollama-stopped-working-since-update-to-crewai-0-60-0/433/9 "2025-03-15T23:27:34Z")

</div>

Four months later, this solution is still relevant. I added OLLAMA\_API\_BASE to my .env file and it resolved my 301 error.
