"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .openresponsesresult import OpenResponsesResult, OpenResponsesResultTypedDict
from openrouter.types import BaseModel
from typing import Literal
from typing_extensions import TypedDict


StreamEventsResponseFailedType = Literal["response.failed",]


class StreamEventsResponseFailedTypedDict(TypedDict):
    r"""Event emitted when a response has failed"""

    response: OpenResponsesResultTypedDict
    r"""Complete non-streaming response from the Responses API"""
    sequence_number: int
    type: StreamEventsResponseFailedType


class StreamEventsResponseFailed(BaseModel):
    r"""Event emitted when a response has failed"""

    response: OpenResponsesResult
    r"""Complete non-streaming response from the Responses API"""

    sequence_number: int

    type: StreamEventsResponseFailedType
