– UNSUPPORTED
any-llm 1.40.2
truncation.structured-output-forced-tool · anthropic
Requirements
| Id | Level | Status | Evidence |
|---|
Notes
- any-llm completion maps typed response_format to native output_config.format and has no structured parser for an explicitly forced tool. (https://github.com/mozilla-ai/any-llm/blob/1.40.2/src/any_llm/providers/anthropic/utils.py#L660-L686)
What the provider sent
- Finish
- length
- Raw finish
- max_tokens
- Text
null
- Tool calls
[ { "arguments": { "islands": [ { "name": "Κρήτη" } ] }, "arguments_parsed_ok": true, "arguments_raw": "{\"islands\":[{\"name\":\"Κρήτη\"}]}", "id": "toolu_01A09q90qw90lq917835lq9", "name": "structured_output" } ]- Usage
{ "alternatives": {}, "cached_input": null, "input": 25, "output": 24, "raw": { "input_tokens": 25, "output_tokens": 24 }, "reasoning": null, "total": 49 }- Stream completed
null
- Error
null
Wire excerpt
status: 200
content-type: application/json
body (json):
{
"id": "msg_01Aq9w938a90dw8q",
"type": "message",
"role": "assistant",
"content": [
{
"type": "tool_use",
"id": "toolu_01A09q90qw90lq917835lq9",
"name": "structured_output",
"input": {
"islands": [
{
"name": "Κρήτη"
}
]
}
}
],
"model": "claude-haiku-4-5",
"stop_reason": "max_tokens",
"stop_sequence": null,
"stop_details": null,
"usage": {
"input_tokens": 25,
"output_tokens": 24
}
}What the library reported
- Outcome
- unsupported
- Finish
{ "raw": null, "source": null, "surface": "absent", "value": null }- Text
- Value
null
- Surface
- absent
- Tool calls
[]
- Usage
{ "cached_input": null, "input": null, "output": null, "reasoning": null, "surface": { "cached_input": "absent", "input": "absent", "output": "absent", "reasoning": "absent", "total": "absent" }, "total": null }- Stream
{ "chunks_seen": null, "completed": null, "used": false }- Error
null
- Unsupported reason
- any-llm completion maps typed response_format to native output_config.format and has no structured parser for an explicitly forced tool. https://github.com/mozilla-ai/any-llm/blob/1.40.2/src/any_llm/providers/anthropic/utils.py#L660-L686
Full observation JSON
{
"elapsed_ms": 1.4513442292809486,
"error": null,
"finish": {
"raw": null,
"source": null,
"surface": "absent",
"value": null
},
"format": "wiretruth.observation/v1",
"library": {
"api": "any_llm.completion",
"language": "python",
"name": "any-llm",
"version": "1.40.2"
},
"notes": [],
"outcome": "unsupported",
"stream": {
"chunks_seen": null,
"completed": null,
"used": false
},
"structured": {
"attempted": false,
"returned_as_success": false,
"value": null
},
"text": {
"surface": "absent",
"value": null
},
"tool_calls": [],
"unsupported_reason": "any-llm completion maps typed response_format to native output_config.format and has no structured parser for an explicitly forced tool. https://github.com/mozilla-ai/any-llm/blob/1.40.2/src/any_llm/providers/anthropic/utils.py#L660-L686",
"usage": {
"cached_input": null,
"input": null,
"output": null,
"reasoning": null,
"surface": {
"cached_input": "absent",
"input": "absent",
"output": "absent",
"reasoning": "absent",
"total": "absent"
},
"total": null
}
}Fixture
documented anthropic/truncation.structured-output-forced-tool
| Provenance | Value |
|---|---|
| Source | https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#forcing-tool-use |
| Notes | Documented shapes, not a recording. Message envelope follows handling-stop-reasons; tool_use object and forced tool choice follow define-tools. Model changed to claude-haiku-4-5; message ID follows the handle-tool-calls example. Scenario data and token counts are filled in, not measured. ASSUMED truncation: input stays an object as documented, but the island is missing its required sea. The docs do not show this exact forced Haiku truncation. No thinking block: forced tool use skips thinking. The call override supplies explicit tools and named tool_choice while output_schema retains the structured intent; no native output_config.format is sent. |
Reproduce
wiretruth serve anthropic/truncation.structured-output-forced-toolPlain-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 | – UNSUPPORTED |
| 1.38.0 | – UNSUPPORTED |
| 1.33.0 | – UNSUPPORTED |