Thinking

@Serializable
class Thinking(val type: ThinkingType)

Switches a model between its thinking and non-thinking mode.

Omitting this field is equivalent to ThinkingType.ENABLED. A thinking response carries its chain-of-thought in AssistantMessage.reasoningContent and bills the extra tokens under CompletionTokenDetails.reasoningTokens; the non-thinking mode answers faster and cheaper. Either way ChatCompletion.model echoes the slug that was sent.

How long that reasoning pass runs is a separate, top-level request field — see ReasoningEffort.

Example:

val params = chatCompletionParams {
model = ChatModel.DEEPSEEK_FLASH
thinking = Thinking(ThinkingType.DISABLED) // skip the reasoning pass
}

Constructors

Link copied to clipboard
constructor(type: ThinkingType)

Properties

Link copied to clipboard

Whether the reasoning pass runs for this request.

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