mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
fix: add overlay to remove nullable from pagination offset params (#121)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .reasoningformat import ReasoningFormat
|
||||
from .reasoningsummarytext import ReasoningSummaryText, ReasoningSummaryTextTypedDict
|
||||
from .reasoningtextcontent import ReasoningTextContent, ReasoningTextContentTypedDict
|
||||
from openrouter.types import (
|
||||
@@ -9,7 +10,6 @@ from openrouter.types import (
|
||||
OptionalNullable,
|
||||
UNSET,
|
||||
UNSET_SENTINEL,
|
||||
UnrecognizedStr,
|
||||
)
|
||||
from openrouter.utils import validate_open_enum
|
||||
import pydantic
|
||||
@@ -19,9 +19,6 @@ from typing import List, Literal, Optional, Union
|
||||
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
||||
|
||||
|
||||
OutputReasoningItemType = Literal["reasoning",]
|
||||
|
||||
|
||||
OutputReasoningItemStatusInProgress = Literal["in_progress",]
|
||||
|
||||
|
||||
@@ -51,61 +48,47 @@ OutputReasoningItemStatusUnion = TypeAliasType(
|
||||
)
|
||||
|
||||
|
||||
OutputReasoningItemFormat = Union[
|
||||
Literal[
|
||||
"unknown",
|
||||
"openai-responses-v1",
|
||||
"azure-openai-responses-v1",
|
||||
"xai-responses-v1",
|
||||
"anthropic-claude-v1",
|
||||
"google-gemini-v1",
|
||||
],
|
||||
UnrecognizedStr,
|
||||
]
|
||||
r"""The format of the reasoning content"""
|
||||
OutputReasoningItemType = Literal["reasoning",]
|
||||
|
||||
|
||||
class OutputReasoningItemTypedDict(TypedDict):
|
||||
r"""An output item containing reasoning"""
|
||||
|
||||
type: OutputReasoningItemType
|
||||
id: str
|
||||
summary: List[ReasoningSummaryTextTypedDict]
|
||||
type: OutputReasoningItemType
|
||||
content: NotRequired[Nullable[List[ReasoningTextContentTypedDict]]]
|
||||
encrypted_content: NotRequired[Nullable[str]]
|
||||
status: NotRequired[OutputReasoningItemStatusUnionTypedDict]
|
||||
format_: NotRequired[Nullable[ReasoningFormat]]
|
||||
signature: NotRequired[Nullable[str]]
|
||||
r"""A signature for the reasoning content, used for verification"""
|
||||
format_: NotRequired[Nullable[OutputReasoningItemFormat]]
|
||||
r"""The format of the reasoning content"""
|
||||
|
||||
|
||||
class OutputReasoningItem(BaseModel):
|
||||
r"""An output item containing reasoning"""
|
||||
|
||||
type: OutputReasoningItemType
|
||||
|
||||
id: str
|
||||
|
||||
summary: List[ReasoningSummaryText]
|
||||
|
||||
type: OutputReasoningItemType
|
||||
|
||||
content: OptionalNullable[List[ReasoningTextContent]] = UNSET
|
||||
|
||||
encrypted_content: OptionalNullable[str] = UNSET
|
||||
|
||||
status: Optional[OutputReasoningItemStatusUnion] = None
|
||||
|
||||
signature: OptionalNullable[str] = UNSET
|
||||
r"""A signature for the reasoning content, used for verification"""
|
||||
|
||||
format_: Annotated[
|
||||
Annotated[
|
||||
OptionalNullable[OutputReasoningItemFormat],
|
||||
PlainValidator(validate_open_enum(False)),
|
||||
OptionalNullable[ReasoningFormat], PlainValidator(validate_open_enum(False))
|
||||
],
|
||||
pydantic.Field(alias="format"),
|
||||
] = UNSET
|
||||
r"""The format of the reasoning content"""
|
||||
|
||||
signature: OptionalNullable[str] = UNSET
|
||||
r"""A signature for the reasoning content, used for verification"""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
@@ -113,10 +96,10 @@ class OutputReasoningItem(BaseModel):
|
||||
"content",
|
||||
"encrypted_content",
|
||||
"status",
|
||||
"signature",
|
||||
"format",
|
||||
"signature",
|
||||
]
|
||||
nullable_fields = ["content", "encrypted_content", "signature", "format"]
|
||||
nullable_fields = ["content", "encrypted_content", "format", "signature"]
|
||||
null_default_fields = []
|
||||
|
||||
serialized = handler(self)
|
||||
|
||||
Reference in New Issue
Block a user