I was never able to use utils to get the OPENAI Key to work. Instead I did it this way. If you are having similar issues try this. And make sure you have an API key in Environment System Variables.
using openai and os then just use whatever models you want there. Now to get Anthropic working…
import os
import openai
warnings.filterwarnings(‘ignore’)
from crewai import Agent, Task, Crew
import os
import openai
openai.api_key = os.getenv(“OPENAI_API_KEY”)
#os.environ[“OPENAI_MODEL_NAME”] = ‘gpt-4o’
os.environ[“OPENAI_MODEL_NAME”] = ‘gpt-3.5-turbo-0125’