mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
chore: 🐝 Update SDK - Generate (spec change merged) 0.11.4 (#396)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
speakeasybot
speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
parent
34403bd422
commit
1e88de8988
@@ -2074,6 +2074,7 @@ if TYPE_CHECKING:
|
||||
ParetoRouterPlugin,
|
||||
ParetoRouterPluginID,
|
||||
ParetoRouterPluginTypedDict,
|
||||
PriceSource,
|
||||
)
|
||||
from .payloadtoolargeresponseerrordata import (
|
||||
PayloadTooLargeResponseErrorData,
|
||||
@@ -4192,6 +4193,7 @@ __all__ = [
|
||||
"PreviewWebSearchUserLocation",
|
||||
"PreviewWebSearchUserLocationType",
|
||||
"PreviewWebSearchUserLocationTypedDict",
|
||||
"PriceSource",
|
||||
"Pricing",
|
||||
"PricingTypedDict",
|
||||
"PromptInjectionScanScope",
|
||||
@@ -6262,6 +6264,7 @@ _dynamic_imports: dict[str, str] = {
|
||||
"ParetoRouterPlugin": ".paretorouterplugin",
|
||||
"ParetoRouterPluginID": ".paretorouterplugin",
|
||||
"ParetoRouterPluginTypedDict": ".paretorouterplugin",
|
||||
"PriceSource": ".paretorouterplugin",
|
||||
"PayloadTooLargeResponseErrorData": ".payloadtoolargeresponseerrordata",
|
||||
"PayloadTooLargeResponseErrorDataTypedDict": ".payloadtoolargeresponseerrordata",
|
||||
"PaymentRequiredResponseErrorData": ".paymentrequiredresponseerrordata",
|
||||
|
||||
@@ -78,8 +78,8 @@ ChatRequestPluginTypedDict = TypeAliasType(
|
||||
ResponseHealingPluginTypedDict,
|
||||
FileParserPluginTypedDict,
|
||||
ContextCompressionPluginTypedDict,
|
||||
ParetoRouterPluginTypedDict,
|
||||
AutoRouterPluginTypedDict,
|
||||
ParetoRouterPluginTypedDict,
|
||||
WebFetchPluginTypedDict,
|
||||
FusionPluginTypedDict,
|
||||
WebSearchPluginTypedDict,
|
||||
|
||||
@@ -698,7 +698,7 @@ class ImageGenerationRequestTypedDict(TypedDict):
|
||||
seed: NotRequired[int]
|
||||
r"""If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."""
|
||||
size: NotRequired[str]
|
||||
r"""Optional. A convenience shorthand for output dimensions — pass a tier (\"2K\", \"4K\") or explicit pixels (\"2048x2048\") and we normalize it to the right dimensions for the chosen provider. Interchangeable with resolution + aspect_ratio; use those directly for enumerated, per-model discoverable values. Conflicting size + resolution/aspect_ratio is rejected."""
|
||||
r"""Optional. A convenience shorthand for output dimensions — pass a tier (\"2K\", \"4K\") or explicit pixels (\"2048x2048\") and we normalize it to the right dimensions for the chosen provider. A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. An explicit pixel size is authoritative: a mismatched `resolution` or `aspect_ratio` alongside it is rejected with a 400."""
|
||||
stream: NotRequired[bool]
|
||||
r"""If true, partial images are streamed as SSE events as they become available. Only supported by providers with native streaming (currently OpenAI). Non-streaming providers ignore this flag and return a buffered response."""
|
||||
|
||||
@@ -743,7 +743,7 @@ class ImageGenerationRequest(BaseModel):
|
||||
r"""If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers."""
|
||||
|
||||
size: Optional[str] = None
|
||||
r"""Optional. A convenience shorthand for output dimensions — pass a tier (\"2K\", \"4K\") or explicit pixels (\"2048x2048\") and we normalize it to the right dimensions for the chosen provider. Interchangeable with resolution + aspect_ratio; use those directly for enumerated, per-model discoverable values. Conflicting size + resolution/aspect_ratio is rejected."""
|
||||
r"""Optional. A convenience shorthand for output dimensions — pass a tier (\"2K\", \"4K\") or explicit pixels (\"2048x2048\") and we normalize it to the right dimensions for the chosen provider. A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. An explicit pixel size is authoritative: a mismatched `resolution` or `aspect_ratio` alongside it is rejected with a 400."""
|
||||
|
||||
stream: Optional[bool] = None
|
||||
r"""If true, partial images are streamed as SSE events as they become available. Only supported by providers with native streaming (currently OpenAI). Non-streaming providers ignore this flag and return a buffered response."""
|
||||
|
||||
@@ -355,8 +355,8 @@ MessagesRequestPluginTypedDict = TypeAliasType(
|
||||
ResponseHealingPluginTypedDict,
|
||||
FileParserPluginTypedDict,
|
||||
ContextCompressionPluginTypedDict,
|
||||
ParetoRouterPluginTypedDict,
|
||||
AutoRouterPluginTypedDict,
|
||||
ParetoRouterPluginTypedDict,
|
||||
WebFetchPluginTypedDict,
|
||||
FusionPluginTypedDict,
|
||||
WebSearchPluginTypedDict,
|
||||
|
||||
@@ -1,21 +1,33 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.types import BaseModel, UNSET_SENTINEL
|
||||
from openrouter.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr
|
||||
from pydantic import model_serializer
|
||||
from typing import Literal, Optional
|
||||
from typing import Literal, Optional, Union
|
||||
from typing_extensions import NotRequired, TypedDict
|
||||
|
||||
|
||||
ParetoRouterPluginID = Literal["pareto-router",]
|
||||
|
||||
|
||||
PriceSource = Union[
|
||||
Literal[
|
||||
"prompt",
|
||||
"weighted_avg",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""Price source for the Pareto frontier cost axis. \"prompt\" uses catalog list price (endpoint.pricing.prompt). \"weighted_avg\" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to \"prompt\"."""
|
||||
|
||||
|
||||
class ParetoRouterPluginTypedDict(TypedDict):
|
||||
id: ParetoRouterPluginID
|
||||
enabled: NotRequired[bool]
|
||||
r"""Set to false to disable the pareto-router plugin for this request. Defaults to true."""
|
||||
min_coding_score: NotRequired[float]
|
||||
r"""Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier."""
|
||||
r"""Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66)."""
|
||||
price_source: NotRequired[PriceSource]
|
||||
r"""Price source for the Pareto frontier cost axis. \"prompt\" uses catalog list price (endpoint.pricing.prompt). \"weighted_avg\" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to \"prompt\"."""
|
||||
|
||||
|
||||
class ParetoRouterPlugin(BaseModel):
|
||||
@@ -25,11 +37,14 @@ class ParetoRouterPlugin(BaseModel):
|
||||
r"""Set to false to disable the pareto-router plugin for this request. Defaults to true."""
|
||||
|
||||
min_coding_score: Optional[float] = None
|
||||
r"""Minimum desired coding score between 0 and 1, where 1 is best. Higher values select from stronger coding models (sourced from Artificial Analysis coding percentiles). Maps internally to one of three tiers (low, medium, high). Omit to use the router default tier."""
|
||||
r"""Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66)."""
|
||||
|
||||
price_source: Optional[PriceSource] = None
|
||||
r"""Price source for the Pareto frontier cost axis. \"prompt\" uses catalog list price (endpoint.pricing.prompt). \"weighted_avg\" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to \"prompt\"."""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = set(["enabled", "min_coding_score"])
|
||||
optional_fields = set(["enabled", "min_coding_score", "price_source"])
|
||||
serialized = handler(self)
|
||||
m = {}
|
||||
|
||||
|
||||
@@ -123,8 +123,8 @@ ResponsesRequestPluginTypedDict = TypeAliasType(
|
||||
ResponseHealingPluginTypedDict,
|
||||
FileParserPluginTypedDict,
|
||||
ContextCompressionPluginTypedDict,
|
||||
ParetoRouterPluginTypedDict,
|
||||
AutoRouterPluginTypedDict,
|
||||
ParetoRouterPluginTypedDict,
|
||||
WebFetchPluginTypedDict,
|
||||
FusionPluginTypedDict,
|
||||
WebSearchPluginTypedDict,
|
||||
|
||||
Reference in New Issue
Block a user