glean/models/deepseek

DeepSeek models with thinking turned off.

deepseek-chat and deepseek-reasoner were retired on Jul 24, 2026. The current models switch thinking on per request; for thinking mode see glean/models/deepseek_reasoning.

Types

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

pub opaque type Deepseek

Values

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

Build a Model to use with agent.new.

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

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,
) -> Deepseek

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) -> Deepseek

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

pub fn frequency_penalty(m: Deepseek, fp: Float) -> Deepseek

Set the frequency penalty.

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

Set the maximum number of output tokens.

pub fn presence_penalty(m: Deepseek, pp: Float) -> Deepseek

Set the presence penalty.

pub fn stop_sequences(
  m: Deepseek,
  stops: List(String),
) -> Deepseek

Stop generating when the model writes any of these strings.

pub fn temperature(m: Deepseek, t: Float) -> Deepseek

Set the sampling temperature.

pub fn top_p(m: Deepseek, p: Float) -> Deepseek

Set the top-p (nucleus sampling) value.

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

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

✨ Search Document