[Bug] OpenAI Responses final item completes but missing response.completed hangs until idle timeout #6594
Replies: 1 comment
|
Independent reproduction on a different adapter, which may matter for where
One detail your report does not mention, which I think is a separate defect Details and the raw event sequence: #6959 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
A third-party OpenAI Responses-compatible gateway can complete a final answer
item but omit
response.completedand keep the SSE connection open. DSH has thecomplete answer text, yet waits until the 300-second stream idle timeout and
then marks the turn failed.
Environment
@deepseek-ai/dsh@0.1.5-rc.1@deepseek-ai/dsh-llm-pi-ai@0.1.5-rc.1@earendil-works/pi-ai@0.85.1llm-pi-ai/openai-responsesSanitized event sequence
Actual behavior
pi-ai stream idle timeout after 300000ms.Expected behavior
DSH should offer a bounded, explicit compatibility path for providers that
finish a
phase=final_answermessage item but omit the response-level terminalevent. Strict behavior can remain the default if accepting the item-level
terminal signal globally is considered too permissive.
Locally validated compatibility behavior
After
response.output_item.donefor a message whose phase isfinal_answer:item with an explicit compatibility stop reason;
A 2-second local grace period passed both regression paths: normal
response.completedpreserved usage, while a deliberately hanging sourceended locally after the completed final item. I am not proposing that 2 seconds
must be the global default; a provider-level option such as
terminalEventGraceMswould make the trade-off explicit. When fallback is used,response-level usage may be unavailable and should not be fabricated.
All reactions