ReasoningEffort

@Serializable
value class ReasoningEffort(val value: String)

How much reasoning a thinking model spends before it answers, serialized as the raw value the API expects.

Sent as the top-level reasoning_effort field, next to — not inside — Thinking. It only matters while the reasoning pass runs: with ThinkingType.DISABLED the model answers directly and the effort is moot. Leaving it unset asks for the API default, high.

The same type carries the Responses API's reasoning.effort, which spans a wider scale — see org.oremif.deepseek.models.responses.ReasoningConfig. There NONE switches thinking off altogether, and the server folds the levels onto the same three budgets: MINIMAL and LOW onto low, MEDIUM / HIGH / XHIGH onto high, and MAX onto max. On /chat/completions only LOW, HIGH and MAX are documented; medium and xhigh are accepted there and mapped onto HIGH, while NONE and MINIMAL belong to the Responses API — turn thinking off in a chat request with Thinking instead.

Any other value can be wrapped directly, so a level the SDK declares no constant for is still usable:

val params = chatCompletionParams {
model = ChatModel.DEEPSEEK_V4_PRO
reasoningEffort = ReasoningEffort.MAX
}
val future = chatCompletionParams { reasoningEffort = ReasoningEffort("ultra") }

See also

Constructors

Link copied to clipboard
constructor(value: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Raw effort level sent in the reasoning_effort field of a chat request, or in reasoning.effort of a Responses API request. Must not be blank.

Functions

Link copied to clipboard
open override fun toString(): String