✓ PASS
any-llm 1.40.2
finish.stop-sequence · anthropic
Requirements
| Id | Level | Status | Evidence |
|---|---|---|---|
| finish-is-stop | MUST | SATISFIED | finish.value="stop" (primary: choices[0].finish_reason); truth.finish="stop"; required finish="stop" |
| text-reported | MUST | SATISFIED | text.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": null, "input": 25, "output": 30, "reasoning": null, "surface": { "cached_input": "absent", "input": "primary", "output": "primary", "reasoning": "absent", "total": "primary" }, "total": 55 }- Stream
{ "chunks_seen": null, "completed": null, "used": false }- Error
null
- Unsupported reason
null
Full observation JSON
{
"elapsed_ms": 163.71998097747564,
"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": [],
"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": null,
"input": 25,
"output": 30,
"reasoning": null,
"surface": {
"cached_input": "absent",
"input": "primary",
"output": "primary",
"reasoning": "absent",
"total": "primary"
},
"total": 55
}
}Fixture
documented anthropic/finish.stop-sequence
| Provenance | Value |
|---|---|
| Source | https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#stop-sequence |
| Notes | Documented 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-sequencePlain-library snippet from the shim manifest.
any_llm.completion(model=model, provider='anthropic', api_base=WIRETRUTH_BASE_URL_ANTHROPIC, api_key=WIRETRUTH_API_KEY); host root, SDK appends /v1/messages and uses x-api-keyUpstream
No matching upstream report.
History
| Version | Grade |
|---|---|
| 1.40.2 | ✓ PASS |
| 1.38.0 | ✓ PASS |
| 1.33.0 | ✓ PASS |