mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
Remove obsolete component documentation and update speakeasy-generated files to match the latest OpenAPI spec regeneration.
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from dataclasses import dataclass, field
|
|
import httpx
|
|
from openrouter.components import (
|
|
goneresponseerrordata as components_goneresponseerrordata,
|
|
)
|
|
from openrouter.errors import OpenRouterError
|
|
from openrouter.types import BaseModel, OptionalNullable, UNSET
|
|
from typing import Optional
|
|
|
|
|
|
class GoneResponseErrorData(BaseModel):
|
|
error: components_goneresponseerrordata.GoneResponseErrorData
|
|
r"""Error data for GoneResponse"""
|
|
user_id: OptionalNullable[str] = UNSET
|
|
|
|
|
|
@dataclass(unsafe_hash=True)
|
|
class GoneResponseError(OpenRouterError):
|
|
r"""Gone - Endpoint has been permanently removed or deprecated"""
|
|
|
|
data: GoneResponseErrorData = field(hash=False)
|
|
|
|
def __init__(
|
|
self,
|
|
data: GoneResponseErrorData,
|
|
raw_response: httpx.Response,
|
|
body: Optional[str] = None,
|
|
):
|
|
fallback = body or raw_response.text
|
|
message = str(data.error.message) or fallback
|
|
super().__init__(message, raw_response, body)
|
|
object.__setattr__(self, "data", data)
|