✓ PASS

litellm 1.105.5

finish.stop-sequence · anthropic

Back to results · Scenario

Requirements

IdLevelStatusEvidence
finish-is-stopMUSTSATISFIEDfinish.value="stop" (primary: choices[0].finish_reason); truth.finish="stop"; required finish="stop"
text-reportedMUSTSATISFIEDtext.value="1, 2, 3, 4, 5, 6, 7, 8, 9, 10" (primary); truth.text="1, 2, 3, 4, 5, 6, 7, 8, 9, 10"

What the provider sent

Finish
stop
Raw finish
stop_sequence
Text
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Tool calls
[]
Usage
{
  "alternatives": {},
  "cached_input": null,
  "input": 25,
  "output": 30,
  "raw": {
    "input_tokens": 25,
    "output_tokens": 30
  },
  "reasoning": null,
  "total": 55
}
Stream completed
null
Error
null
Wire excerpt
status: 200
content-type: application/json
body (json):
{
  "id": "msg_01Aq9w938a90dw8q",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
    }
  ],
  "model": "claude-sonnet-5-5",
  "stop_reason": "stop_sequence",
  "stop_sequence": "END",
  "stop_details": null,
  "usage": {
    "input_tokens": 25,
    "output_tokens": 30
  }
}

What the library reported

Outcome
returned
Finish
{
  "raw": "stop",
  "source": "choices[0].finish_reason",
  "surface": "primary",
  "value": "stop"
}
Text
Value
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Surface
primary
Tool calls
[]
Usage
{
  "cached_input": 0,
  "input": 25,
  "output": 30,
  "reasoning": 0,
  "surface": {
    "cached_input": "primary",
    "input": "primary",
    "output": "primary",
    "reasoning": "primary",
    "total": "primary"
  },
  "total": 55
}
Stream
{
  "chunks_seen": null,
  "completed": null,
  "used": false
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 344.8163866996765,
  "error": null,
  "finish": {
    "raw": "stop",
    "source": "choices[0].finish_reason",
    "surface": "primary",
    "value": "stop"
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "litellm.completion",
    "language": "python",
    "name": "litellm",
    "version": "1.105.5"
  },
  "notes": [],
  "outcome": "returned",
  "stream": {
    "chunks_seen": null,
    "completed": null,
    "used": false
  },
  "structured": {
    "attempted": false,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "primary",
    "value": "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
  },
  "tool_calls": [],
  "unsupported_reason": null,
  "usage": {
    "cached_input": 0,
    "input": 25,
    "output": 30,
    "reasoning": 0,
    "surface": {
      "cached_input": "primary",
      "input": "primary",
      "output": "primary",
      "reasoning": "primary",
      "total": "primary"
    },
    "total": 55
  }
}

Fixture

documented anthropic/finish.stop-sequence

ProvenanceValue
Sourcehttps://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#stop-sequence
NotesDocumented shapes, not a recording. Message envelope and stop fields follow handling-stop-reasons; content blocks follow thinking/streaming and handle-tool-calls. Model changed to claude-sonnet-5-5; IDs and scenario text are filled in. Token counts are illustrative, filled in to include thinking within the requested output limit, not measured. stop_reason stop_sequence and stop_sequence END follow the documented example; visible count text is filled in. Adaptive thinking is assumed skipped for this simple count.

Reproduce

wiretruth serve anthropic/finish.stop-sequence

Plain-library snippet from the shim manifest.

litellm.completion(model='anthropic/' + model, api_base=WIRETRUTH_BASE_URL_ANTHROPIC, api_key=WIRETRUTH_API_KEY); host root, LiteLLM appends /v1/messages

Upstream

No matching upstream report.

History

VersionGrade
1.105.5✓ PASS
1.105.1✓ PASS