AI.Message.Reasoning (fnord v0.9.40)

View Source

Opaque pass-through for reasoning items returned by the Responses API when a reasoning model is in use. Wire shape (illustrative - fields vary by model and may include summary, encrypted_content, internal IDs, etc.):

%{type: "reasoning", id: "...", summary: [...], encrypted_content: "..."}

We store the raw map verbatim and emit it back unchanged. Round-tripping is what lets store: false callers preserve reasoning continuity across turns without giving OpenAI server-side state.

Atom-table note: the raw map is held as-is. Because reasoning blobs may contain arbitrary keys, do NOT pass these through Util.string_keys_to_atoms/1 or any other key-atomizer. Treat them as inert payload.

Summary

Functions

Hydrate from a raw map. Same as new/1 - the struct is just a wrapper.

Build a reasoning item from the raw map returned by the API.

Types

t()

@type t() :: %AI.Message.Reasoning{raw: map()}

Functions

from_map(raw)

@spec from_map(map()) :: t()

Hydrate from a raw map. Same as new/1 - the struct is just a wrapper.

new(raw)

@spec new(map()) :: t()

Build a reasoning item from the raw map returned by the API.