✓ PASS

any-llm 1.40.2

truncation.structured-output · ollama-openai

Back to results · Scenario

Requirements

IdLevelStatusEvidence
no-partial-successMUSTSATISFIEDstructured.attempted=true; structured.returned_as_success=false
cause-is-truncationMUSTSATISFIEDfinish.value="length" (primary: error.completion.choices[0].finish_reason); truth.finish="length"; error.category="truncation"; structured.returned_as_success=false
text-reportedSHOULDSATISFIEDtext.value="{\n \"islands\": [\n {\n \"name\": \"Αύγουστος\"," (primary); truth.text="{\n \"islands\": [\n {\n \"name\": \"Αύγουστος\","
usage-reportedSHOULDSATISFIEDusage.input=30 (primary); truth.usage.input=30; usage.output=24 (primary); truth.usage.output=24

What the provider sent

Finish
length
Raw finish
length
Text
{ "islands": [ { "name": "Αύγουστος",
Tool calls
[]
Usage
{
  "alternatives": {},
  "cached_input": 0,
  "input": 30,
  "output": 24,
  "raw": {
    "completion_tokens": 24,
    "prompt_tokens": 30,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "total_tokens": 54
  },
  "reasoning": null,
  "total": 54
}
Stream completed
null
Error
null
Wire excerpt
status: 200
content-type: application/json
body (json):
{
  "id": "chatcmpl-59",
  "object": "chat.completion",
  "created": 1791831681,
  "model": "qwen3.5:0.8b",
  "system_fingerprint": "fp_ollama",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "{\n  \"islands\": [\n    {\n      \"name\": \"Αύγουστος\","
      },
      "finish_reason": "length"
    }
  ],
  "usage": {
    "prompt_tokens": 30,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens": 24,
    "total_tokens": 54
  }
}

What the library reported

Outcome
raised
Finish
{
  "raw": "length",
  "source": "error.completion.choices[0].finish_reason",
  "surface": "primary",
  "value": "length"
}
Text
Value
{ "islands": [ { "name": "Αύγουστος",
Surface
primary
Tool calls
[]
Usage
{
  "cached_input": 0,
  "input": 30,
  "output": 24,
  "reasoning": null,
  "surface": {
    "cached_input": "primary",
    "input": "primary",
    "output": "primary",
    "reasoning": "absent",
    "total": "primary"
  },
  "total": 54
}
Stream
{
  "chunks_seen": null,
  "completed": null,
  "used": false
}
Error
Type
openai.LengthFinishReasonError
Message
Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=24, prompt_tokens=30, total_tokens=54, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cache_write_tokens=None, cached_tokens=0, image_tokens=None, text_tokens=None))
Category
truncation
Retry after
null
Stack top
openai/lib/_parsing/_completions.py:110
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 164.51420914381742,
  "error": {
    "category": "truncation",
    "message": "Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=24, prompt_tokens=30, total_tokens=54, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cache_write_tokens=None, cached_tokens=0, image_tokens=None, text_tokens=None))",
    "retry_after": null,
    "stack_top": "openai/lib/_parsing/_completions.py:110",
    "type": "openai.LengthFinishReasonError"
  },
  "finish": {
    "raw": "length",
    "source": "error.completion.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": [],
  "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\": [\n    {\n      \"name\": \"Αύγουστος\","
  },
  "tool_calls": [],
  "unsupported_reason": null,
  "usage": {
    "cached_input": 0,
    "input": 30,
    "output": 24,
    "reasoning": null,
    "surface": {
      "cached_input": "primary",
      "input": "primary",
      "output": "primary",
      "reasoning": "absent",
      "total": "primary"
    },
    "total": 54
  }
}

Fixture

recorded ollama-openai/truncation.structured-output

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/38294739276

Reproduce

wiretruth serve ollama-openai/truncation.structured-output

Plain-library snippet from the shim manifest.

any_llm.completion(model=model, provider='openai', api_base=WIRETRUTH_BASE_URL_OLLAMA_OPENAI, api_key=WIRETRUTH_API_KEY)

Upstream

No matching upstream report.

History

VersionGrade
1.40.2✓ PASS
1.38.0✓ PASS
1.33.0✓ PASS