✓ PASS
tanstack-ai 1.4.0
usage.stream-final-chunk · openai-chat
Requirements
| Id | Level | Status | Evidence |
|---|---|---|---|
| usage-reported | MUST | SATISFIED | usage.input=18 (primary); truth.usage.input=18; usage.output=18 (primary); truth.usage.output=18 |
What the provider sent
- Finish
- stop
- Raw finish
- stop
- Text
- The sky looks blue because air molecules scatter blue sunlight more than other colors.
- Tool calls
[]
- Usage
{ "alternatives": {}, "cached_input": 0, "input": 18, "output": 18, "raw": { "completion_tokens": 18, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "prompt_tokens": 18, "prompt_tokens_details": { "audio_tokens": 0, "cache_write_tokens": 0, "cached_tokens": 0 }, "total_tokens": 36 }, "reasoning": 0, "total": 36 }- Stream completed
true
- Error
null
Wire excerpt
status: 200
content-type: text/event-stream; charset=utf-8
body (sse):
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"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-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"The"},"finish_reason":null}],"usage":null,"obfuscation":"MqxQzix54zjUt5m"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" sky"},"finish_reason":null}],"usage":null,"obfuscation":"5UNXsxo8TRpOWJ"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" looks"},"finish_reason":null}],"usage":null,"obfuscation":"UVow26sNxakb"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" blue"},"finish_reason":null}],"usage":null,"obfuscation":"0IBjSoODjlpY8"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" because"},"finish_reason":null}],"usage":null,"obfuscation":"e9GoRVLkHj"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" air"},"finish_reason":null}],"usage":null,"obfuscation":"BwRjtQSv22WPRb"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" molecules"},"finish_reason":null}],"usage":null,"obfuscation":"DmdlHx2N"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" scatter"},"finish_reason":null}],"usage":null,"obfuscation":"AKTei2Cro4"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" blue"},"finish_reason":null}],"usage":null,"obfuscation":"hHyv8p1fBAorh"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" sunlight"},"finish_reason":null}],"usage":null,"obfuscation":"gsukIJgjS"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" more"},"finish_reason":null}],"usage":null,"obfuscation":"x2ytye8tIphaq"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" than"},"finish_reason":null}],"usage":null,"obfuscation":"MerePfTrWaegi"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" other"},"finish_reason":null}],"usage":null,"obfuscation":"YPE8YFYgmedS"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" colors"},"finish_reason":null}],"usage":null,"obfuscation":"aQ8EbDIjGmz"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"finish_reason":null}],"usage":null,"obfuscation":"9"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"Ww7ZGNdBh2hO"}
data: {"id":"chatcmpl-EXmWh1DJ4f6S3LZ5ZgcBDE8dHwehg","object":"chat.completion.chunk","created":1791720067,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":18,"completion_tokens":18,"total_tokens":36,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"FZuLTa9ISM"}
data: [DONE]
What the library reported
- Outcome
- returned
- Finish
{ "raw": null, "source": "RUN_FINISHED.metadata.tanstack.finishReason", "surface": "primary", "value": "stop" }- Text
- Value
- The sky looks blue because air molecules scatter blue sunlight more than other colors.
- Surface
- primary
- Tool calls
[]
- Usage
{ "cached_input": null, "input": 18, "output": 18, "reasoning": null, "surface": { "cached_input": "absent", "input": "primary", "output": "primary", "reasoning": "absent", "total": "primary" }, "total": 36 }- Stream
{ "chunks_seen": 19, "completed": true, "used": true }- Error
null
- Unsupported reason
null
Full observation JSON
{
"elapsed_ms": 193.44919099999993,
"error": null,
"finish": {
"raw": null,
"source": "RUN_FINISHED.metadata.tanstack.finishReason",
"surface": "primary",
"value": "stop"
},
"format": "wiretruth.observation/v1",
"library": {
"api": "chat",
"language": "javascript",
"name": "tanstack-ai",
"version": "1.4.0"
},
"notes": [],
"outcome": "returned",
"stream": {
"chunks_seen": 19,
"completed": true,
"used": true
},
"structured": {
"attempted": false,
"returned_as_success": false,
"value": null
},
"text": {
"surface": "primary",
"value": "The sky looks blue because air molecules scatter blue sunlight more than other colors."
},
"tool_calls": [],
"unsupported_reason": null,
"usage": {
"cached_input": null,
"input": 18,
"output": 18,
"reasoning": null,
"surface": {
"cached_input": "absent",
"input": "primary",
"output": "primary",
"reasoning": "absent",
"total": "primary"
},
"total": 36
}
}Fixture
recorded openai-chat/usage.stream-final-chunk
| Provenance | Value |
|---|---|
| Recorded at | 2026-10-11T12:01:06Z |
| Requested model | gpt-6-luna |
| Returned model | gpt-6-luna |
| CI run | https://github.com/kartsan03/wiretruth/actions/runs/38137650119 |
Reproduce
wiretruth serve openai-chat/usage.stream-final-chunkPlain-library snippet from the shim manifest.
createOpenaiChatCompletions(model, apiKey, { baseURL: WIRETRUTH_BASE_URL_OPENAI_CHAT }); POST /v1/chat/completions. https://tanstack.com/ai/latest/docs/adapters/openai#chat-completions-apiUpstream
No matching upstream report.
History
| Version | Grade |
|---|---|
| 1.4.0 | ✓ PASS |
| 1.0.0 | ✓ PASS |
| 0.71.0 | ✓ PASS |