Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Description

This PR fixes issue #2647 where authentication fails when using OpenAI-compatible LLMs with planning=True but without specifying a planning_llm.

The fix makes the CrewPlanner inherit authentication parameters (base_url, api_key, etc.) from the agent's LLM when planning_llm is not specified. This enables seamless use of planning with custom LLM providers.

Changes

  • Modified CrewPlanner to accept an agent_llm parameter
  • Updated Crew._handle_crew_planning to pass the first agent's LLM to CrewPlanner
  • Made CrewPlanner inherit authentication parameters from agent_llm when planning_llm is not specified
  • Added tests to verify the fix works

Testing

  • Added tests that verify planning LLM inherits authentication parameters
  • Ran existing tests to ensure backward compatibility

Link to Devin run: https://app.devin.ai/sessions/bb14b018f8cb480a95b9f663cca46aff

Requested by: Joe Moura (joao@crewai.com)

devin-ai-integration bot and others added 2 commits April 19, 2025 23:06
…from agent's LLM

Co-Authored-By: Joe Moura <joao@crewai.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 4 commits April 19, 2025 23:10
Co-Authored-By: Joe Moura <joao@crewai.com>
Co-Authored-By: Joe Moura <joao@crewai.com>
Co-Authored-By: Joe Moura <joao@crewai.com>
Co-Authored-By: Joe Moura <joao@crewai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants