✓ PASS

vercel-ai 7.0.153

truncation.structured-output · gemini

Back to results · Scenario

Requirements

IdLevelStatusEvidence
no-partial-successMUSTSATISFIEDstructured.attempted=true; structured.returned_as_success=false
cause-is-truncationMUSTSATISFIEDfinish.value="length" (primary: NoObjectGeneratedError.finishReason); truth.finish="length"; error.category="validation"; structured.returned_as_success=false
text-reportedSHOULDSATISFIEDtext.value="{\n \"islands\":" (primary); truth.text="{\n \"islands\":"
usage-reportedSHOULDSATISFIEDusage.input=19 (primary); truth.usage.input=19; usage.output=7 (primary); truth.usage.output=7

What the provider sent

Finish
length
Raw finish
MAX_TOKENS
Text
{ "islands":
Tool calls
[]
Usage
{
  "alternatives": {},
  "cached_input": null,
  "input": 19,
  "output": 7,
  "raw": {
    "candidatesTokenCount": 7,
    "promptTokenCount": 19,
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 19
      }
    ],
    "serviceTier": "standard",
    "totalTokenCount": 26
  },
  "reasoning": null,
  "total": 26
}
Stream completed
null
Error
null
Wire excerpt
status: 200
content-type: application/json; charset=UTF-8
body (json):
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "{\n  \"islands\":",
            "thoughtSignature": "EmAKXgFpFH0TRpy3JZL2qd/cDtQmrps9PxfnU8+ovCZz1iEJU700MutHK0ZD2fh0jH2jIqIzPwG+U7gpx2LlBGanxSVs64JLIvaxP9PYvF/lXUxs9Yud2C1/hs4Hi8FAvMg="
          }
        ],
        "role": "model"
      },
      "finishReason": "MAX_TOKENS",
      "index": 0
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 19,
    "candidatesTokenCount": 7,
    "totalTokenCount": 26,
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 19
      }
    ],
    "serviceTier": "standard"
  },
  "modelVersion": "gemini-3.5-flash-lite",
  "responseId": "lwTOap6OEvjljMcPvYSCgAU"
}

What the library reported

Outcome
raised
Finish
{
  "raw": null,
  "source": "NoObjectGeneratedError.finishReason",
  "surface": "primary",
  "value": "length"
}
Text
Value
{ "islands":
Surface
primary
Tool calls
[]
Usage
{
  "cached_input": 0,
  "input": 19,
  "output": 7,
  "reasoning": 0,
  "surface": {
    "cached_input": "primary",
    "input": "primary",
    "output": "primary",
    "reasoning": "primary",
    "total": "primary"
  },
  "total": 26
}
Stream
{
  "chunks_seen": null,
  "completed": null,
  "used": false
}
Error
Type
AI_NoObjectGeneratedError
Message
No object generated: could not parse the response.
Category
validation
Retry after
null
Stack top
ai/dist/index.js:3755
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 104.06247299999998,
  "error": {
    "category": "validation",
    "message": "No object generated: could not parse the response.",
    "retry_after": null,
    "stack_top": "ai/dist/index.js:3755",
    "type": "AI_NoObjectGeneratedError"
  },
  "finish": {
    "raw": null,
    "source": "NoObjectGeneratedError.finishReason",
    "surface": "primary",
    "value": "length"
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "generateText",
    "language": "javascript",
    "name": "vercel-ai",
    "version": "7.0.153"
  },
  "notes": [],
  "outcome": "raised",
  "stream": {
    "chunks_seen": null,
    "completed": null,
    "used": false
  },
  "structured": {
    "attempted": true,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "primary",
    "value": "{\n  \"islands\":"
  },
  "tool_calls": [],
  "unsupported_reason": null,
  "usage": {
    "cached_input": 0,
    "input": 19,
    "output": 7,
    "reasoning": 0,
    "surface": {
      "cached_input": "primary",
      "input": "primary",
      "output": "primary",
      "reasoning": "primary",
      "total": "primary"
    },
    "total": 26
  }
}

Fixture

recorded gemini/truncation.structured-output

ProvenanceValue
Recorded at2026-10-13T10:14:47Z
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/truncation.structured-output

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