mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
* `open_router.beta.responses.send()`: * `request` **Changed** **Breaking** ⚠️ * `response` **Changed** **Breaking** ⚠️ * `open_router.presets.create_presets_responses()`: `request` **Changed** **Breaking** ⚠️ * `open_router.presets.create_presets_chat_completions()`: `request` **Changed** **Breaking** ⚠️ * `open_router.chat.send()`: `request` **Changed** **Breaking** ⚠️ * `open_router.workspaces.set_budget()`: **Added** * `open_router.o_auth.create_auth_code()`: * `request.workspace_id` **Added** * `error.status[403]` **Added** * `open_router.files.download()`: **Added** * `open_router.models.get()`: **Added** * `open_router.workspaces.list_budgets()`: **Added** * `open_router.workspaces.delete_budget()`: **Added** * `open_router.datasets.get_benchmarks_artificial_analysis()`: **Added** * `open_router.beta.analytics.query_analytics()`: `response.data.warnings` **Added** * `open_router.files.delete()`: **Added** * `open_router.files.retrieve()`: **Added** * `open_router.files.upload()`: **Added** * `open_router.embeddings.list_models()`: `response.data.[].benchmarks` **Added** * `open_router.models.list()`: * `request` **Changed** * `response.data.[].benchmarks` **Added** * `open_router.models.list_for_user()`: `response.data.[].benchmarks` **Added** * `open_router.files.list()`: **Added** * `open_router.presets.create_presets_messages()`: `request` **Changed** * `open_router.datasets.get_benchmarks_design_arena()`: **Added**
139 lines
4.8 KiB
Python
139 lines
4.8 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||
|
||
from __future__ import annotations
|
||
from openrouter.components import filelistresponse as components_filelistresponse
|
||
from openrouter.types import BaseModel
|
||
from openrouter.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
|
||
import pydantic
|
||
from typing import Awaitable, Callable, Optional, Union
|
||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||
|
||
|
||
class ListFilesGlobalsTypedDict(TypedDict):
|
||
http_referer: NotRequired[str]
|
||
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||
This is used to track API usage per application.
|
||
|
||
"""
|
||
x_open_router_title: NotRequired[str]
|
||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||
|
||
"""
|
||
x_open_router_categories: NotRequired[str]
|
||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||
|
||
"""
|
||
|
||
|
||
class ListFilesGlobals(BaseModel):
|
||
http_referer: Annotated[
|
||
Optional[str],
|
||
pydantic.Field(alias="HTTP-Referer"),
|
||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||
] = None
|
||
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||
This is used to track API usage per application.
|
||
|
||
"""
|
||
|
||
x_open_router_title: Annotated[
|
||
Optional[str],
|
||
pydantic.Field(alias="X-OpenRouter-Title"),
|
||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||
] = None
|
||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||
|
||
"""
|
||
|
||
x_open_router_categories: Annotated[
|
||
Optional[str],
|
||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||
] = None
|
||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||
|
||
"""
|
||
|
||
|
||
class ListFilesRequestTypedDict(TypedDict):
|
||
http_referer: NotRequired[str]
|
||
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||
This is used to track API usage per application.
|
||
|
||
"""
|
||
x_open_router_title: NotRequired[str]
|
||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||
|
||
"""
|
||
x_open_router_categories: NotRequired[str]
|
||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||
|
||
"""
|
||
limit: NotRequired[int]
|
||
r"""Maximum number of files to return (1–1000)."""
|
||
cursor: NotRequired[str]
|
||
r"""Opaque pagination cursor from a previous response."""
|
||
workspace_id: NotRequired[str]
|
||
r"""Workspace to scope the request to. Defaults to the caller’s default workspace."""
|
||
|
||
|
||
class ListFilesRequest(BaseModel):
|
||
http_referer: Annotated[
|
||
Optional[str],
|
||
pydantic.Field(alias="HTTP-Referer"),
|
||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||
] = None
|
||
r"""The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
||
This is used to track API usage per application.
|
||
|
||
"""
|
||
|
||
x_open_router_title: Annotated[
|
||
Optional[str],
|
||
pydantic.Field(alias="X-OpenRouter-Title"),
|
||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||
] = None
|
||
r"""The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
||
|
||
"""
|
||
|
||
x_open_router_categories: Annotated[
|
||
Optional[str],
|
||
pydantic.Field(alias="X-OpenRouter-Categories"),
|
||
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
||
] = None
|
||
r"""Comma-separated list of app categories (e.g. \"cli-agent,cloud-agent\"). Used for marketplace rankings.
|
||
|
||
"""
|
||
|
||
limit: Annotated[
|
||
Optional[int],
|
||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||
] = None
|
||
r"""Maximum number of files to return (1–1000)."""
|
||
|
||
cursor: Annotated[
|
||
Optional[str],
|
||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||
] = None
|
||
r"""Opaque pagination cursor from a previous response."""
|
||
|
||
workspace_id: Annotated[
|
||
Optional[str],
|
||
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
||
] = None
|
||
r"""Workspace to scope the request to. Defaults to the caller’s default workspace."""
|
||
|
||
|
||
class ListFilesResponseTypedDict(TypedDict):
|
||
result: components_filelistresponse.FileListResponseTypedDict
|
||
|
||
|
||
class ListFilesResponse(BaseModel):
|
||
next: Union[
|
||
Callable[[], Optional[ListFilesResponse]],
|
||
Callable[[], Awaitable[Optional[ListFilesResponse]]],
|
||
]
|
||
|
||
result: components_filelistresponse.FileListResponse
|