mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
chore: 🐝 Update SDK - Generate (spec change merged) 0.11.3 (#390)
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
d62640c385
commit
22803a327e
@@ -3,10 +3,10 @@
|
||||
import importlib.metadata
|
||||
|
||||
__title__: str = "openrouter"
|
||||
__version__: str = "0.11.2"
|
||||
__version__: str = "0.11.3"
|
||||
__openapi_doc_version__: str = "1.0.0"
|
||||
__gen_version__: str = "2.914.0"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.11.2 2.914.0 1.0.0 openrouter"
|
||||
__user_agent__: str = "speakeasy-sdk/python 0.11.3 2.914.0 1.0.0 openrouter"
|
||||
|
||||
try:
|
||||
if __package__ is not None:
|
||||
|
||||
@@ -1893,6 +1893,11 @@ if TYPE_CHECKING:
|
||||
OutputFileSearchServerToolItemType,
|
||||
OutputFileSearchServerToolItemTypedDict,
|
||||
)
|
||||
from .outputfilesservertoolitem import (
|
||||
OutputFilesServerToolItem,
|
||||
OutputFilesServerToolItemType,
|
||||
OutputFilesServerToolItemTypedDict,
|
||||
)
|
||||
from .outputfunctioncallitem import (
|
||||
OutputFunctionCallItem,
|
||||
OutputFunctionCallItemStatusCompleted,
|
||||
@@ -4021,6 +4026,9 @@ __all__ = [
|
||||
"OutputFileSearchServerToolItem",
|
||||
"OutputFileSearchServerToolItemType",
|
||||
"OutputFileSearchServerToolItemTypedDict",
|
||||
"OutputFilesServerToolItem",
|
||||
"OutputFilesServerToolItemType",
|
||||
"OutputFilesServerToolItemTypedDict",
|
||||
"OutputFunctionCallItem",
|
||||
"OutputFunctionCallItemStatusCompleted",
|
||||
"OutputFunctionCallItemStatusInProgress",
|
||||
@@ -6112,6 +6120,9 @@ _dynamic_imports: dict[str, str] = {
|
||||
"OutputFileSearchServerToolItem": ".outputfilesearchservertoolitem",
|
||||
"OutputFileSearchServerToolItemType": ".outputfilesearchservertoolitem",
|
||||
"OutputFileSearchServerToolItemTypedDict": ".outputfilesearchservertoolitem",
|
||||
"OutputFilesServerToolItem": ".outputfilesservertoolitem",
|
||||
"OutputFilesServerToolItemType": ".outputfilesservertoolitem",
|
||||
"OutputFilesServerToolItemTypedDict": ".outputfilesservertoolitem",
|
||||
"OutputFunctionCallItem": ".outputfunctioncallitem",
|
||||
"OutputFunctionCallItemStatusCompleted": ".outputfunctioncallitem",
|
||||
"OutputFunctionCallItemStatusInProgress": ".outputfunctioncallitem",
|
||||
|
||||
@@ -80,6 +80,10 @@ from .outputfilesearchservertoolitem import (
|
||||
OutputFileSearchServerToolItem,
|
||||
OutputFileSearchServerToolItemTypedDict,
|
||||
)
|
||||
from .outputfilesservertoolitem import (
|
||||
OutputFilesServerToolItem,
|
||||
OutputFilesServerToolItemTypedDict,
|
||||
)
|
||||
from .outputfunctioncallitem import (
|
||||
OutputFunctionCallItem,
|
||||
OutputFunctionCallItemTypedDict,
|
||||
@@ -374,45 +378,46 @@ InputsUnion1TypedDict = TypeAliasType(
|
||||
OutputFileSearchCallItemTypedDict,
|
||||
EasyInputMessageTypedDict,
|
||||
InputMessageItemTypedDict,
|
||||
CustomToolCallOutputItemTypedDict,
|
||||
LocalShellCallOutputItemTypedDict,
|
||||
OutputToolSearchServerToolItemTypedDict,
|
||||
OutputFileSearchServerToolItemTypedDict,
|
||||
OutputWebSearchServerToolItemTypedDict,
|
||||
CustomToolCallOutputItemTypedDict,
|
||||
OutputImageGenerationCallItemTypedDict,
|
||||
OutputWebSearchCallItemTypedDict,
|
||||
LocalShellCallItemTypedDict,
|
||||
OutputSearchModelsServerToolItemTypedDict,
|
||||
FunctionCallOutputItemTypedDict,
|
||||
ApplyPatchCallItemTypedDict,
|
||||
OutputDatetimeItemTypedDict,
|
||||
McpApprovalResponseItemTypedDict,
|
||||
McpApprovalRequestItemTypedDict,
|
||||
OutputMcpServerToolItemTypedDict,
|
||||
FunctionCallOutputItemTypedDict,
|
||||
OutputSearchModelsServerToolItemTypedDict,
|
||||
LocalShellCallItemTypedDict,
|
||||
ApplyPatchCallItemTypedDict,
|
||||
McpListToolsItemTypedDict,
|
||||
ApplyPatchCallOutputItemTypedDict,
|
||||
McpApprovalResponseItemTypedDict,
|
||||
OutputBrowserUseServerToolItemTypedDict,
|
||||
OutputMcpServerToolItemTypedDict,
|
||||
McpApprovalRequestItemTypedDict,
|
||||
OutputTextEditorServerToolItemTypedDict,
|
||||
OutputApplyPatchServerToolItemTypedDict,
|
||||
ShellCallItemTypedDict,
|
||||
CustomToolCallItemTypedDict,
|
||||
InputsMessageTypedDict,
|
||||
OutputMemoryServerToolItemTypedDict,
|
||||
OutputCodeInterpreterCallItemTypedDict,
|
||||
OutputCustomToolCallItemTypedDict,
|
||||
OutputComputerCallItemTypedDict,
|
||||
CustomToolCallItemTypedDict,
|
||||
ShellCallOutputItemTypedDict,
|
||||
McpCallItemTypedDict,
|
||||
OutputImageGenerationServerToolItemTypedDict,
|
||||
OutputFunctionCallItemTypedDict,
|
||||
ShellCallItemTypedDict,
|
||||
OutputCodeInterpreterCallItemTypedDict,
|
||||
OutputBashServerToolItemTypedDict,
|
||||
OutputImageGenerationServerToolItemTypedDict,
|
||||
McpCallItemTypedDict,
|
||||
OutputFunctionCallItemTypedDict,
|
||||
FunctionCallItemTypedDict,
|
||||
ReasoningItemTypedDict,
|
||||
OutputFilesServerToolItemTypedDict,
|
||||
OutputSubagentServerToolItemTypedDict,
|
||||
InputsReasoningTypedDict,
|
||||
OutputCodeInterpreterServerToolItemTypedDict,
|
||||
OutputWebFetchServerToolItemTypedDict,
|
||||
OutputAdvisorServerToolItemTypedDict,
|
||||
OutputWebFetchServerToolItemTypedDict,
|
||||
ReasoningItemTypedDict,
|
||||
OutputCodeInterpreterServerToolItemTypedDict,
|
||||
InputsReasoningTypedDict,
|
||||
OutputFusionServerToolItemTypedDict,
|
||||
],
|
||||
)
|
||||
@@ -426,45 +431,46 @@ InputsUnion1 = TypeAliasType(
|
||||
OutputFileSearchCallItem,
|
||||
EasyInputMessage,
|
||||
InputMessageItem,
|
||||
CustomToolCallOutputItem,
|
||||
LocalShellCallOutputItem,
|
||||
OutputToolSearchServerToolItem,
|
||||
OutputFileSearchServerToolItem,
|
||||
OutputWebSearchServerToolItem,
|
||||
CustomToolCallOutputItem,
|
||||
OutputImageGenerationCallItem,
|
||||
OutputWebSearchCallItem,
|
||||
LocalShellCallItem,
|
||||
OutputSearchModelsServerToolItem,
|
||||
FunctionCallOutputItem,
|
||||
ApplyPatchCallItem,
|
||||
OutputDatetimeItem,
|
||||
McpApprovalResponseItem,
|
||||
McpApprovalRequestItem,
|
||||
OutputMcpServerToolItem,
|
||||
FunctionCallOutputItem,
|
||||
OutputSearchModelsServerToolItem,
|
||||
LocalShellCallItem,
|
||||
ApplyPatchCallItem,
|
||||
McpListToolsItem,
|
||||
ApplyPatchCallOutputItem,
|
||||
McpApprovalResponseItem,
|
||||
OutputBrowserUseServerToolItem,
|
||||
OutputMcpServerToolItem,
|
||||
McpApprovalRequestItem,
|
||||
OutputTextEditorServerToolItem,
|
||||
OutputApplyPatchServerToolItem,
|
||||
ShellCallItem,
|
||||
CustomToolCallItem,
|
||||
InputsMessage,
|
||||
OutputMemoryServerToolItem,
|
||||
OutputCodeInterpreterCallItem,
|
||||
OutputCustomToolCallItem,
|
||||
OutputComputerCallItem,
|
||||
CustomToolCallItem,
|
||||
ShellCallOutputItem,
|
||||
McpCallItem,
|
||||
OutputImageGenerationServerToolItem,
|
||||
OutputFunctionCallItem,
|
||||
ShellCallItem,
|
||||
OutputCodeInterpreterCallItem,
|
||||
OutputBashServerToolItem,
|
||||
OutputImageGenerationServerToolItem,
|
||||
McpCallItem,
|
||||
OutputFunctionCallItem,
|
||||
FunctionCallItem,
|
||||
ReasoningItem,
|
||||
OutputFilesServerToolItem,
|
||||
OutputSubagentServerToolItem,
|
||||
InputsReasoning,
|
||||
OutputCodeInterpreterServerToolItem,
|
||||
OutputWebFetchServerToolItem,
|
||||
OutputAdvisorServerToolItem,
|
||||
OutputWebFetchServerToolItem,
|
||||
ReasoningItem,
|
||||
OutputCodeInterpreterServerToolItem,
|
||||
InputsReasoning,
|
||||
OutputFusionServerToolItem,
|
||||
],
|
||||
)
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
||||
|
||||
from __future__ import annotations
|
||||
from .toolcallstatus import ToolCallStatus
|
||||
from openrouter.types import BaseModel, UNSET_SENTINEL
|
||||
from pydantic import model_serializer
|
||||
from typing import Literal, Optional
|
||||
from typing_extensions import NotRequired, TypedDict
|
||||
|
||||
|
||||
OutputFilesServerToolItemType = Literal["openrouter:files",]
|
||||
|
||||
|
||||
class OutputFilesServerToolItemTypedDict(TypedDict):
|
||||
r"""An openrouter:files server tool output item"""
|
||||
|
||||
status: ToolCallStatus
|
||||
type: OutputFilesServerToolItemType
|
||||
error: NotRequired[str]
|
||||
r"""Error message when the file operation failed."""
|
||||
file_id: NotRequired[str]
|
||||
r"""The target file id supplied in the tool-call arguments."""
|
||||
filename: NotRequired[str]
|
||||
r"""The target filename supplied in the tool-call arguments."""
|
||||
id: NotRequired[str]
|
||||
operation: NotRequired[str]
|
||||
r"""The file operation performed (list, read, write, or edit)."""
|
||||
result: NotRequired[str]
|
||||
r"""JSON-serialized result of the file operation."""
|
||||
|
||||
|
||||
class OutputFilesServerToolItem(BaseModel):
|
||||
r"""An openrouter:files server tool output item"""
|
||||
|
||||
status: ToolCallStatus
|
||||
|
||||
type: OutputFilesServerToolItemType
|
||||
|
||||
error: Optional[str] = None
|
||||
r"""Error message when the file operation failed."""
|
||||
|
||||
file_id: Optional[str] = None
|
||||
r"""The target file id supplied in the tool-call arguments."""
|
||||
|
||||
filename: Optional[str] = None
|
||||
r"""The target filename supplied in the tool-call arguments."""
|
||||
|
||||
id: Optional[str] = None
|
||||
|
||||
operation: Optional[str] = None
|
||||
r"""The file operation performed (list, read, write, or edit)."""
|
||||
|
||||
result: Optional[str] = None
|
||||
r"""JSON-serialized result of the file operation."""
|
||||
|
||||
@model_serializer(mode="wrap")
|
||||
def serialize_model(self, handler):
|
||||
optional_fields = set(
|
||||
["error", "file_id", "filename", "id", "operation", "result"]
|
||||
)
|
||||
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
|
||||
@@ -46,6 +46,10 @@ from .outputfilesearchservertoolitem import (
|
||||
OutputFileSearchServerToolItem,
|
||||
OutputFileSearchServerToolItemTypedDict,
|
||||
)
|
||||
from .outputfilesservertoolitem import (
|
||||
OutputFilesServerToolItem,
|
||||
OutputFilesServerToolItemTypedDict,
|
||||
)
|
||||
from .outputfunctioncallitem import (
|
||||
OutputFunctionCallItem,
|
||||
OutputFunctionCallItemTypedDict,
|
||||
@@ -145,6 +149,7 @@ OutputItemsTypedDict = TypeAliasType(
|
||||
OutputReasoningItemTypedDict,
|
||||
OutputAdvisorServerToolItemTypedDict,
|
||||
OutputSubagentServerToolItemTypedDict,
|
||||
OutputFilesServerToolItemTypedDict,
|
||||
OutputFusionServerToolItemTypedDict,
|
||||
],
|
||||
)
|
||||
@@ -178,6 +183,7 @@ _OUTPUT_ITEMS_VARIANTS: dict[str, Any] = {
|
||||
"openrouter:datetime": OutputDatetimeItem,
|
||||
"openrouter:experimental__search_models": OutputSearchModelsServerToolItem,
|
||||
"openrouter:file_search": OutputFileSearchServerToolItem,
|
||||
"openrouter:files": OutputFilesServerToolItem,
|
||||
"openrouter:fusion": OutputFusionServerToolItem,
|
||||
"openrouter:image_generation": OutputImageGenerationServerToolItem,
|
||||
"openrouter:mcp": OutputMcpServerToolItem,
|
||||
@@ -212,6 +218,7 @@ OutputItems = Annotated[
|
||||
OutputDatetimeItem,
|
||||
OutputSearchModelsServerToolItem,
|
||||
OutputFileSearchServerToolItem,
|
||||
OutputFilesServerToolItem,
|
||||
OutputFusionServerToolItem,
|
||||
OutputImageGenerationServerToolItem,
|
||||
OutputMcpServerToolItem,
|
||||
|
||||
Reference in New Issue
Block a user