pub struct LlmPreset {
pub key: &'static str,
pub display_name: &'static str,
pub description: &'static str,
pub backend: PresetBackend,
pub default_model: Option<&'static str>,
pub timeout_secs: Option<u64>,
}Expand description
One named way to reach a model.
Fields§
§key: &'static strThe name clap and init accept on the command line.
display_name: &'static strWhat the wizard shows.
description: &'static strOne line on when to pick it.
backend: PresetBackendDirect HTTP or the separately installed Codex CLI, with only the fields that backend can use.
default_model: Option<&'static str>Starting point for the model prompt, or None if the user must supply.
timeout_secs: Option<u64>Request timeout. None inherits LlmConfig’s default of 60s.
Implementations§
Source§impl LlmPreset
impl LlmPreset
pub fn http(&self) -> Option<&HttpPreset>
pub fn endpoint(&self) -> Option<&'static str>
pub fn api_key_env(&self) -> Option<&'static str>
pub fn key_url(&self) -> Option<&'static str>
Sourcepub fn quirks(&self) -> Quirks
pub fn quirks(&self) -> Quirks
This preset’s starting point for the per-model parameters.
What drep init wrote before the quirks registry existed, and what
every path that cannot consult it still writes: the --provider flag
path, an offline run, and any model the registry does not name.
Sourcepub fn protocol(&self) -> ApiProtocol
pub fn protocol(&self) -> ApiProtocol
The wire protocol this preset’s endpoint speaks.
The table stores a string because that is what drep.toml carries and
what config_file::render_one writes. Parsing it here rather than at
each use means a typo in the table is a panic in the preset tests rather
than an unwrap_or_default() that silently builds an OpenAI client for
an Anthropic endpoint.