✗ WRONG

any-llm 1.40.2

finish.unknown-value · gemini

Back to results · Scenario

Requirements

IdLevelStatusEvidence
response-returnedMUSTSATISFIEDoutcome=returned; error.category=null; truth.error=null
finish-is-otherMUSTCONTRADICTEDfinish.value="stop" (primary: choices[0].finish_reason); truth.finish="other"; required finish="other"
text-reportedMUSTSATISFIEDtext.value="Octopuses are masters of disguise, utilizing an extraordinary biological" (primary); truth.text="Octopuses are masters of disguise, utilizing an extraordinary biological"
raw-finish-reportedSHOULDCONTRADICTEDfinish.raw="stop"; truth.raw_finish="WIRETRUTH_UNKNOWN_REASON"

Notes

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

What the provider sent

Finish
other
Raw finish
WIRETRUTH_UNKNOWN_REASON
Text
Octopuses are masters of disguise, utilizing an extraordinary biological
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
null
Error
null
Wire excerpt
status: 200
content-type: application/json; charset=UTF-8
body (json):
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "Octopuses are masters of disguise, utilizing an extraordinary biological",
            "thoughtSignature": "EmAKXgFpFH0Tm8qzVWNDFvDnBwobD+/9o7uFQz9+c2VcCrTB9RWT+X+x31DAAin+FtIl2C83hppDgmzNy1HB9PPsQ8rPuUnop8Dz511I6ZzJISG/duJhXlK9Qx4iq7WblXs="
          }
        ],
        "role": "model"
      },
      "finishReason": "WIRETRUTH_UNKNOWN_REASON",
      "index": 0
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 22,
    "candidatesTokenCount": 12,
    "totalTokenCount": 34,
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 22
      }
    ],
    "serviceTier": "standard"
  },
  "modelVersion": "gemini-3.5-flash-lite",
  "responseId": "qATOaqvbNv6NjMcPlvHCoA4"
}

What the library reported

Outcome
returned
Finish
{
  "raw": "stop",
  "source": "choices[0].finish_reason",
  "surface": "primary",
  "value": "stop"
}
Text
Value
Octopuses are masters of disguise, utilizing an extraordinary biological
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": null,
  "completed": null,
  "used": false
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 520.5258606001735,
  "error": null,
  "finish": {
    "raw": "stop",
    "source": "choices[0].finish_reason",
    "surface": "primary",
    "value": "stop"
  },
  "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": null,
    "completed": null,
    "used": false
  },
  "structured": {
    "attempted": false,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "primary",
    "value": "Octopuses are masters of disguise, utilizing an extraordinary biological"
  },
  "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

derived gemini/finish.unknown-value

ProvenanceValue
Transformreplace_finish_value
Source fixturegemini/truncation.text
RationaleThe provider sends a finish value that a library may not recognize.
Evidencehttps://github.com/BerriAI/litellm/issues/21347

Reproduce

wiretruth serve gemini/finish.unknown-value

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

documented-behavior

Fixed in: not specified

any-llm documents the fallback: a Gemini finish reason without an OpenAI counterpart (OTHER, LANGUAGE, MALFORMED_FUNCTION_CALL and any unfamiliar value) maps to None and a complete response then reports stop (https://github.com/mozilla-ai/any-llm/blob/18ed82b8ae89db560bf0b1ec8bccb752fc0e2b5d/src/any_llm/providers/gemini/utils.py#L572-L581). The caller cannot tell such a stop from a normal one.

History

VersionGrade
1.40.2✗ WRONG
1.38.0✗ WRONG
1.33.0✗ WRONG