✓ PASS

pydantic-ai 2.61.0

usage.stream-final-chunk · ollama-openai

Back to results · Scenario

Requirements

IdLevelStatusEvidence
usage-reportedMUSTSATISFIEDusage.input=24 (primary); truth.usage.input=24; usage.output=23 (primary); truth.usage.output=23

What the provider sent

Finish
stop
Raw finish
stop
Text
Rayleigh scattering causes shorter wavelengths of blue light to scatter more effectively by sunlight, making the sky appear blue.
Tool calls
[]
Usage
{
  "alternatives": {},
  "cached_input": 0,
  "input": 24,
  "output": 23,
  "raw": {
    "completion_tokens": 23,
    "prompt_tokens": 24,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "total_tokens": 47
  },
  "reasoning": null,
  "total": 47
}
Stream completed
true
Error
null
Wire excerpt
status: 200
content-type: text/event-stream
body (sse):
data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":"Ray"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":"leigh"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" scattering"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" causes"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" shorter"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" wavelengths"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" of"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" blue"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" light"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" to"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" scatter"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" more"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" effectively"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" by"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" sunlight"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":","},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" making"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" the"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" sky"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" appear"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":" blue"},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"content":"."},"finish_reason":null}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}


data: {"id":"chatcmpl-107","object":"chat.completion.chunk","created":1791831683,"model":"qwen3.5:0.8b","system_fingerprint":"fp_ollama","choices":[],"usage":{"prompt_tokens":24,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens":23,"total_tokens":47},"timings":{"prompt_n":24,"prompt_ms":217,"prompt_per_token_ms":9.041666666666666,"prompt_per_second":110.59907834101382,"predicted_n":23,"predicted_ms":974,"predicted_per_token_ms":42.34782608695652,"predicted_per_second":23.613963039014372}}


data: [DONE]

What the library reported

Outcome
returned
Finish
{
  "raw": "stop",
  "source": "ModelResponse.finish_reason",
  "surface": "primary",
  "value": "stop"
}
Text
Value
Rayleigh scattering causes shorter wavelengths of blue light to scatter more effectively by sunlight, making the sky appear blue.
Surface
primary
Tool calls
[]
Usage
{
  "cached_input": 0,
  "input": 24,
  "output": 23,
  "reasoning": 0,
  "surface": {
    "cached_input": "primary",
    "input": "primary",
    "output": "primary",
    "reasoning": "primary",
    "total": "primary"
  },
  "total": 47
}
Stream
{
  "chunks_seen": 25,
  "completed": true,
  "used": true
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 321.8230465427041,
  "error": null,
  "finish": {
    "raw": "stop",
    "source": "ModelResponse.finish_reason",
    "surface": "primary",
    "value": "stop"
  },
  "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": 25,
    "completed": true,
    "used": true
  },
  "structured": {
    "attempted": false,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "primary",
    "value": "Rayleigh scattering causes shorter wavelengths of blue light to scatter more effectively by sunlight, making the sky appear blue."
  },
  "tool_calls": [],
  "unsupported_reason": null,
  "usage": {
    "cached_input": 0,
    "input": 24,
    "output": 23,
    "reasoning": 0,
    "surface": {
      "cached_input": "primary",
      "input": "primary",
      "output": "primary",
      "reasoning": "primary",
      "total": "primary"
    },
    "total": 47
  }
}

Fixture

recorded ollama-openai/usage.stream-final-chunk

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

Reproduce

wiretruth serve ollama-openai/usage.stream-final-chunk

Plain-library snippet from the shim manifest.

OllamaModel(model, provider=OllamaProvider(base_url=WIRETRUTH_BASE_URL_OLLAMA_OPENAI, api_key=WIRETRUTH_API_KEY)); /v1 base

Upstream

No matching upstream report.

History

VersionGrade
2.61.0✓ PASS
2.56.0✓ PASS