glean/models/deepseek_reasoning

DeepSeek models with thinking turned on.

Thinking mode ignores sampling parameters, so this builder doesn’t offer them. The model’s reasoning is returned as reasoning events and sent back on later turns, which DeepSeek requires when tools are used.

Types

A DeepSeek (thinking) model builder. Pick a model with one of the constructors (or custom), chain setters, then call build().

pub opaque type DeepseekReasoning

Values

pub fn build(m: DeepseekReasoning) -> model.Model

Build a Model to use with agent.new.

pub fn configure(
  m: DeepseekReasoning,
  f: fn(config.ProviderConfig) -> config.ProviderConfig,
) -> DeepseekReasoning

Change the provider configuration: base URL, timeout, headers, retries.

|> configure(config.timeout(_, 120_000))
pub fn custom(
  api_key key: String,
  model model_id: String,
) -> DeepseekReasoning

Any other model ID served by this API, such as one released after this version of glean. Only this module’s setters are available, so check the model accepts them.

pub fn flash(api_key key: String) -> DeepseekReasoning

DeepSeek V4.1 Flash. Model ID: deepseek-flash.

pub fn max_output_tokens(
  m: DeepseekReasoning,
  n: Int,
) -> DeepseekReasoning

Set the maximum number of output tokens.

pub fn reasoning_effort(
  m: DeepseekReasoning,
  effort: provider.ReasoningEffort,
) -> DeepseekReasoning

Set how much the model should think before answering.

pub fn v4_pro(api_key key: String) -> DeepseekReasoning

DeepSeek V4 Pro. Model ID: deepseek-v4-pro.

✨ Search Document