fix: reject failed responses stream terminals#3107
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09b871030f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
09b8710 to
70ce829
Compare
70ce829 to
38e62e3
Compare
|
I re-audited this against #3106 and the Codex review feedback. The latest update covers a few related points:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Rejects Responses streaming terminal events with
response.failedorresponse.incompleteinstead of converting their payloads into successful final model responses.The streamed runner still exposes the raw terminal event before failing, but it no longer turns failed or incomplete payloads into
ModelResponseorfinal_output. The websocketget_response()path now raises the sameModelBehaviorErrorfor these terminal event types.Test plan
uv run pytest tests/models/test_openai_responses.py tests/test_agent_runner_streamed.py tests/test_responses_tracing.py -k 'rejects_failed_terminal_response_payload_events or failed_or_incomplete_terminal_event_creates_trace'bash .agents/skills/code-change-verification/scripts/run.shIssue number
Closes #3106
Checks
make lintandmake format