Thinking

org.llm4s.llmconnect.model.Thinking
See theThinking companion object
@Stable
sealed trait Thinking

Whether the model thinks before it answers, and how its thinking is bounded: separate from ReasoningEffort, which says how hard to think.

Set it with CompletionOptions.withThinking. A provider maps each case to its own control, and reports what it could not send as asked on Completion.adjustments (RFC 0008):

  • Thinking.Off: do not think. Anthropic thinking: disabled; on OpenAI, the lowest effort the model accepts.
  • Thinking.Adaptive: the model decides whether and how much to think. Anthropic thinking: adaptive.
  • Thinking.Budget: think within a token budget. Anthropic budget_tokens, fitted to the provider's range and reported as Adjusted when it does not fit.

@Stable, not @Experimental as RFC 0008 first wrote it: the @Stable CompletionOptions exposes it, as RequestOption is exposed by Completion (RFC 0008 decisions 12 and 14).

Attributes

Example
CompletionOptions().withThinking(Thinking.Adaptive).withReasoning(ReasoningEffort.Low)
Thinking.budget(8000).map(CompletionOptions().withThinking)   // Result[CompletionOptions]
Companion
object
Source
Thinking.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Adaptive
class Budget
object Off
In this article