Summary
Some providers return an error-shaped body where a success body is expected (e.g. Ollama returns { "error": ... } instead of { model, ..., done }). The normalized response types (NormalizedResponse / ContentBlock in laminate/src/provider/mod.rs) have no error representation, so an error body fails to parse as a normal response with an unhelpful message.
Proposal
Add a representation for provider error responses (e.g. a ContentBlock::Error { message } variant or a typed error result), and detect the common error shapes in the adapters so callers get a clear, typed signal.
Acceptance
- Error-shaped bodies parse into a clear error representation rather than a generic deserialize failure.
- Tests for at least the Ollama error shape. Targets 0.2.0.
Summary
Some providers return an error-shaped body where a success body is expected (e.g. Ollama returns
{ "error": ... }instead of{ model, ..., done }). The normalized response types (NormalizedResponse/ContentBlockinlaminate/src/provider/mod.rs) have no error representation, so an error body fails to parse as a normal response with an unhelpful message.Proposal
Add a representation for provider error responses (e.g. a
ContentBlock::Error { message }variant or a typed error result), and detect the common error shapes in the adapters so callers get a clear, typed signal.Acceptance