mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
* `open_router.benchmarks.get_benchmarks()`: **Added** * `open_router.datasets.get_benchmarks_artificial_analysis()`: **Deleted** **Breaking** ⚠️ * `open_router.datasets.get_benchmarks_design_arena()`: **Deleted** **Breaking** ⚠️ * `open_router.chat.send()`: `response` **Changed** * `open_router.embeddings.generate()`: `response.usage` **Changed** * `open_router.embeddings.list_models()`: `response.data.[].reasoning` **Added** * `open_router.models.get()`: `response.data.reasoning` **Added** * `open_router.models.list()`: `response.data.[].reasoning` **Added** * `open_router.models.list_for_user()`: `response.data.[].reasoning` **Added**
45 lines
1.5 KiB
Python
45 lines
1.5 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 validate_open_enum
|
|
from pydantic.functional_validators import PlainValidator
|
|
from typing import Literal, Optional, Union
|
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
|
|
|
AdvisorReasoningEffort = Union[
|
|
Literal[
|
|
"max",
|
|
"xhigh",
|
|
"high",
|
|
"medium",
|
|
"low",
|
|
"minimal",
|
|
"none",
|
|
],
|
|
UnrecognizedStr,
|
|
]
|
|
r"""Reasoning effort level for the advisor call."""
|
|
|
|
|
|
class AdvisorReasoningTypedDict(TypedDict):
|
|
r"""Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking."""
|
|
|
|
effort: NotRequired[AdvisorReasoningEffort]
|
|
r"""Reasoning effort level for the advisor call."""
|
|
max_tokens: NotRequired[int]
|
|
r"""Maximum number of reasoning tokens the advisor may use."""
|
|
|
|
|
|
class AdvisorReasoning(BaseModel):
|
|
r"""Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking."""
|
|
|
|
effort: Annotated[
|
|
Optional[AdvisorReasoningEffort], PlainValidator(validate_open_enum(False))
|
|
] = None
|
|
r"""Reasoning effort level for the advisor call."""
|
|
|
|
max_tokens: Optional[int] = None
|
|
r"""Maximum number of reasoning tokens the advisor may use."""
|