glean/models/mistral

Mistral AI models.

Supported parameters: max_output_tokens, temperature, top_p, stop_sequences.

Types

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

pub opaque type Mistral

Values

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

Build a Model to use with agent.new.

pub fn codestral(api_key key: String) -> Mistral

Codestral (latest). Model ID: codestral-latest.

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

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

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 devstral(api_key key: String) -> Mistral

Devstral (latest). Model ID: devstral-latest.

pub fn large_3(api_key key: String) -> Mistral

Mistral Large 3. Model ID: mistral-large-2512.

pub fn large_4(api_key key: String) -> Mistral

Mistral Large 4 (preview). Model ID: mistral-large-4.

pub fn magistral_medium(api_key key: String) -> Mistral

Magistral Medium (latest). Model ID: magistral-medium-latest.

pub fn magistral_small(api_key key: String) -> Mistral

Magistral Small (latest). Model ID: magistral-small-latest.

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

Set the maximum number of output tokens.

pub fn medium_3_5(api_key key: String) -> Mistral

Mistral Medium 3.5. Model ID: mistral-medium-2604.

pub fn ministral_14b(api_key key: String) -> Mistral

Ministral 14B. Model ID: ministral-14b-2512.

pub fn ministral_3b(api_key key: String) -> Mistral

Ministral 3B. Model ID: ministral-3b-2512.

pub fn ministral_8b(api_key key: String) -> Mistral

Ministral 8B. Model ID: ministral-8b-2512.

pub fn small_4(api_key key: String) -> Mistral

Mistral Small 4. Model ID: mistral-small-2603.

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

Stop generating when the model writes any of these strings.

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

Set the sampling temperature.

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

Set the top-p (nucleus sampling) value.

✨ Search Document