pub enum LlmError {
Transport(String),
Upstream(String),
InvalidRequest(String),
Timeout {
timeout_ms: u64,
},
Parse(String),
NoFixture {
model: String,
prompt_hash: String,
},
FixtureIntegrityFailed(String),
Io(String),
}Expand description
Errors returned by any LlmAdapter implementation.
Variants§
Transport(String)
Network or transport error talking to the provider.
Upstream(String)
Upstream provider returned a non-success status with the given message.
InvalidRequest(String)
Request violated provider or local validation (bad shape, banned content, schema mismatch).
Timeout
The request exceeded its timeout_ms budget.
Parse(String)
The response could not be parsed as the requested JSON schema.
NoFixture
Replay adapter could not find a fixture matching (model, prompt_hash).
Fields
FixtureIntegrityFailed(String)
Replay adapter found a fixture but its on-disk bytes did not match the
hash recorded in INDEX.toml. Maps to the CLI’s
Exit::QuarantinedInput(5) exit code in lane 1.C.
See THREATS.md row T-RM-1 for the threat model rationale.
Io(String)
I/O failure reading fixtures, INDEX.toml, or any other adapter-local resource.
Trait Implementations§
Source§impl Error for LlmError
impl Error for LlmError
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()