| 1 | package provider |
| 2 | |
| 3 | import "errors" |
| 4 | |
| 5 | // ErrEmptyResponse marks a clean provider completion that carried no text, |
| 6 | // reasoning, tool calls, response items, or server-side activity. The agent |
| 7 | // may safely retry the frozen request because the empty attempt produced no |
| 8 | // assistant message that can be committed to conversation history. |
| 9 | var ErrEmptyResponse = errors.New("empty provider response") |
| 10 | |
| 11 | // ErrNoDeliverableOutput marks a terminal response without an answer after |
| 12 | // the agent's bounded recovery. Transport retries must not restart this turn. |
| 13 | var ErrNoDeliverableOutput = errors.New("no_deliverable_output: model finished without a visible final answer after recovery; this turn did not complete") |
| 14 | |
| 15 | // ErrNonStreamingResponse marks a stream request answered with a complete |
| 16 | // non-SSE body (a gateway landing page, an HTML or JSON error page). It is an |
| 17 | // endpoint configuration problem, not a dropped connection, so it never wraps |
| 18 | // io.ErrUnexpectedEOF and retrying the same request cannot recover it. |
| 19 | var ErrNonStreamingResponse = errors.New("endpoint returned a non-streaming response") |
| 20 |