✓ PASS
pydantic-ai 2.61.0
truncation.text-stream-usage · openai-chat
Requirements
| Id | Level | Status | Evidence |
|---|---|---|---|
| cause-is-truncation | MUST | SATISFIED | finish.value="length" (primary: ModelResponse.finish_reason); truth.finish="length"; error.category=null; structured.returned_as_success=false |
| text-reported | SHOULD | SATISFIED | text.value="A traditional Japanese breakfast is built around rice, soup, and a" (primary); truth.text="A traditional Japanese breakfast is built around rice, soup, and a" |
| usage-reported | SHOULD | SATISFIED | usage.input=42 (primary); truth.usage.input=42; usage.output=16 (primary); truth.usage.output=16 |
What the provider sent
- Finish
- length
- Raw finish
- length
- Text
- A traditional Japanese breakfast is built around rice, soup, and a
- Tool calls
[]
- Usage
{ "alternatives": {}, "cached_input": 0, "input": 42, "output": 16, "raw": { "completion_tokens": 16, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "prompt_tokens": 42, "prompt_tokens_details": { "audio_tokens": 0, "cache_write_tokens": 0, "cached_tokens": 0 }, "total_tokens": 58 }, "reasoning": 0, "total": 58 }- Stream completed
true
- 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"}
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":" rice"},"finish_reason":null}],"usage":null,"obfuscation":"ipQ7qmg7ME8qn"}
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":","},"finish_reason":null}],"usage":null,"obfuscation":"F"}
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":" soup"},"finish_reason":null}],"usage":null,"obfuscation":"koHOHl6FSzjzv"}
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":","},"finish_reason":null}],"usage":null,"obfuscation":"c"}
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":" and"},"finish_reason":null}],"usage":null,"obfuscation":"zgb5ipuHgdlxrv"}
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":""}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"length"}],"usage":null,"obfuscation":"xJlB3tfZjb"}
data: {"id":"chatcmpl-EXmWZAYmW8gL0ntPfYzZYrbv99Dcb","object":"chat.completion.chunk","created":1791720059,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":42,"completion_tokens":16,"total_tokens":58,"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":"pGcjuQsxqk"}
data: [DONE]
What the library reported
- Outcome
- returned
- Finish
{ "raw": "length", "source": "ModelResponse.finish_reason", "surface": "primary", "value": "length" }- Text
- Value
- A traditional Japanese breakfast is built around rice, soup, and a
- Surface
- primary
- Tool calls
[]
- Usage
{ "cached_input": 0, "input": 42, "output": 16, "reasoning": 0, "surface": { "cached_input": "primary", "input": "primary", "output": "primary", "reasoning": "primary", "total": "primary" }, "total": 58 }- Stream
{ "chunks_seen": 16, "completed": true, "used": true }- Error
null
- Unsupported reason
null
Full observation JSON
{
"elapsed_ms": 317.9275244474411,
"error": null,
"finish": {
"raw": "length",
"source": "ModelResponse.finish_reason",
"surface": "primary",
"value": "length"
},
"format": "wiretruth.observation/v1",
"library": {
"api": "Agent.run_stream_events",
"language": "python",
"name": "pydantic-ai",
"version": "2.61.0"
},
"notes": [],
"outcome": "returned",
"stream": {
"chunks_seen": 16,
"completed": true,
"used": true
},
"structured": {
"attempted": false,
"returned_as_success": false,
"value": null
},
"text": {
"surface": "primary",
"value": "A traditional Japanese breakfast is built around rice, soup, and a"
},
"tool_calls": [],
"unsupported_reason": null,
"usage": {
"cached_input": 0,
"input": 42,
"output": 16,
"reasoning": 0,
"surface": {
"cached_input": "primary",
"input": "primary",
"output": "primary",
"reasoning": "primary",
"total": "primary"
},
"total": 58
}
}Fixture
recorded openai-chat/truncation.text-stream-usage
| Provenance | Value |
|---|---|
| Recorded at | 2026-10-11T12:00:59Z |
| 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/truncation.text-stream-usagePlain-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 |