Skip to content

Agent as tool does not keep the run config #476

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

Closed
jack-lac opened this issue Apr 10, 2025 · 2 comments
Closed

Agent as tool does not keep the run config #476

jack-lac opened this issue Apr 10, 2025 · 2 comments
Labels
bug Something isn't working needs-more-info Waiting for a reply/more info from the author

Comments

@jack-lac
Copy link

run_config is not passed to the new run when we use agent.as_tool(). Therefore, if a custom provider is set, it cannot run the tool agent.

Debug information

  • Agents SDK version: 0.0.9
  • Python version: 3.11.11

Expected behavior

run_config must be passed in a way to the runner of "as_tool agent" so the "tool-run" is done with the same configuration than the main run.

output = await Runner.run(

@jack-lac jack-lac added the bug Something isn't working label Apr 10, 2025
@rm-openai
Copy link
Collaborator

Hmm good point. I'm not sure if we should pass through the entire config, since it may have settings we don't want to apply to the sub-agent. There's also a workaround - you can just have your own @function_tool that passes the context along.

Perhaps we could just document it - or maybe we ask for an optional config to be passed in. Thoughts?

@rm-openai rm-openai added the needs-more-info Waiting for a reply/more info from the author label Apr 11, 2025
@rm-openai
Copy link
Collaborator

#504 has docs, which I think is better than trying to make as_tool comprehensive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-more-info Waiting for a reply/more info from the author
Projects
None yet
Development

No branches or pull requests

2 participants