ReasoningItem

@Serializable
class ReasoningItem(val content: List<ResponseContentPart> = emptyList(), val id: String? = null, val status: ResponseStatus? = null) : ResponseItem

The chain-of-thought a thinking model produced before its answer.

Comes back ahead of the MessageItem in ModelResponse.output, and is accepted on input so an earlier turn's reasoning can be replayed.

Constructors

Link copied to clipboard
constructor(content: List<ResponseContentPart> = emptyList(), id: String? = null, status: ResponseStatus? = null)
constructor(text: String, id: String? = null, status: ResponseStatus? = null)

Creates a reasoning item from plain chain-of-thought text.

Properties

Link copied to clipboard

Parts carrying the reasoning, in practice ReasoningTextParts.

Link copied to clipboard
val id: String?

Identifier the API assigned to the item; null on an item the caller built.

Link copied to clipboard

Generation state of the item; null on an item the caller built.

Link copied to clipboard

The reasoning text of every TextContentPart in content, concatenated in order.

Link copied to clipboard
open override val type: String

Raw type discriminator of the item.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String