LLM::Anthropic
Inherits LLM::General < Reference < Object
Anthropic's native Messages API (POST /v1/messages).
Anthropic's OpenAI-compatible endpoint ignores response_format, so the
endpoint schema the analyzer asks for never reached Claude. This client
sends it as output_config.format instead, and reads Claude's own reply
shape (content blocks, stop_reason). Retries, the sampling and
structured-output fallbacks and the fail-fast streak are General's.
Constants
max_tokens is required here. Adaptive thinking spends from the same
budget, and a reply cut at it is reported like any other truncation.
ponytail: fixed; make it a flag if 16k proves short for big bundles.
Constructors
Class methods
https://api.anthropic.com and .../v1 both mean the Messages
endpoint under them.
The first tool_use block as the agent's action payload, else the
reply's text.
Claude 3 and 3.5 reject a max_tokens over their smaller output cap
with a 400 nothing recovers from, so every request would fail.
The text of a reply, or "" for a refusal. Thinking and other non-text blocks are skipped.