✓ PASS
vercel-ai 7.0.153
stream.error-midstream · openai-chat
Requirements
| Id | Level | Status | Evidence |
|---|---|---|---|
| error-reported | MUST | SATISFIED | outcome=returned; error.category="api"; finish.value="error" (primary: fullStream.finish.finishReason); truth.finish="error" |
What the provider sent
- Finish
- error
- 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
- Message
- The server had an error while processing your request. Sorry about that!
- Status
null
- Type
- server_error
- Code
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"}
data: {"error":{"message":"The server had an error while processing your request. Sorry about that!","type":"server_error","param":null,"code":null}}
What the library reported
- Outcome
- returned
- Finish
{ "raw": null, "source": "fullStream.finish.finishReason", "surface": "primary", "value": "error" }- Text
- Value
- A traditional Japanese breakfast is built around
- Surface
- primary
- Tool calls
[]
- Usage
{ "cached_input": null, "input": null, "output": null, "reasoning": null, "surface": { "cached_input": "absent", "input": "absent", "output": "absent", "reasoning": "absent", "total": "absent" }, "total": null }- Stream
{ "chunks_seen": 14, "completed": false, "used": true }- Error
- Type
- AI_StreamProviderError
- Message
- The server had an error while processing your request. Sorry about that!
- Category
- api
- Retry after
null
- Stack top
- ai/dist/index.js:8204
- Unsupported reason
null
Full observation JSON
{
"elapsed_ms": 184.82053499999998,
"error": {
"category": "api",
"message": "The server had an error while processing your request. Sorry about that!",
"retry_after": null,
"stack_top": "ai/dist/index.js:8204",
"type": "AI_StreamProviderError"
},
"finish": {
"raw": null,
"source": "fullStream.finish.finishReason",
"surface": "primary",
"value": "error"
},
"format": "wiretruth.observation/v1",
"library": {
"api": "streamText",
"language": "javascript",
"name": "vercel-ai",
"version": "7.0.153"
},
"notes": [],
"outcome": "returned",
"stream": {
"chunks_seen": 14,
"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": null,
"input": null,
"output": null,
"reasoning": null,
"surface": {
"cached_input": "absent",
"input": "absent",
"output": "absent",
"reasoning": "absent",
"total": "absent"
},
"total": null
}
}Fixture
derived openai-chat/stream.error-midstream
| Provenance | Value |
|---|---|
| Transform | inject_error_event |
| Source fixture | openai-chat/truncation.text-stream-usage |
| Rationale | The provider reports an error after starting a successful HTTP stream. |
| Evidence | https://github.com/openai/openai-python/blob/v3.29.0/src/openai/_streaming.py#L94-L106 |
Reproduce
wiretruth serve openai-chat/stream.error-midstreamPlain-library snippet from the shim manifest.
createOpenAI({ baseURL: WIRETRUTH_BASE_URL_OPENAI_CHAT, apiKey }).chat(model)Upstream
No matching upstream report.
History
| Version | Grade |
|---|---|
| 7.0.153 | ✓ PASS |
| 7.0.146 | ✓ PASS |
| 7.0.142 | ✓ PASS |