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.13 (#414)
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
c9d39da708
commit
9b7ee68d76
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "openrouter"
|
||||
__version__: str = "0.11.12"
|
||||
__version__: str = "0.11.13"
|
||||
__openapi_doc_version__: str = "1.0.0"
|
||||
__gen_version__: str = "2.914.0"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.11.12 2.914.0 1.0.0 openrouter"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.11.13 2.914.0 1.0.0 openrouter"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -2209,6 +2209,11 @@ if TYPE_CHECKING:
|
||||
ReasoningDetailEncryptedType,
|
||||
ReasoningDetailEncryptedTypedDict,
|
||||
)
|
||||
from .reasoningdetailservertoolcall import (
|
||||
ReasoningDetailServerToolCall,
|
||||
ReasoningDetailServerToolCallType,
|
||||
ReasoningDetailServerToolCallTypedDict,
|
||||
)
|
||||
from .reasoningdetailsummary import (
|
||||
ReasoningDetailSummary,
|
||||
ReasoningDetailSummaryType,
|
||||
@@ -4253,6 +4258,9 @@ __all__ = [
|
||||
"ReasoningDetailEncrypted",
|
||||
"ReasoningDetailEncryptedType",
|
||||
"ReasoningDetailEncryptedTypedDict",
|
||||
"ReasoningDetailServerToolCall",
|
||||
"ReasoningDetailServerToolCallType",
|
||||
"ReasoningDetailServerToolCallTypedDict",
|
||||
"ReasoningDetailSummary",
|
||||
"ReasoningDetailSummaryType",
|
||||
"ReasoningDetailSummaryTypedDict",
|
||||
@@ -6386,6 +6394,9 @@ _dynamic_imports: dict[str, str] = {
|
||||
"ReasoningDetailEncrypted": ".reasoningdetailencrypted",
|
||||
"ReasoningDetailEncryptedType": ".reasoningdetailencrypted",
|
||||
"ReasoningDetailEncryptedTypedDict": ".reasoningdetailencrypted",
|
||||
"ReasoningDetailServerToolCall": ".reasoningdetailservertoolcall",
|
||||
"ReasoningDetailServerToolCallType": ".reasoningdetailservertoolcall",
|
||||
"ReasoningDetailServerToolCallTypedDict": ".reasoningdetailservertoolcall",
|
||||
"ReasoningDetailSummary": ".reasoningdetailsummary",
|
||||
"ReasoningDetailSummaryType": ".reasoningdetailsummary",
|
||||
"ReasoningDetailSummaryTypedDict": ".reasoningdetailsummary",
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .reasoningformat import ReasoningFormat
|
||||
from openrouter.types import (
|
||||
BaseModel,
|
||||
Nullable,
|
||||
OptionalNullable,
|
||||
UNSET,
|
||||
UNSET_SENTINEL,
|
||||
)
|
||||
import pydantic
|
||||
from pydantic import model_serializer
|
||||
from typing import Literal, Optional
|
||||
from typing_extensions import Annotated, NotRequired, TypedDict
|
||||
|
||||
|
||||
ReasoningDetailServerToolCallType = Literal["reasoning.server_tool_call",]
|
||||
|
||||
|
||||
class ReasoningDetailServerToolCallTypedDict(TypedDict):
|
||||
r"""Record of an OpenRouter server-tool invocation (e.g. openrouter:fusion), carried in reasoning_details so a prior tool call can be rehydrated into a later turn of the same conversation."""
|
||||
|
||||
arguments: str
|
||||
result: str
|
||||
tool_name: str
|
||||
type: ReasoningDetailServerToolCallType
|
||||
format_: NotRequired[Nullable[ReasoningFormat]]
|
||||
id: NotRequired[Nullable[str]]
|
||||
index: NotRequired[int]
|
||||
tool_call_id: NotRequired[Nullable[str]]
|
||||
|
||||
|
||||
class ReasoningDetailServerToolCall(BaseModel):
|
||||
r"""Record of an OpenRouter server-tool invocation (e.g. openrouter:fusion), carried in reasoning_details so a prior tool call can be rehydrated into a later turn of the same conversation."""
|
||||
|
||||
arguments: str
|
||||
|
||||
result: str
|
||||
|
||||
tool_name: str
|
||||
|
||||
type: ReasoningDetailServerToolCallType
|
||||
|
||||
format_: Annotated[
|
||||
OptionalNullable[ReasoningFormat], pydantic.Field(alias="format")
|
||||
] = UNSET
|
||||
|
||||
id: OptionalNullable[str] = UNSET
|
||||
|
||||
index: Optional[int] = None
|
||||
|
||||
tool_call_id: OptionalNullable[str] = UNSET
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = set(["format", "id", "index", "tool_call_id"])
|
||||
nullable_fields = set(["format", "id", "tool_call_id"])
|
||||
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))
|
||||
is_nullable_and_explicitly_set = (
|
||||
k in nullable_fields
|
||||
and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member
|
||||
)
|
||||
|
||||
if val != UNSET_SENTINEL:
|
||||
if (
|
||||
val is not None
|
||||
or k not in optional_fields
|
||||
or is_nullable_and_explicitly_set
|
||||
):
|
||||
m[k] = val
|
||||
|
||||
return m
|
||||
|
||||
|
||||
try:
|
||||
ReasoningDetailServerToolCall.model_rebuild()
|
||||
except NameError:
|
||||
pass
|
||||
@@ -5,6 +5,10 @@ from .reasoningdetailencrypted import (
|
||||
ReasoningDetailEncrypted,
|
||||
ReasoningDetailEncryptedTypedDict,
|
||||
)
|
||||
from .reasoningdetailservertoolcall import (
|
||||
ReasoningDetailServerToolCall,
|
||||
ReasoningDetailServerToolCallTypedDict,
|
||||
)
|
||||
from .reasoningdetailsummary import (
|
||||
ReasoningDetailSummary,
|
||||
ReasoningDetailSummaryTypedDict,
|
||||
@@ -25,6 +29,7 @@ ReasoningDetailUnionTypedDict = TypeAliasType(
|
||||
ReasoningDetailSummaryTypedDict,
|
||||
ReasoningDetailEncryptedTypedDict,
|
||||
ReasoningDetailTextTypedDict,
|
||||
ReasoningDetailServerToolCallTypedDict,
|
||||
],
|
||||
)
|
||||
r"""Reasoning detail union schema"""
|
||||
@@ -42,6 +47,7 @@ class UnknownReasoningDetailUnion(BaseModel):
|
||||
|
||||
_REASONING_DETAIL_UNION_VARIANTS: dict[str, Any] = {
|
||||
"reasoning.encrypted": ReasoningDetailEncrypted,
|
||||
"reasoning.server_tool_call": ReasoningDetailServerToolCall,
|
||||
"reasoning.summary": ReasoningDetailSummary,
|
||||
"reasoning.text": ReasoningDetailText,
|
||||
}
|
||||
@@ -50,6 +56,7 @@ _REASONING_DETAIL_UNION_VARIANTS: dict[str, Any] = {
|
||||
ReasoningDetailUnion = Annotated[
|
||||
Union[
|
||||
ReasoningDetailEncrypted,
|
||||
ReasoningDetailServerToolCall,
|
||||
ReasoningDetailSummary,
|
||||
ReasoningDetailText,
|
||||
UnknownReasoningDetailUnion,
|
||||
|
||||
Reference in New Issue
Block a user