Thinking

@Serializable
class Thinking(val type: ThinkingType)

Toggles the reasoning ("thinking") pass of the deepseek-reasoner model.

When omitted, deepseek-reasoner behaves as if ThinkingType.ENABLED were passed.

Important behaviour observed against the live API: sending Thinking(ThinkingType.DISABLED) together with model = [ChatModel.DEEPSEEK_REASONER] causes the server to route the request to deepseek-chat. The returned ChatCompletion.model comes back as "deepseek-chat" and no reasoning_content is produced. Consumers that branch on response.model must account for this rewrite.

Example:

val params = chatCompletionParams {
model = ChatModel.DEEPSEEK_REASONER
thinking = Thinking(ThinkingType.DISABLED) // server routes to deepseek-chat
}

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