pub enum StructuredOutputError {
MissingResponseFormat,
InvalidSchema(String),
IncompatibleSchema(String),
NoStructuredOutput,
ProviderOutcome(String),
RetriesExhausted {
attempts: u32,
errors: String,
last_value: Option<Value>,
},
Transport(Error),
}Expand description
Errors from the structured-output runner.
These are typed terminal outcomes — the runner never panics on a model that fails to produce schema-valid output.
Variants§
MissingResponseFormat
The request did not carry a
response_format.
InvalidSchema(String)
The schema supplied in the response format is not a valid JSON Schema.
IncompatibleSchema(String)
The schema is valid JSON Schema, but OpenAI strict mode cannot preserve
its dynamic-property semantics.
NoStructuredOutput
The model produced no extractable structured value (no JSON text / no forced tool call).
ProviderOutcome(String)
The provider returned a non-success outcome (rate limit, server error, invalid request).
RetriesExhausted
The re-prompt budget was exhausted and the latest output still failed schema validation. Carries the final validation errors and the last candidate value for diagnostics.
Fields
Transport(Error)
A transport-level error bubbled up from the provider.
Trait Implementations§
Source§impl Debug for StructuredOutputError
impl Debug for StructuredOutputError
Source§impl Display for StructuredOutputError
impl Display for StructuredOutputError
Source§impl Error for StructuredOutputError
impl Error for StructuredOutputError
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()