llm_wire/thinking

How much a model may think before it answers.

Set a level with generation.with_thinking_level or llm_wire.with_thinking_level. Each built-in provider writes it in its own form: OpenAI as reasoning.effort, Google as generationConfig.thinkingConfig.thinkingLevel, Anthropic as adaptive thinking with output_config.effort. Each level is a value at least two of them share; prepare refuses a level the selected provider has no value for, and a model that does not take the value it receives answers with its own error status.

On every built-in provider the output limit counts thought and visible tokens together. A level steers how much of that limit thinking takes and reserves no visible share; message.Usage shows afterwards how the limit was spent.

Types

A thinking level.

pub type Level {
  Minimal
  Low
  Medium
  High
  ExtraHigh
  Max
}

Constructors

  • Minimal

    OpenAI minimal, Google MINIMAL; Anthropic has no such level.

  • Low
  • Medium
  • High
  • ExtraHigh

    OpenAI, Google and Anthropic xhigh, on the models that take it.

  • Max

    OpenAI and Anthropic max; Google has no such level.

Values

pub fn name(level: Level) -> String

The level’s lowercase name: "minimal", "low", "medium", "high", "xhigh" or "max".

✨ Search Document