✓ PASS

vercel-ai 7.0.153

usage.stream-final-chunk · gemini

Back to results · Scenario

Requirements

IdLevelStatusEvidence
usage-reportedMUSTSATISFIEDusage.input=13 (primary); truth.usage.input=13; usage.output=31 (primary); truth.usage.output=31

What the provider sent

Finish
stop
Raw finish
STOP
Text
The sky looks blue because molecules in Earth's atmosphere scatter short-wavelength blue light from the sun in all directions more than they scatter the other colors.
Tool calls
[]
Usage
{
  "alternatives": {},
  "cached_input": null,
  "input": 13,
  "output": 31,
  "raw": {
    "candidatesTokenCount": 31,
    "promptTokenCount": 13,
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 13
      }
    ],
    "serviceTier": "standard",
    "totalTokenCount": 44
  },
  "reasoning": null,
  "total": 44
}
Stream completed
true
Error
null
Wire excerpt
status: 200
content-type: text/event-stream
body (sse):
data: {"candidates": [{"content": {"parts": [{"text": "The sky"}],"role": "model"},"index": 0}],"usageMetadata": {"promptTokenCount": 13,"candidatesTokenCount": 2,"totalTokenCount": 15,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 13}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "ugTOaqmIKYGU_uMPo5fqSQ"}


data: {"candidates": [{"content": {"parts": [{"text": " looks blue because molecules in Earth's atmosphere scatter short-wavelength blue light from"}],"role": "model"},"index": 0}],"usageMetadata": {"promptTokenCount": 13,"candidatesTokenCount": 18,"totalTokenCount": 31,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 13}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "ugTOaqmIKYGU_uMPo5fqSQ"}


data: {"candidates": [{"content": {"parts": [{"text": " the sun in all directions more than they scatter the other colors."}],"role": "model"},"index": 0}],"usageMetadata": {"promptTokenCount": 13,"candidatesTokenCount": 31,"totalTokenCount": 44,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 13}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "ugTOaqmIKYGU_uMPo5fqSQ"}


data: {"candidates": [{"content": {"parts": [{"text": "","thoughtSignature": "EmAKXgFpFH0TU4wpG/EyT9awmbm6yp5Wege7OQgCOOX5XVMcLyZSBXQ3kah+VjX+me4nWUIulgItkc3Z2pQUeOiQ8INcN8Gwp4egQk17BMU7jgg1xO/a5t/3z7gKP6ZLwBY="}],"role": "model"},"finishReason": "STOP","index": 0}],"usageMetadata": {"promptTokenCount": 13,"candidatesTokenCount": 31,"totalTokenCount": 44,"promptTokensDetails": [{"modality": "TEXT","tokenCount": 13}],"serviceTier": "standard"},"modelVersion": "gemini-3.5-flash-lite","responseId": "ugTOaqmIKYGU_uMPo5fqSQ"}

What the library reported

Outcome
returned
Finish
{
  "raw": "STOP",
  "source": "fullStream.finish.finishReason",
  "surface": "primary",
  "value": "stop"
}
Text
Value
The sky looks blue because molecules in Earth's atmosphere scatter short-wavelength blue light from the sun in all directions more than they scatter the other colors.
Surface
primary
Tool calls
[]
Usage
{
  "cached_input": 0,
  "input": 13,
  "output": 31,
  "reasoning": 0,
  "surface": {
    "cached_input": "primary",
    "input": "primary",
    "output": "primary",
    "reasoning": "primary",
    "total": "primary"
  },
  "total": 44
}
Stream
{
  "chunks_seen": 10,
  "completed": true,
  "used": true
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 142.696668,
  "error": null,
  "finish": {
    "raw": "STOP",
    "source": "fullStream.finish.finishReason",
    "surface": "primary",
    "value": "stop"
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "streamText",
    "language": "javascript",
    "name": "vercel-ai",
    "version": "7.0.153"
  },
  "notes": [],
  "outcome": "returned",
  "stream": {
    "chunks_seen": 10,
    "completed": true,
    "used": true
  },
  "structured": {
    "attempted": false,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "primary",
    "value": "The sky looks blue because molecules in Earth's atmosphere scatter short-wavelength blue light from the sun in all directions more than they scatter the other colors."
  },
  "tool_calls": [],
  "unsupported_reason": null,
  "usage": {
    "cached_input": 0,
    "input": 13,
    "output": 31,
    "reasoning": 0,
    "surface": {
      "cached_input": "primary",
      "input": "primary",
      "output": "primary",
      "reasoning": "primary",
      "total": "primary"
    },
    "total": 44
  }
}

Fixture

recorded gemini/usage.stream-final-chunk

ProvenanceValue
Recorded at2026-10-13T10:15:22Z
Requested modelgemini-3.5-flash-lite
Returned modelgemini-3.5-flash-lite
CI runhttps://github.com/kartsan03/wiretruth/actions/runs/38381941285

Reproduce

wiretruth serve gemini/usage.stream-final-chunk

Plain-library snippet from the shim manifest.

createGoogleGenerativeAI({ baseURL: WIRETRUTH_BASE_URL_GEMINI + '/v1beta', apiKey })(model)

Upstream

No matching upstream report.

History

VersionGrade
7.0.153✓ PASS
7.0.146✓ PASS
7.0.142✓ PASS