pub enum ConfigError {
Show 15 variants
Io(PathBuf, Error),
Parse(PathBuf, String),
EnvVarUnset(String, String),
EnvVarNotUnicode(String, String),
Temperature {
index: usize,
temperature: f32,
},
ZeroConcurrency {
index: usize,
},
ZeroTimeout {
index: usize,
},
ZeroMaxTokens {
index: usize,
},
UnknownProtocol {
index: usize,
value: String,
},
UnknownBackend {
index: usize,
value: String,
},
UnknownReasoningEffort {
index: usize,
value: String,
},
BackendField {
index: usize,
backend: &'static str,
field: &'static str,
},
BackendMissingField {
index: usize,
backend: &'static str,
field: &'static str,
},
NoProviders(PathBuf),
NoEnabledProviders(PathBuf),
}Expand description
What went wrong reading or validating the configuration.
Variants§
Io(PathBuf, Error)
Parse(PathBuf, String)
EnvVarUnset(String, String)
EnvVarNotUnicode(String, String)
Temperature
The index is the zero-based position in the file; the message renders
it one-based, and says “in file order” because the chain numbers only
the enabled entries - with a disabled head the two differ, and
[[llm]] #1 meaning different tables in the same file is worse than
either convention alone.
ZeroConcurrency
max_concurrent = 0 builds a semaphore with no permits, so every
request waits for one forever. Rejected at load rather than clamped: a
silent bump to 1 would run a gate at a concurrency the user did not ask
for, and the alternative - the documented “callers are expected to set a
positive value” - is a hang with no message at all.
ZeroTimeout
ZeroMaxTokens
UnknownProtocol
Rejected rather than defaulted: falling back to openai would post
chat-completions bytes to a /messages endpoint, and the resulting 404
reads as “the provider is down” rather than “this line has a typo”.
UnknownBackend
UnknownReasoningEffort
BackendField
BackendMissingField
NoProviders(PathBuf)
NoEnabledProviders(PathBuf)
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()