pub struct ModelConfig {
pub provider: String,
pub model: String,
pub max_output_tokens: u32,
pub max_run_tokens: u64,
pub cache_ttl: CacheTtl,
pub prices: Option<Prices>,
pub base_url: Option<String>,
pub api_key_env: Option<String>,
pub structured_native: bool,
pub reasoning_summary: bool,
}Expand description
The model speccoder calls.
Fields§
§provider: StringDriver name: anthropic or openai.
model: StringThe provider’s model id, pinned exactly.
max_output_tokens: u32Per-call output ceiling.
max_run_tokens: u64Token budget of one run.
cache_ttl: CacheTtlLifetime of prompt-cache breakpoints.
prices: Option<Prices>USD per million tokens, if configured (speccoder report --cost).
base_url: Option<String>openai-compatible: the server, e.g. http://localhost:11434/v1.
api_key_env: Option<String>openai-compatible: the environment variable holding a key, if the
server wants one.
structured_native: boolopenai-compatible: the server enforces json_schema output
(structured = "native", the default); "tool" carries it in a
forced tool instead, which works only for steps without tools.
reasoning_summary: boolAsk for a summary of the model’s reasoning on each attempt turn
(reasoning_summary, default on): shown as its account, never as
evidence. Providers without a way to ask (Chat Completions) give none.
Implementations§
Source§impl ModelConfig
impl ModelConfig
Sourcepub fn key_variable(&self) -> &str
pub fn key_variable(&self) -> &str
The environment variable holding this provider’s API key.
Sourcepub fn prompt_style(&self) -> PromptStyle
pub fn prompt_style(&self) -> PromptStyle
How prompts are laid out for this provider.