Skip to content

Fix(multi-agent #20): inherit model from parent/caller in swarm, agent graph, workflow, use_llm and think tools #71

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ponprabhakar-pg
Copy link

@Ponprabhakar-pg Ponprabhakar-pg commented Jun 5, 2025

Description

Summary

  • In the multi-agent systems (Swarm, Agent Graph, Workflow) + (use llm, think tools), when new dynamic agents (nodes) are created, they were incorrectly defaulting to the global model. This caused mismatches and unintended behaviours, especially when different agents were intended to use different models.

  • This PR resolves that by ensuring all dynamically created agents consistently inherit the model from the parent (caller) agent across the Swarm, Agent Graph, Workflow systems and use llm , think tools.
    [Provide a detailed description of the changes in this PR]

Related Issues

Fix #20
[Link to related issues using #issue-number format]

Documentation PR

[Link to related associated PR in the agent-docs repo]

Type of Change

  • Bug fix
  • New Tool
  • Breaking change
  • Other (please describe):

Testing

[How have you tested the change?]

  • hatch fmt --linter
  • hatch fmt --formatter
  • hatch test --all

Checklist

  • I have read the CONTRIBUTING document

  • I have added tests that prove my fix is effective or my feature works

  • I have updated the documentation accordingly

  • I have added an appropriate example to the documentation to outline the feature

  • My changes generate no new warnings

  • Any dependent changes have been merged and published

  • By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Ponprabhakar-pg Ponprabhakar-pg requested a review from a team as a code owner June 5, 2025 17:30
@Ponprabhakar-pg Ponprabhakar-pg changed the title Fix(multi-agent #20): inherit model from parent/caller in swarm, agent graph, and workflow Fix(multi-agent #20): inherit model from parent/caller in swarm, agent graph, workflow, use_llm and think tools Jun 6, 2025
@awsarron awsarron self-assigned this Jun 10, 2025
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.

[BUG] Unable to use custom LLM providers with tools like swarm, agent_graph, workflow
2 participants