glean/models/openai
OpenAI GPT models that accept sampling parameters (GPT-4.1 and GPT-4o families).
GPT-5 and later are reasoning models that reject a non-default
temperature; use glean/models/openai_reasoning for those.
Types
Values
pub fn configure(
m: Gpt,
f: fn(config.ProviderConfig) -> config.ProviderConfig,
) -> Gpt
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) -> Gpt
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 gpt4_1_mini(api_key key: String) -> Gpt
GPT-4.1 mini. Model ID: gpt-4.1-mini.
pub fn gpt4_1_nano(api_key key: String) -> Gpt
GPT-4.1 nano. Model ID: gpt-4.1-nano.