Skip to content

ReasoningBlock

Defined in: src/types/messages.ts:409

Reasoning content block within a message.

new ReasoningBlock(data): ReasoningBlock;

Defined in: src/types/messages.ts:432

ParameterType
dataReasoningBlockData

ReasoningBlock

readonly type: "reasoningBlock";

Defined in: src/types/messages.ts:415

Discriminator for reasoning content.


readonly optional text: string;

Defined in: src/types/messages.ts:420

The text content of the reasoning process.

ReasoningBlockData.text


readonly optional signature: string;

Defined in: src/types/messages.ts:425

A cryptographic signature for verification purposes.

ReasoningBlockData.signature


readonly optional redactedContent: Uint8Array;

Defined in: src/types/messages.ts:430

The redacted content of the reasoning process.

ReasoningBlockData.redactedContent

toJSON(): {
reasoning: {
text?: string;
signature?: string;
redactedContent?: string;
};
};

Defined in: src/types/messages.ts:449

Serializes the ReasoningBlock to a JSON-compatible ContentBlockData object. Called automatically by JSON.stringify(). Uint8Array redactedContent is encoded as base64 string.

{
reasoning: {
text?: string;
signature?: string;
redactedContent?: string;
};
}
NameTypeDescriptionDefined in
reasoning{ text?: string; signature?: string; redactedContent?: string; }-src/types/messages.ts:449
reasoning.text?stringThe text content of the reasoning process.src/types/messages.ts:393
reasoning.signature?stringA cryptographic signature for verification purposes.src/types/messages.ts:398
reasoning.redactedContent?stringThe redacted content of the reasoning process.src/types/messages.ts:403
JSONSerializable.toJSON

static fromJSON(data): ReasoningBlock;

Defined in: src/types/messages.ts:466

Creates a ReasoningBlock instance from its wrapped data format. Base64-encoded redactedContent is decoded back to Uint8Array.

ParameterTypeDescription
data{ reasoning: { text?: string; signature?: string; redactedContent?: string | Uint8Array<ArrayBufferLike>; }; }Wrapped ReasoningBlockData to deserialize (accepts both string and Uint8Array for redactedContent)
data.reasoning{ text?: string; signature?: string; redactedContent?: string | Uint8Array<ArrayBufferLike>; }-
data.reasoning.text?stringThe text content of the reasoning process.
data.reasoning.signature?stringA cryptographic signature for verification purposes.
data.reasoning.redactedContent?string | Uint8Array<ArrayBufferLike>The redacted content of the reasoning process.

ReasoningBlock

ReasoningBlock instance