Skip to main content

ReasoningContent

Reasoning content for LLM chain-of-thought and extended thinking responses.

Import

import type { ReasoningContent } from '@adaline/api';

Type Definition

interface ReasoningContent {
  modality: 'reasoning';
  value: ReasoningContentValueUnion;
}

type ReasoningContentValueUnion =
  | ReasoningContentValue
  | RedactedReasoningContentValue;

interface ReasoningContentValue {
  type: 'thinking';
  thinking: string;
  signature: string;
}

interface RedactedReasoningContentValue {
  type: 'redacted';
  data: string;
}

Fields

modality
string
required
Must be "reasoning".
value
ReasoningContentValueUnion
required
The reasoning value — either a thinking type with content and signature, or a redacted type with opaque data.

Example

import type { ReasoningContent } from '@adaline/api';

const reasoning: ReasoningContent = {
  modality: 'reasoning',
  value: {
    type: 'thinking',
    thinking: 'Let me analyze this step by step...',
    signature: 'sig_abc123'
  }
};

const redacted: ReasoningContent = {
  modality: 'reasoning',
  value: {
    type: 'redacted',
    data: '[REDACTED]'
  }
};
JSON:
{
  "modality": "reasoning",
  "value": {
    "type": "thinking",
    "thinking": "Let me analyze this step by step...",
    "signature": "sig_abc123"
  }
}