mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
Co-authored-by: speakeasybot <bot@speakeasyapi.dev> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
48 lines
1.1 KiB
Python
48 lines
1.1 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from openrouter.types import BaseModel, UnrecognizedStr
|
|
from typing import Literal, Union
|
|
from typing_extensions import TypedDict
|
|
|
|
|
|
Code = Union[
|
|
Literal[
|
|
"server_error",
|
|
"rate_limit_exceeded",
|
|
"invalid_prompt",
|
|
"vector_store_timeout",
|
|
"invalid_image",
|
|
"invalid_image_format",
|
|
"invalid_base64_image",
|
|
"invalid_image_url",
|
|
"image_too_large",
|
|
"image_too_small",
|
|
"image_parse_error",
|
|
"image_content_policy_violation",
|
|
"invalid_image_mode",
|
|
"image_file_too_large",
|
|
"unsupported_image_media_type",
|
|
"empty_image_file",
|
|
"failed_to_download_image",
|
|
"image_file_not_found",
|
|
"bio_policy",
|
|
],
|
|
UnrecognizedStr,
|
|
]
|
|
|
|
|
|
class ResponsesErrorFieldTypedDict(TypedDict):
|
|
r"""Error information returned from the API"""
|
|
|
|
code: Code
|
|
message: str
|
|
|
|
|
|
class ResponsesErrorField(BaseModel):
|
|
r"""Error information returned from the API"""
|
|
|
|
code: Code
|
|
|
|
message: str
|