BadRequestError( .BadRequestError:

from crewai import Agent, LLM
from Tools import web_scrape_tool, search_tool
from dotenv import load_dotenv
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain_groq import ChatGroq
from langchain_openai import ChatOpenAI
load_dotenv()
import os

open_api_key = os.getenv(“OPEN_AI_KEY”)
google_api_key = os.getenv(“GOOGLE_API_KEY”)
groq_api_key = os.getenv(“GROQ_API_KEY”)

gpt_model = ChatOpenAI(
openai_api_key = open_api_key,
model = “gpt-3.5-turbo”,
temperature = 0
)

gemini_model = ChatGoogleGenerativeAI(
google_api_key = google_api_key,
model = “gemini-2.0-flash”
)

deepseek = ChatGroq(
model=“groq/deepseek-r1-distill-llama-70b”,
groq_api_key = groq_api_key
)

llama = ChatGroq(
model = “llama3-70b-8192”,
groq_api_key = groq_api_key

)

Researcher = Agent(
role = “Market Data Researcher”,
goal = “Retrieve the most relevant and up-to-date information about the specified {stock} from trusted online sources.”,
backstory = "You are an expert in financial research, tasked with investigating the company: {stock}. "
"Your mission is to conduct thorough research by sourcing accurate and current data from reputable financial news sites, stock exchanges, and official company reports. "
“Your meticulous research ensures that all subsequent analysis is based on reliable, comprehensive information, forming the essential foundation for the rest of the stock analysis process.”
“MAKE NO ASSUMPTIONS, Always search web and get recent data”,
allow_delegation = False,
verbose = True,
# tools = [web_scrape_tool],
llm = LLM(
api_key = google_api_key,
model = “gemini/gemini-2.0-flash”,
)
)

Analyst = Agent(
role = “FINRA approved Financial Analyst”,
goal = “Analyze the gathered data to assess the stock’s current performance, trends, and potential opportunities or risks.”,
backstory = "You’re collaborating on a stock analysis project focused on the company: {stock}. "
"Your task is to interpret and evaluate the raw information collected by the Market Data Researcher, "
"using financial analysis techniques to provide meaningful insights. "
“Your analysis is crucial for the Decision Advisor to craft a clear and actionable investment report on this stock.”,
allow_delegation = False,
verbose = True,
# tools = [docs_scrape_tool],

 llm = LLM(
    api_key = google_api_key,
    model = "gemini/gemini-2.0-flash",
)

)

DecisionAdvisor = Agent(
role = “Report Generator & Decision Advisor”,
goal = “Summarize the analysis into a concise report with actionable insights and recommendations for the given {stock}.”,
backstory = "You’re collaborating on a stock analysis project focused on the company: {stock} "
"Your task is to synthesize the findings from the Financial Analyst into a clear, well-structured report. "
“Your report empowers investors to quickly understand the stock’s outlook and make informed decisions.”,
allow_delegation = False,
verbose = True,
llm = LLM(
api_key = google_api_key,
model = “gemini/gemini-2.0-flash”,
)

)

no methods worked
I tried langchain models and also the LLM method
no models are working, I tried gpt, llama, deepseek, gemini

Hi and Welcome to the community

Can you let us know if you have had a base working before?
If you have a base working it make debugging the issue a lot easier.

This is a good place to get a crewai create crew mycrew running. Installation - CrewAI

Thenk you can modify to use different LLMs

Ohh thanks a lot for replying
Turns out that LLM method of crewai wants the model name to be in a specific format and about the langchain thing idk it’s still not working, but LLM method works