Files
openrouter-python-sdk-retry…/src/openrouter/operations/getbenchmarks.py
T
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
5e0b1a2b69 chore: 🐝 Update SDK - Generate 0.10.1 (#366)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-25 22:01:36 +00:00

179 lines
6.6 KiB
Python

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from openrouter.types import BaseModel, UnrecognizedStr
from openrouter.utils import (
FieldMetadata,
HeaderMetadata,
QueryParamMetadata,
validate_open_enum,
)
import pydantic
from pydantic.functional_validators import PlainValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict
class GetBenchmarksGlobalsTypedDict(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 GetBenchmarksGlobals(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.
"""
Source = Union[
Literal[
"artificial-analysis",
"design-arena",
],
UnrecognizedStr,
]
r"""Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources."""
TaskType = Union[
Literal[
"coding",
"intelligence",
"agentic",
],
UnrecognizedStr,
]
r"""Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category."""
Arena = Union[
Literal[
"models",
"builders",
"agents",
],
UnrecognizedStr,
]
r"""Design Arena only: arena to query. Defaults to `models` when source is `design-arena`."""
class GetBenchmarksRequestTypedDict(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.
"""
source: NotRequired[Source]
r"""Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources."""
task_type: NotRequired[TaskType]
r"""Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category."""
arena: NotRequired[Arena]
r"""Design Arena only: arena to query. Defaults to `models` when source is `design-arena`."""
category: NotRequired[str]
r"""Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories."""
max_results: NotRequired[int]
r"""Maximum number of items to return. When omitted, all matching results are returned."""
class GetBenchmarksRequest(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.
"""
source: Annotated[
Annotated[Optional[Source], PlainValidator(validate_open_enum(False))],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources."""
task_type: Annotated[
Annotated[Optional[TaskType], PlainValidator(validate_open_enum(False))],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category."""
arena: Annotated[
Annotated[Optional[Arena], PlainValidator(validate_open_enum(False))],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Design Arena only: arena to query. Defaults to `models` when source is `design-arena`."""
category: Annotated[
Optional[str],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories."""
max_results: Annotated[
Optional[int],
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
] = None
r"""Maximum number of items to return. When omitted, all matching results are returned."""