✓ PASS

tanstack-ai 1.4.0

truncation.text-stream · ollama

Back to results · Scenario

Requirements

IdLevelStatusEvidence
cause-is-truncationMUSTSATISFIEDfinish.value="length" (primary: RUN_FINISHED.metadata.tanstack.finishReason); truth.finish="length"; error.category=null; structured.returned_as_success=false
text-reportedSHOULDSATISFIEDtext.value="Octopuses are master of camouflage, relying on a distinct ability where their color" (primary); truth.text="Octopuses are master of camouflage, relying on a distinct ability where their color"
usage-reportedSHOULDSATISFIEDusage.output=16 (primary); truth.usage.output=16

What the provider sent

Finish
length
Raw finish
length
Text
Octopuses are master of camouflage, relying on a distinct ability where their color
Tool calls
[]
Usage
{
  "alternatives": {},
  "cached_input": 0,
  "input": 32,
  "output": 16,
  "raw": {
    "eval_count": 16,
    "prompt_eval_cached_count": 0,
    "prompt_eval_count": 32
  },
  "reasoning": null,
  "total": 48
}
Stream completed
true
Error
null
Wire excerpt
status: 200
content-type: application/x-ndjson
body (ndjson):
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.421674958Z","message":{"role":"assistant","content":"Oct"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.533325633Z","message":{"role":"assistant","content":"op"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.533383631Z","message":{"role":"assistant","content":"uses"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.533501035Z","message":{"role":"assistant","content":" are"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.65099542Z","message":{"role":"assistant","content":" master"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.759551535Z","message":{"role":"assistant","content":" of"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.872036409Z","message":{"role":"assistant","content":" camouflage"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.982184117Z","message":{"role":"assistant","content":","},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:19.982211749Z","message":{"role":"assistant","content":" relying"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:20.092858018Z","message":{"role":"assistant","content":" on"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:20.092890519Z","message":{"role":"assistant","content":" a"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:20.202009085Z","message":{"role":"assistant","content":" distinct"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:20.315262694Z","message":{"role":"assistant","content":" ability"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:20.4294355Z","message":{"role":"assistant","content":" where"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:20.510076663Z","message":{"role":"assistant","content":" their"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:20.543159517Z","message":{"role":"assistant","content":" color"},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:20.543468977Z","message":{"role":"assistant","content":""},"done":true,"done_reason":"length","total_duration":1478058493,"load_duration":3370746,"prompt_eval_count":32,"prompt_eval_cached_count":0,"prompt_eval_duration":346200000,"eval_count":16,"eval_duration":1121510000}

What the library reported

Outcome
returned
Finish
{
  "raw": null,
  "source": "RUN_FINISHED.metadata.tanstack.finishReason",
  "surface": "primary",
  "value": "length"
}
Text
Value
Octopuses are master of camouflage, relying on a distinct ability where their color
Surface
primary
Tool calls
[]
Usage
{
  "cached_input": null,
  "input": 32,
  "output": 16,
  "reasoning": null,
  "surface": {
    "cached_input": "absent",
    "input": "primary",
    "output": "primary",
    "reasoning": "absent",
    "total": "primary"
  },
  "total": 48
}
Stream
{
  "chunks_seen": 20,
  "completed": true,
  "used": true
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 167.897667,
  "error": null,
  "finish": {
    "raw": null,
    "source": "RUN_FINISHED.metadata.tanstack.finishReason",
    "surface": "primary",
    "value": "length"
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "chat",
    "language": "javascript",
    "name": "tanstack-ai",
    "version": "1.4.0"
  },
  "notes": [],
  "outcome": "returned",
  "stream": {
    "chunks_seen": 20,
    "completed": true,
    "used": true
  },
  "structured": {
    "attempted": false,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "primary",
    "value": "Octopuses are master of camouflage, relying on a distinct ability where their color"
  },
  "tool_calls": [],
  "unsupported_reason": null,
  "usage": {
    "cached_input": null,
    "input": 32,
    "output": 16,
    "reasoning": null,
    "surface": {
      "cached_input": "absent",
      "input": "primary",
      "output": "primary",
      "reasoning": "absent",
      "total": "primary"
    },
    "total": 48
  }
}

Fixture

recorded ollama/truncation.text-stream

ProvenanceValue
Recorded at2026-10-12T19:01:19Z
Requested modelqwen3.5:0.8b
Returned modelqwen3.5:0.8b
CI runhttps://github.com/kartsan03/wiretruth/actions/runs/38294709109

Reproduce

wiretruth serve ollama/truncation.text-stream

Plain-library snippet from the shim manifest.

createOllamaChat(model, { host: WIRETRUTH_BASE_URL_OLLAMA }); POST /api/chat.

Upstream

released Issue · PR

Fixed in: @tanstack/ai-ollama 1.1.1

Before 1.1.1, @tanstack/ai-ollama set the streamed RUN_FINISHED finishReason from whether tool calls were emitted (packages/ai-ollama/src/adapters/text.ts) and never read done_reason, so done_reason "length" finishes as stop. structuredOutput() already checks done_reason (TanStack/ai#1548). Fixed by #2077 (@tanstack/ai-ollama 1.1.1): done_reason "length" now finishes as length; the cell is PASS on the 1.4.0 results.

History

VersionGrade
1.4.0✓ PASS
1.0.0✗ WRONG
0.71.0✗ WRONG