✓ PASS
tanstack-ai 1.4.0
truncation.text-stream · gemini
Requirements
| Id | Level | Status | Evidence |
|---|---|---|---|
| cause-is-truncation | MUST | SATISFIED | finish.value=null (absent); truth.finish="length"; error.category="truncation"; structured.returned_as_success=false |
| text-reported | SHOULD | SATISFIED | text.value="Octopuses are the ultimate masters of disguise, utilizing a" (primary); truth.text="Octopuses are the ultimate masters of disguise, utilizing a" |
| usage-reported | SHOULD | SATISFIED | usage.output=12 (primary); truth.usage.output=12 |
What the provider sent
- Finish
- length
- Raw finish
- MAX_TOKENS
- Text
- Octopuses are the ultimate masters of disguise, utilizing a
- Tool calls
[]
- Usage
{ "alternatives": {}, "cached_input": null, "input": 22, "output": 12, "raw": { "candidatesTokenCount": 12, "promptTokenCount": 22, "promptTokensDetails": [ { "modality": "TEXT", "tokenCount": 22 } ], "serviceTier": "standard", "totalTokenCount": 34 }, "reasoning": null, "total": 34 }- Stream completed
true
- Error
null
Wire excerpt
status: 200
content-type: text/event-stream
body (sse):
data: {"candidates": [{"content": {"parts": [{"text": "Octop"}],"role": "model"},"index": 0}],"usageMetadata": {"promptTokenCount": 22,"candidatesTokenCount": 2,"totalTokenCount": 24,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 22}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "pgTOaonbKMuV_uMPvK7d4AE"}
data: {"candidates": [{"content": {"parts": [{"text": "uses are the ultimate masters of disguise, utilizing a"}],"role": "model"},"index": 0}],"usageMetadata": {"promptTokenCount": 22,"candidatesTokenCount": 12,"totalTokenCount": 34,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 22}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "pgTOaonbKMuV_uMPvK7d4AE"}
data: {"candidates": [{"content": {"parts": [{"text": "","thoughtSignature": "EmAKXgFpFH0TZDFrxNfmg9AEtzn2/Lx2X7T4rX3Pufmp9MeuUeV6QQ4IEIffogLQkVUdgUWJ+G4L48EXf5L/wtPCbXTOk+KphherC1msoBUGh/7uYYFRDFon0XDRetF/fVo="}],"role": "model"},"finishReason": "MAX_TOKENS","index": 0}],"usageMetadata": {"promptTokenCount": 22,"candidatesTokenCount": 12,"totalTokenCount": 34,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 22}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "pgTOaonbKMuV_uMPvK7d4AE"}
What the library reported
- Outcome
- returned
- Finish
{ "raw": null, "source": null, "surface": "absent", "value": null }- Text
- Value
- Octopuses are the ultimate masters of disguise, utilizing a
- Surface
- primary
- Tool calls
[]
- Usage
{ "cached_input": null, "input": 22, "output": 12, "reasoning": null, "surface": { "cached_input": "absent", "input": "primary", "output": "primary", "reasoning": "absent", "total": "primary" }, "total": 34 }- Stream
{ "chunks_seen": 6, "completed": false, "used": true }- Error
- Type
- max_tokens
- Message
- The response was cut off because the maximum token limit was reached.
- Category
- truncation
- Retry after
null
- Stack top
null
- Unsupported reason
null
Full observation JSON
{
"elapsed_ms": 132.5453990000001,
"error": {
"category": "truncation",
"message": "The response was cut off because the maximum token limit was reached.",
"retry_after": null,
"stack_top": null,
"type": "max_tokens"
},
"finish": {
"raw": null,
"source": null,
"surface": "absent",
"value": null
},
"format": "wiretruth.observation/v1",
"library": {
"api": "chat",
"language": "javascript",
"name": "tanstack-ai",
"version": "1.4.0"
},
"notes": [],
"outcome": "returned",
"stream": {
"chunks_seen": 6,
"completed": false,
"used": true
},
"structured": {
"attempted": false,
"returned_as_success": false,
"value": null
},
"text": {
"surface": "primary",
"value": "Octopuses are the ultimate masters of disguise, utilizing a"
},
"tool_calls": [],
"unsupported_reason": null,
"usage": {
"cached_input": null,
"input": 22,
"output": 12,
"reasoning": null,
"surface": {
"cached_input": "absent",
"input": "primary",
"output": "primary",
"reasoning": "absent",
"total": "primary"
},
"total": 34
}
}Fixture
recorded gemini/truncation.text-stream
| Provenance | Value |
|---|---|
| Recorded at | 2026-10-13T10:15:02Z |
| 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-streamPlain-library snippet from the shim manifest.
createGeminiChat(model, apiKey, { baseURL: WIRETRUTH_BASE_URL_GEMINI }); SDK appends /v1beta/models/<model>:streamGenerateContent or :generateContent.Upstream
No matching upstream report.
History
| Version | Grade |
|---|---|
| 1.4.0 | ✓ PASS |
| 1.0.0 | ✓ PASS |
| 0.71.0 | ✓ PASS |