use Cow;
use ;
use crateerror;
/// An error from a single agent completion inside a [`VectorCompletionChunk`](super::VectorCompletionChunk).
///
/// Yielded by [`VectorCompletionChunk::inner_errors`](super::VectorCompletionChunk::inner_errors).
/// Identifies the failing completion by its `index` (matching
/// [`AgentCompletionChunk::index`](super::AgentCompletionChunk::index)) and
/// carries the underlying [`ResponseError`](error::ResponseError) as a `Cow`
/// so iteration is zero-allocation (`Cow::Borrowed`) while deserialization
/// always lands in `Cow::Owned`.
///
/// Wire shape:
/// ```json
/// { "agent_completion_index": 1, "error": { ... } }
/// ```