✓ PASS
pydantic-ai 2.61.0
stream.missing-finish-abort · openai-chat
Requirements
| Id | Level | Status | Evidence |
|---|---|---|---|
| no-normal-stop | MUST | SATISFIED | outcome=raised; finish.value=null (absent); truth.finish="none"; forbidden finish="stop" |
| stream-incomplete | MUST | SATISFIED | stream.completed=false; outcome=raised; truth.stream_completed=false |
What the provider sent
- Finish
- none
- Raw finish
null
- Text
- A traditional Japanese breakfast is built around
- Tool calls
[]
- Usage
{ "alternatives": {}, "cached_input": null, "input": null, "output": null, "raw": null, "reasoning": null, "total": null }- Stream completed
false
- Error
null
Wire excerpt
status: 200
content-type: text/event-stream; charset=utf-8
body (sse):
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":""}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"A"},"finish_reason":null}],"usage":null,"obfuscation":"b"}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" traditional"},"finish_reason":null}],"usage":null,"obfuscation":"d52OTd"}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" Japanese"},"finish_reason":null}],"usage":null,"obfuscation":"w1dZTLipP"}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" breakfast"},"finish_reason":null}],"usage":null,"obfuscation":"MWjy8UlZ"}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" is"},"finish_reason":null}],"usage":null,"obfuscation":"icVTZPFYRG5lFwL"}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" built"},"finish_reason":null}],"usage":null,"obfuscation":"AYTZtVaq9EDe"}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" around"},"finish_reason":null}],"usage":null,"obfuscation":"kMyBiZ4fH9u"}
end: abortWhat the library reported
- Outcome
- raised
- Finish
{ "raw": null, "source": null, "surface": "absent", "value": null }- Text
- Value
- A traditional Japanese breakfast is built around
- Surface
- primary
- Tool calls
[]
- Usage
{ "cached_input": 0, "input": 0, "output": 0, "reasoning": 0, "surface": { "cached_input": "raw", "input": "raw", "output": "raw", "reasoning": "raw", "total": "raw" }, "total": 0 }- Stream
{ "chunks_seen": 8, "completed": false, "used": true }- Error
- Type
- pydantic_ai.exceptions.ModelConnectionError
- Message
- Connection error.
- Category
- api
- Retry after
null
- Stack top
- pydantic_ai/models/openai.py:262
- Unsupported reason
null
Full observation JSON
{
"elapsed_ms": 206.22134394943714,
"error": {
"category": "api",
"message": "Connection error.",
"retry_after": null,
"stack_top": "pydantic_ai/models/openai.py:262",
"type": "pydantic_ai.exceptions.ModelConnectionError"
},
"finish": {
"raw": null,
"source": null,
"surface": "absent",
"value": null
},
"format": "wiretruth.observation/v1",
"library": {
"api": "Agent.run_stream_events",
"language": "python",
"name": "pydantic-ai",
"version": "2.61.0"
},
"notes": [],
"outcome": "raised",
"stream": {
"chunks_seen": 8,
"completed": false,
"used": true
},
"structured": {
"attempted": false,
"returned_as_success": false,
"value": null
},
"text": {
"surface": "primary",
"value": "A traditional Japanese breakfast is built around"
},
"tool_calls": [],
"unsupported_reason": null,
"usage": {
"cached_input": 0,
"input": 0,
"output": 0,
"reasoning": 0,
"surface": {
"cached_input": "raw",
"input": "raw",
"output": "raw",
"reasoning": "raw",
"total": "raw"
},
"total": 0
}
}Fixture
derived openai-chat/stream.missing-finish-abort
| Provenance | Value |
|---|---|
| Transform | cut_stream_after |
| Source fixture | openai-chat/truncation.text-stream-usage |
| Rationale | The connection closes before the stream has delivered every event. |
| Evidence | https://github.com/openai/openai-python/issues/2065 |
Reproduce
wiretruth serve openai-chat/stream.missing-finish-abortPlain-library snippet from the shim manifest.
OpenAIChatModel(model, provider=OpenAIProvider(base_url=WIRETRUTH_BASE_URL_OPENAI_CHAT, api_key=WIRETRUTH_API_KEY))Upstream
No matching upstream report.
History
| Version | Grade |
|---|---|
| 2.61.0 | ✓ PASS |
| 2.56.0 | ✓ PASS |