Skip to content

Conversation

frodulec
Copy link

  • Allowed passing max_turns through Agent.as_tool(...) to nested agent runs.
  • Updated Runner.run to accept max_turns: int | None; when None, default to DEFAULT_MAX_TURNS.
  • Added targeted tests to cover both behaviors

Run tests, formatting and linting.

@seratch seratch added enhancement New feature or request feature:core labels Sep 12, 2025
@seratch seratch marked this pull request as draft September 12, 2025 01:10
@seratch
Copy link
Member

seratch commented Sep 12, 2025

Thanks for sending this PR. Like I mentioned at openai/openai-agents-js#460, we may want to unlock other options too and we'd like to align with TypeScript SDK for its design. So, perhaps our ideal solution could look a bit different.

@Fatima367
Copy link

If you want to set max_turns or tweak run config, create a function tool whose body calls Runner.run(...) for the sub-agent (that you want to use as tool) and returns a string.

Fatima367

This comment was marked as duplicate.

@frodulec frodulec marked this pull request as ready for review September 12, 2025 06:49
@frodulec
Copy link
Author

Thanks for sending this PR. Like I mentioned at openai/openai-agents-js#460, we may want to unlock other options too and we'd like to align with TypeScript SDK for its design. So, perhaps our ideal solution could look a bit different.

I see, than you for the reply, looking forward for this feature then

@seratch seratch marked this pull request as draft September 12, 2025 09:40
@seratch
Copy link
Member

seratch commented Sep 19, 2025

#1751 resolved this. thanks again for sending this!

@seratch seratch closed this Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature:core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants