Nonempty JSON object of provider-specific content metadata, serialized as
an object under a named additional_params field rather than flattened.
Constructors return None for empty maps. Bare deserialization rejects
empty or non-object values; optional_additional_params maps null and
empty objects to absence. Providers must replay only their own metadata.
The service that issued reasoning: the descriptor name of the wire that
decoded it ("anthropic"), or the model vendor where a gateway relays
several ("openrouter/openai").
Provider-issued identifiers for replay. Single-id protocols use call_id;
dual-id protocols also use item_id. Keep each identifier in its protocol
slot.
Assistant reasoning payload with an optional provider-supplied identifier.
A message carries it Sealed to the service that issued it:
signatures, encrypted and redacted payloads and reasoning ids only mean
something there.
Describes the document media type of the content. Not every provider supports every media type.
Includes also programming languages as document types for providers who support code running.
Convertible to and from MIME type strings.
Shared error text for an invalid empty response choice.
Provider decoders must exempt legal empty outcomes, including recognized
output truncation, before calling require_non_empty_response.
Groups streamed choices as reasoning, text, tool calls, then images,
preserving order within each group. Choices without reasoning or tool calls
retain their original order.
Returns dot-separated paths whose original values are missing or changed
after a round trip. Ignores added keys, null object members, and missing
object members whose original value was an empty object. Array positions
are compared individually.
Deserializes optional metadata, mapping null and empty objects to None.
Nonempty objects produce metadata; other shapes return a deserialization error.
Returns items unchanged unless the list is empty, then calls error once.
Does not inspect individual items: empty text can carry replay signatures.
Request conversions that discard content must validate the converted list
when their wire requires at least one block.