Skip to content

fix(run): allow empty streamed model input - #3995

Merged
seratch merged 1 commit into
openai:mainfrom
hsusul:fix/streamed-empty-list-input
Jul 28, 2026
Merged

fix(run): allow empty streamed model input#3995
seratch merged 1 commit into
openai:mainfrom
hsusul:fix/streamed-empty-list-input

Conversation

@hsusul

@hsusul hsusul commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request fixes a streaming-only input restriction in Runner.run_streamed().

The non-streaming Runner paths pass an empty prepared item list to the configured model, but the streamed path raised RuntimeError("Prepared model input is empty") before model invocation. Removing that path-specific guard restores Runner parity and lets each configured model or provider decide whether it accepts empty input.

Test plan

  • Added a public-interface regression test that streams a run from input=[], verifies the fake model receives the empty list, and verifies the run completes.
  • Confirmed the test fails on pristine upstream/main with the expected RuntimeError.
  • Ran the focused regression twice after the fix.
  • Ran tests/test_agent_runner.py and tests/test_agent_runner_streamed.py: 212 passed.
  • Ran .agents/skills/code-change-verification/scripts/run.sh: format, lint, typecheck, and the full test suite all passed.
  • Ran git diff --check.

Issue number

Closes #3994

Checks

  • I've added new tests, if relevant
  • I've run .agents/skills/code-change-verification/scripts/run.sh
  • I've confirmed all verification steps pass
  • If using Codex, I've run /review before submitting this PR

@seratch seratch added this to the 0.19.x milestone Jul 28, 2026
@seratch
seratch enabled auto-merge (squash) July 28, 2026 06:11
@seratch
seratch merged commit 65db9a7 into openai:main Jul 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runner.run_streamed rejects empty list input unlike other Runner methods

2 participants