[BUG/HELP] ImportError: cannot import name 'LLM' from 'crewai' after Azure Deployment

Hi CrewAI community,

I’m running into an issue with my CrewAI project that I hope someone can help clarify.

Problem Description

My code works perfectly on my local machine (MacBook, Python 3.11, CrewAI 0.130.0). However, when I deploy it to Azure, I get the following error:

ImportError: cannot import name 'LLM' from 'crewai' (/usr/local/lib/python3.11/site-packages/crewai/__init__.py)

File “/app/AZ_CREW/agents.py”, line 1, in
from crewai import Agent, LLM

What I’ve Tried

  • Double-checked that both local and Azure environments are using crewai==0.130.0.
  • Ensured all dependencies are up to date.
  • Restarted the Azure deployment after every change.

Questions

  1. Is the LLM class still supported for import from crewai in version 0.130.0?
  2. If not, what is the recommended way to specify LLMs in the latest CrewAI versions?
  3. Has anyone else faced this issue after upgrading or deploying to cloud environments?

Any help or pointers would be greatly appreciated!

Thanks in advance,
Athul