Optional ReadonlycapabilitiesMissing metadata is unknown, never an implicit support claim.
ReadonlyencoderThe encoder whose output this adapter transmits.
Declared rather than assumed so the runtime can REFUSE a route that pairs an Anthropic adapter with an OpenAI body. Sending a well-formed request of the wrong shape is a 400 that looks like a model problem, and the mismatch is cheap to catch at registration.
ReadonlyencoderReadonlyidReadonlyversionOptionalassertRefuse a request this adapter cannot carry, BEFORE anything durable exists.
Optional, and deliberately a refusal rather than a fixer: an adapter that
repaired params would produce bytes the caller did not ask for, and a
request/header row would then commit to a request nobody wrote. Called by
the runtime before the request is encoded or logged, so a refusal costs
nothing durable.
The case that motivates it: anthropic-messages@1 does not set stream
itself, so a caller who omits it gets a plain JSON response that the
streaming decoder can only report, sixty seconds later, as a connection that
ended early. Refusing up front turns that into one clear sentence.
Decode one successful response into chunks.
May throw: a malformed frame is a real failure and the runtime turns it into
a typed terminal failure with a durable row. What it must NOT do is silently
skip a frame it does not understand, because a silently skipped usage
frame becomes a signed row claiming a step cost nothing.
Optionaldescribe
One provider's wire format.
idandversionare recorded on every settlement row, so a stream that decoded strangely can be attributed to a specific adapter build rather than to "the LLM seam".versionmoves when the DECODING changes in a way that could alter the blocks a stream produces — it is the same disciplineRequestEncoder.versionapplies to the send half.