fix(openai_agents): Handle starting_agent keyword argument in runner patches by ericapisani · Pull Request #6428 · getsentry/sentry-python
…patches Runner.run() and Runner.run_streamed() accept starting_agent as either a positional or keyword argument. The patches were always reading args[0], which crashes when the caller uses the keyword form (e.g. Runner.run(starting_agent=agent, input=...)). Check for the keyword argument first; fall back to the positional arg. Fixes GH-6418 Fixes PY-2498
marked this pull request as ready for review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters