✓ PASS

any-llm 1.40.2

truncation.text-stream · gemini

Back to results · Scenario

Requirements

IdLevelStatusEvidence
cause-is-truncationMUSTSATISFIEDfinish.value="length" (primary: choices[0].finish_reason); truth.finish="length"; error.category=null; structured.returned_as_success=false
text-reportedSHOULDSATISFIEDtext.value="Octopuses are the ultimate masters of disguise, utilizing a" (primary); truth.text="Octopuses are the ultimate masters of disguise, utilizing a"
usage-reportedSHOULDSATISFIEDusage.output=12 (primary); truth.usage.output=12

Notes

  • shim: Gemini reasoning_effort none is unsupported by any-llm; omitted to use the model default.

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": "length",
  "source": "choices[0].finish_reason",
  "surface": "primary",
  "value": "length"
}
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": 3,
  "completed": null,
  "used": true
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 679.6956090256572,
  "error": null,
  "finish": {
    "raw": "length",
    "source": "choices[0].finish_reason",
    "surface": "primary",
    "value": "length"
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "any_llm.completion",
    "language": "python",
    "name": "any-llm",
    "version": "1.40.2"
  },
  "notes": [
    "Gemini reasoning_effort none is unsupported by any-llm; omitted to use the model default."
  ],
  "outcome": "returned",
  "stream": {
    "chunks_seen": 3,
    "completed": null,
    "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

ProvenanceValue
Recorded at2026-10-13T10:15:02Z
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.text-stream

Plain-library snippet from the shim manifest.

any_llm.completion(model=model, provider='gemini', api_base=WIRETRUTH_BASE_URL_GEMINI, api_key=WIRETRUTH_API_KEY); host-root base URL

Upstream

No matching upstream report.

History

VersionGrade
1.40.2✓ PASS
1.38.0✓ PASS
1.33.0✓ PASS