# Crewai chat command not working

**URL:** <https://community.crewai.com/t/crewai-chat-command-not-working/6626>\
**Category:** CrewAI Community Support\
**Tags:** crewai\
**Created:** [July 18, 2025, 4:39pm UTC](https://community.crewai.com/t/crewai-chat-command-not-working/6626 "2025-07-18T16:39:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zamoht](https://avatars.discourse-cdn.com/v4/letter/z/dfb087/32.png) [@zamoht](https://community.crewai.com/u/zamoht)\
**Post date:** [July 18, 2025, 4:39pm UTC](https://community.crewai.com/t/crewai-chat-command-not-working/6626/1 "2025-07-18T16:39:27Z")

</div>

Hey everyone,

i set up crewai with some basic tools and agents with a local llm via the docker model runner and everything like “crewai run” works fine.

But when using crewai chat i get an error:

> PS C:\Users\user\Documents\crewai\latest\_ai\_development\> crewai chat  
> Starting a conversation with the Crew  
> Type ‘exit’ or Ctrl+C to quit.
> 
> Analyzing crew and required inputs - this may take 3 to 30 seconds depending on the complexity of your crew.  
> .
> 
> ┌─────────────────────────────────────────────────────────────────────────────────────────────────────── LLM Error ───────────────────────────────────────────────────────────────────────────────────────────────────────┐  
> │ │  
> │ ❌ LLM Call Failed │  
> │ Error: │  
> │ │  
> └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
> 
> Traceback (most recent call last):  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\openai\_client.py”, line 130, in **init**  
> raise OpenAIError(  
> “The api\_key client option must be set either by passing api\_key to the client or by setting the OPENAI\_API\_KEY environment variable”  
> )  
> openai.OpenAIError: The api\_key client option must be set either by passing api\_key to the client or by setting the OPENAI\_API\_KEY environment variable
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):  
> File “”, line 198, in \_run\_module\_as\_main  
> File “”, line 88, in _run\_code  
> File "C:\Users\user.local\bin\crewai.exe\_main_.py", line 10, in   
> sys.exit(crewai())  
> ~~~~~~ ^^  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\click\core.py”, line 1442, in **call**  
> return self.main(\*args, \*\*kwargs)  
> ~~~~~~~~~ ^^^^^^^^^^^^^^^^^  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\click\core.py”, line 1363, in main  
> rv = self.invoke(ctx)  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\click\core.py”, line 1830, in invoke  
> return \_process\_result(sub\_ctx.command.invoke(sub\_ctx))  
> ~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\click\core.py”, line 1226, in invoke  
> return ctx.invoke(self.callback, \*\*ctx.params)  
> ~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\click\core.py”, line 794, in invoke  
> return callback(\*args, \*\*kwargs)  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\crewai\cli\cli.py”, line 363, in chat  
> run\_chat()  
> ~~~~~~~~ ^^  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\crewai\cli\crew\_chat.py”, line 81, in run\_chat  
> crew\_chat\_inputs = generate\_crew\_chat\_inputs(crew, crew\_name, chat\_llm)  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\crewai\cli\crew\_chat.py”, line 387, in generate\_crew\_chat\_inputs  
> description = generate\_input\_description\_with\_ai(input\_name, crew, chat\_llm)  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\crewai\cli\crew\_chat.py”, line 481, in generate\_input\_description\_with\_ai  
> response = chat\_llm.call(messages=[{“role”: “user”, “content”: prompt}])  
> File “C:\Users\user\AppData\Roaming\uv\tools\crewai\Lib\site-packages\crewai\llm.py”, line 977, in call  
> return self.\_handle\_non\_streaming\_response(  
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  
> params, callbacks, available\_functions, from\_task, from\_agent  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> )  
> ^

i follwed the docs by putting chat\_llm=“openai/ai/gemma3-qat:latest” in my @crew, but it wont work

thanks for the help in advance

---

<div class="post-metadata">

**Author:** ![nh\_kim](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/nh_kim/32/4241_2.png) [@nh\_kim](https://community.crewai.com/u/nh_kim)\
**Post date:** [August 7, 2025, 7:12am UTC](https://community.crewai.com/t/crewai-chat-command-not-working/6626/2 "2025-08-07T07:12:33Z")

</div>

Try with the following code.

Ollama local llm seems to be unable to connect and connect to default llm.

> llm = LLM(  
> model=“ollama/gemma3-qat:latest”, # “ollama/{your\_model\_name}”  
> base\_url=“[http://localhost:11434](http://localhost:11434)” # change  
> )

Reference : [https://docs.crewai.com/en/concepts/llms#provider-configuration-examples](https://docs.crewai.com/en/concepts/llms#provider-configuration-examples)
