✓ PASS

any-llm 1.40.2

stream.error-midstream · openai-chat

Back to results · Scenario

Requirements

IdLevelStatusEvidence
error-reportedMUSTSATISFIEDoutcome=raised; error.category="api"; finish.value=null (absent); 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
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": null,
  "input": null,
  "output": null,
  "reasoning": null,
  "surface": {
    "cached_input": "absent",
    "input": "absent",
    "output": "absent",
    "reasoning": "absent",
    "total": "absent"
  },
  "total": null
}
Stream
{
  "chunks_seen": 8,
  "completed": false,
  "used": true
}
Error
Type
openai.APIError
Message
The server had an error while processing your request. Sorry about that!
Category
api
Retry after
null
Stack top
openai/_streaming.py:217
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 130.80602511763573,
  "error": {
    "category": "api",
    "message": "The server had an error while processing your request. Sorry about that!",
    "retry_after": null,
    "stack_top": "openai/_streaming.py:217",
    "type": "openai.APIError"
  },
  "finish": {
    "raw": null,
    "source": null,
    "surface": "absent",
    "value": null
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "any_llm.completion",
    "language": "python",
    "name": "any-llm",
    "version": "1.40.2"
  },
  "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": 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

ProvenanceValue
Transforminject_error_event
Source fixtureopenai-chat/truncation.text-stream-usage
RationaleThe provider reports an error after starting a successful HTTP stream.
Evidencehttps://github.com/openai/openai-python/blob/v3.29.0/src/openai/_streaming.py#L94-L106

Reproduce

wiretruth serve openai-chat/stream.error-midstream

Plain-library snippet from the shim manifest.

any_llm.completion(model=model, provider='openai', api_base=WIRETRUTH_BASE_URL_OPENAI_CHAT, api_key=WIRETRUTH_API_KEY)

Upstream

No matching upstream report.

History

VersionGrade
1.40.2✓ PASS
1.38.0✓ PASS
1.33.0✓ PASS