Skip to main content

Module model_config

Module model_config 

Source
Expand description

[model] in speccoder.toml.

Structs§

ModelConfig
The model speccoder calls.
Prices
USD per million tokens.

Enums§

CacheTtl
Prompt-cache lifetime for breakpoints: agentplane’s, read as 5m or 1h (one hour survives a run paused for an approval). How long a provider keeps a cached prompt prefix.
PromptStyle
Provider prompt dialects (same content, same stability order).

Functions§

open_driver
The model driver for model, and the secret to redact from messages. Keys come only from the environment; a local openai-compatible server needs none unless api_key_env names one.
parse
Reads [model] from the configuration text; None when absent.
refused
Why the model could not be opened, as a result: a missing key is KEY-MISSING with the exact export (and the other ways to get a model), anything else CONFIG-INVALID. Every command that calls a model says it the same way.
strip_cache_control
Removes cache_control breakpoints from a prompt (for PromptStyle::Chat).