mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-31 12:30:30 +08:00
chore: 🐝 Update SDK - Generate (spec change merged) 0.11.17 (#422)
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
e62415b7ce
commit
4a9b45c2a0
@@ -686,6 +686,12 @@ if TYPE_CHECKING:
|
||||
SendChatCompletionRequestResponse,
|
||||
SendChatCompletionRequestResponseTypedDict,
|
||||
)
|
||||
from .submitgenerationfeedback import (
|
||||
SubmitGenerationFeedbackGlobals,
|
||||
SubmitGenerationFeedbackGlobalsTypedDict,
|
||||
SubmitGenerationFeedbackRequest,
|
||||
SubmitGenerationFeedbackRequestTypedDict,
|
||||
)
|
||||
from .updatebyokkey import (
|
||||
UpdateBYOKKeyGlobals,
|
||||
UpdateBYOKKeyGlobalsTypedDict,
|
||||
@@ -1248,6 +1254,10 @@ __all__ = [
|
||||
"SendChatCompletionRequestResponseTypedDict",
|
||||
"Source",
|
||||
"Subcategory",
|
||||
"SubmitGenerationFeedbackGlobals",
|
||||
"SubmitGenerationFeedbackGlobalsTypedDict",
|
||||
"SubmitGenerationFeedbackRequest",
|
||||
"SubmitGenerationFeedbackRequestTypedDict",
|
||||
"TaskType",
|
||||
"TimeRange",
|
||||
"TimeRangeTypedDict",
|
||||
@@ -1825,6 +1835,10 @@ _dynamic_imports: dict[str, str] = {
|
||||
"SendChatCompletionRequestRequestTypedDict": ".sendchatcompletionrequest",
|
||||
"SendChatCompletionRequestResponse": ".sendchatcompletionrequest",
|
||||
"SendChatCompletionRequestResponseTypedDict": ".sendchatcompletionrequest",
|
||||
"SubmitGenerationFeedbackGlobals": ".submitgenerationfeedback",
|
||||
"SubmitGenerationFeedbackGlobalsTypedDict": ".submitgenerationfeedback",
|
||||
"SubmitGenerationFeedbackRequest": ".submitgenerationfeedback",
|
||||
"SubmitGenerationFeedbackRequestTypedDict": ".submitgenerationfeedback",
|
||||
"UpdateBYOKKeyGlobals": ".updatebyokkey",
|
||||
"UpdateBYOKKeyGlobalsTypedDict": ".updatebyokkey",
|
||||
"UpdateBYOKKeyRequest": ".updatebyokkey",
|
||||
|
||||
@@ -149,7 +149,7 @@ Provider = Union[
|
||||
"recraft",
|
||||
"reka",
|
||||
"relace",
|
||||
"sakana-ai",
|
||||
"sakana",
|
||||
"sambanova",
|
||||
"seed",
|
||||
"siliconflow",
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from openrouter.components import (
|
||||
submitgenerationfeedbackrequest as components_submitgenerationfeedbackrequest,
|
||||
)
|
||||
from openrouter.types import BaseModel, UNSET_SENTINEL
|
||||
from openrouter.utils import FieldMetadata, HeaderMetadata, RequestMetadata
|
||||
import pydantic
|
||||
from pydantic import model_serializer
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
class SubmitGenerationFeedbackGlobalsTypedDict(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 SubmitGenerationFeedbackGlobals(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.
|
||||
|
||||
"""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = set(
|
||||
["HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories"]
|
||||
)
|
||||
serialized = handler(self)
|
||||
m = {}
|
||||
|
||||
for n, f in type(self).model_fields.items():
|
||||
k = f.alias or n
|
||||
val = serialized.get(k, serialized.get(n))
|
||||
|
||||
if val != UNSET_SENTINEL:
|
||||
if val is not None or k not in optional_fields:
|
||||
m[k] = val
|
||||
|
||||
return m
|
||||
|
||||
|
||||
class SubmitGenerationFeedbackRequestTypedDict(TypedDict):
|
||||
submit_generation_feedback_request: components_submitgenerationfeedbackrequest.SubmitGenerationFeedbackRequestTypedDict
|
||||
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 SubmitGenerationFeedbackRequest(BaseModel):
|
||||
submit_generation_feedback_request: Annotated[
|
||||
components_submitgenerationfeedbackrequest.SubmitGenerationFeedbackRequest,
|
||||
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
||||
]
|
||||
|
||||
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.
|
||||
|
||||
"""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = set(
|
||||
["HTTP-Referer", "X-OpenRouter-Title", "X-OpenRouter-Categories"]
|
||||
)
|
||||
serialized = handler(self)
|
||||
m = {}
|
||||
|
||||
for n, f in type(self).model_fields.items():
|
||||
k = f.alias or n
|
||||
val = serialized.get(k, serialized.get(n))
|
||||
|
||||
if val != UNSET_SENTINEL:
|
||||
if val is not None or k not in optional_fields:
|
||||
m[k] = val
|
||||
|
||||
return m
|
||||
Reference in New Issue
Block a user