Skip to content

ReasoningBlock

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

Reasoning content block within a message.

new ReasoningBlock(data): ReasoningBlock;

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

ParameterType
dataReasoningBlockData

ReasoningBlock

readonly type: "reasoningBlock";

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

Discriminator for reasoning content.


readonly optional text: string;

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

The text content of the reasoning process.

ReasoningBlockData.text


readonly optional signature: string;

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

A cryptographic signature for verification purposes.

ReasoningBlockData.signature


readonly optional redactedContent: Uint8Array;

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

The redacted content of the reasoning process.

ReasoningBlockData.redactedContent

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

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

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:453
reasoning.text?stringThe text content of the reasoning process.src/types/messages.ts:397
reasoning.signature?stringA cryptographic signature for verification purposes.src/types/messages.ts:402
reasoning.redactedContent?stringThe redacted content of the reasoning process.src/types/messages.ts:407
JSONSerializable.toJSON

static fromJSON(data): ReasoningBlock;

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

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