fix(openai): surface chat-completions refusal text#102342
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 8, 2026, 9:51 PM ET / 01:51 UTC. Summary PR surface: Source +3, Tests +80. Total +83 across 2 files. Reproducibility: yes. Source inspection gives a high-confidence path: feed either OpenAI-completions parser a refusal-only delta or message and current main reads content, reasoning, and tool calls but not refusal. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Use one complete refusal-to-visible-text fix across both OpenAI-completions assemblers, with green type checks, focused regression coverage, and redacted real runtime proof while leaving fallback/error policy to separate work. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence path: feed either OpenAI-completions parser a refusal-only delta or message and current main reads content, reasoning, and tool calls but not refusal. Is this the best way to solve the issue? No. The narrow parser-parity direction is right, but this branch is incomplete until it typechecks and covers both live completions assemblers with proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6630138598b3. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +3, Tests +80. Total +83 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Thanks for the focused refusal handling and regression coverage. This is now superseded by #102344, landed on The landed fix covers the same agent |
Summary
choice.delta.refusalinprocessOpenAICompletionsStreamchoice.message.refusalpayloads from OpenAI-compatible chat-completions APIsTesting
pnpm vitest run src/agents/openai-transport-stream.test.tsFixes #102321