✓ PASS
pydantic-ai 2.61.0
truncation.text-stream-usage · gemini
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 (*Asagohan*) is a beautifully" (primary); truth.text="A traditional Japanese breakfast (*Asagohan*) is a beautifully" |
| usage-reported | SHOULD | SATISFIED | usage.input=36 (primary); truth.usage.input=36; usage.output=12 (primary); truth.usage.output=12 |
What the provider sent
- Finish
- length
- Raw finish
- MAX_TOKENS
- Text
- A traditional Japanese breakfast (*Asagohan*) is a beautifully
- Tool calls
[]
- Usage
{ "alternatives": {}, "cached_input": null, "input": 36, "output": 12, "raw": { "candidatesTokenCount": 12, "promptTokenCount": 36, "promptTokensDetails": [ { "modality": "TEXT", "tokenCount": 36 } ], "serviceTier": "standard", "totalTokenCount": 48 }, "reasoning": null, "total": 48 }- Stream completed
true
- Error
null
Wire excerpt
status: 200
content-type: text/event-stream
body (sse):
data: {"candidates": [{"content": {"parts": [{"text": "A traditional"}],"role": "model"},"index": 0}],"usageMetadata": {"promptTokenCount": 36,"candidatesTokenCount": 2,"totalTokenCount": 38,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 36}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "nwTOas7UFJee1MkPzOjWoQg"}
data: {"candidates": [{"content": {"parts": [{"text": " Japanese breakfast (*Asagohan*) is a beautifully"}],"role": "model"},"index": 0}],"usageMetadata": {"promptTokenCount": 36,"candidatesTokenCount": 12,"totalTokenCount": 48,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 36}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "nwTOas7UFJee1MkPzOjWoQg"}
data: {"candidates": [{"content": {"parts": [{"text": "","thoughtSignature": "EmAKXgFpFH0TCQP7jZV7ol4IlmGfO/MLokQEa/Fvb8AEmEuaDRR/RrCQdmL+BJoMeLm3Qg10DtXxTogo4Vc0rAlnsdWd2/MKjxW2267tztLQgdhMZGvKYygnUUScYoGPAGw="}],"role": "model"},"finishReason": "MAX_TOKENS","index": 0}],"usageMetadata": {"promptTokenCount": 36,"candidatesTokenCount": 12,"totalTokenCount": 48,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 36}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "nwTOas7UFJee1MkPzOjWoQg"}
What the library reported
- Outcome
- returned
- Finish
{ "raw": "MAX_TOKENS", "source": "ModelResponse.finish_reason", "surface": "primary", "value": "length" }- Text
- Value
- A traditional Japanese breakfast (*Asagohan*) is a beautifully
- Surface
- primary
- Tool calls
[]
- Usage
{ "cached_input": 0, "input": 36, "output": 12, "reasoning": 0, "surface": { "cached_input": "primary", "input": "primary", "output": "primary", "reasoning": "primary", "total": "primary" }, "total": 48 }- Stream
{ "chunks_seen": 6, "completed": true, "used": true }- Error
null
- Unsupported reason
null
Full observation JSON
{
"elapsed_ms": 287.2346695512533,
"error": null,
"finish": {
"raw": "MAX_TOKENS",
"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": 6,
"completed": true,
"used": true
},
"structured": {
"attempted": false,
"returned_as_success": false,
"value": null
},
"text": {
"surface": "primary",
"value": "A traditional Japanese breakfast (*Asagohan*) is a beautifully"
},
"tool_calls": [],
"unsupported_reason": null,
"usage": {
"cached_input": 0,
"input": 36,
"output": 12,
"reasoning": 0,
"surface": {
"cached_input": "primary",
"input": "primary",
"output": "primary",
"reasoning": "primary",
"total": "primary"
},
"total": 48
}
}Fixture
recorded gemini/truncation.text-stream-usage
| Provenance | Value |
|---|---|
| Recorded at | 2026-10-13T10:14:55Z |
| Requested model | gemini-3.5-flash-lite |
| Returned model | gemini-3.5-flash-lite |
| CI run | https://github.com/kartsan03/wiretruth/actions/runs/38381941285 |
Reproduce
wiretruth serve gemini/truncation.text-stream-usagePlain-library snippet from the shim manifest.
GoogleModel(model, provider=GoogleProvider(base_url=WIRETRUTH_BASE_URL_GEMINI, api_key=WIRETRUTH_API_KEY)); host rootUpstream
No matching upstream report.
History
| Version | Grade |
|---|---|
| 2.61.0 | ✓ PASS |
| 2.56.0 | ✓ PASS |