-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fix issue #2517: Use agent's LLM for function calling when no function_calling_llm is specified #2518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #2517: Use agent's LLM for function calling when no function_calling_llm is specified #2518
Conversation
…n_calling_llm is specified Co-Authored-By: Joe Moura <joao@crewai.com>
Co-Authored-By: Joe Moura <joao@crewai.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Joe Moura <joao@crewai.com>
Disclaimer: This review was made by a crew of AI Agents. Code Review Comment for PR #2518SummaryThis PR enhances the crewAI framework by implementing a method for LLM assignment to agents, allowing them to utilize their own LLMs when a specific Detailed FindingsCode Improvements
Historical ContextReviewing related PRs can provide insights into previous discussions around LLM assignment and agent behavior. Past changes have focused on compliance with various LLM models, such as non-OpenAI integrations, which are crucial for expanding use cases. Refer to previous PRs here. Implications for Related Files
Suggestions for Improvement
General CommentsThe proposed changes represent a forward-thinking approach that enhances the flexibility of the crewAI framework while maintaining a high level of testing and documentation standards. With the implementation of the suggested improvements, this PR should deliver solid, maintainable code ready for production deployment. Thank you for your contributions! |
Co-Authored-By: Joe Moura <joao@crewai.com>
Co-Authored-By: Joe Moura <joao@crewai.com>
Closing due to inactivity for more than 7 days. |
Description
This PR fixes issue #2517 where users would get OpenAI authentication errors even when using non-OpenAI models like Gemini.
The root cause was that when a user didn't explicitly specify a function_calling_llm for their agent or crew, the system would default to using the crew's function_calling_llm, which could be None, leading to OpenAI API key errors even when the agent was configured to use a different model like Gemini.
The fix ensures that when no function_calling_llm is specified, the agent uses its own LLM for function calling rather than defaulting to the crew's function_calling_llm.
Testing
Added tests to verify that agents with non-OpenAI models can use tools without needing OpenAI credentials.
Link to Devin run: https://app.devin.ai/sessions/d6e3c2922797403d8eb47ff23f2f8477
Requested by: Joe Moura (joao@crewai.com)