mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-01 12:40:23 +08:00
* `open_router.beta.responses.send()`: * `request` **Changed** **Breaking** ⚠️ * `response` **Changed** **Breaking** ⚠️ * `open_router.presets.create_presets_responses()`: `request` **Changed** **Breaking** ⚠️ * `open_router.presets.create_presets_chat_completions()`: `request` **Changed** **Breaking** ⚠️ * `open_router.chat.send()`: `request` **Changed** **Breaking** ⚠️ * `open_router.workspaces.set_budget()`: **Added** * `open_router.o_auth.create_auth_code()`: * `request.workspace_id` **Added** * `error.status[403]` **Added** * `open_router.files.download()`: **Added** * `open_router.models.get()`: **Added** * `open_router.workspaces.list_budgets()`: **Added** * `open_router.workspaces.delete_budget()`: **Added** * `open_router.datasets.get_benchmarks_artificial_analysis()`: **Added** * `open_router.beta.analytics.query_analytics()`: `response.data.warnings` **Added** * `open_router.files.delete()`: **Added** * `open_router.files.retrieve()`: **Added** * `open_router.files.upload()`: **Added** * `open_router.embeddings.list_models()`: `response.data.[].benchmarks` **Added** * `open_router.models.list()`: * `request` **Changed** * `response.data.[].benchmarks` **Added** * `open_router.models.list_for_user()`: `response.data.[].benchmarks` **Added** * `open_router.files.list()`: **Added** * `open_router.presets.create_presets_messages()`: `request` **Changed** * `open_router.datasets.get_benchmarks_design_arena()`: **Added**
193 lines
7.3 KiB
Python
193 lines
7.3 KiB
Python
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
|
|
from __future__ import annotations
|
|
from .outputadvisorservertoolitem import (
|
|
OutputAdvisorServerToolItem,
|
|
OutputAdvisorServerToolItemTypedDict,
|
|
)
|
|
from .outputapplypatchcallitem import (
|
|
OutputApplyPatchCallItem,
|
|
OutputApplyPatchCallItemTypedDict,
|
|
)
|
|
from .outputapplypatchservertoolitem import (
|
|
OutputApplyPatchServerToolItem,
|
|
OutputApplyPatchServerToolItemTypedDict,
|
|
)
|
|
from .outputbashservertoolitem import (
|
|
OutputBashServerToolItem,
|
|
OutputBashServerToolItemTypedDict,
|
|
)
|
|
from .outputbrowseruseservertoolitem import (
|
|
OutputBrowserUseServerToolItem,
|
|
OutputBrowserUseServerToolItemTypedDict,
|
|
)
|
|
from .outputcodeinterpretercallitem import (
|
|
OutputCodeInterpreterCallItem,
|
|
OutputCodeInterpreterCallItemTypedDict,
|
|
)
|
|
from .outputcodeinterpreterservertoolitem import (
|
|
OutputCodeInterpreterServerToolItem,
|
|
OutputCodeInterpreterServerToolItemTypedDict,
|
|
)
|
|
from .outputcomputercallitem import (
|
|
OutputComputerCallItem,
|
|
OutputComputerCallItemTypedDict,
|
|
)
|
|
from .outputcustomtoolcallitem import (
|
|
OutputCustomToolCallItem,
|
|
OutputCustomToolCallItemTypedDict,
|
|
)
|
|
from .outputdatetimeitem import OutputDatetimeItem, OutputDatetimeItemTypedDict
|
|
from .outputfilesearchcallitem import (
|
|
OutputFileSearchCallItem,
|
|
OutputFileSearchCallItemTypedDict,
|
|
)
|
|
from .outputfilesearchservertoolitem import (
|
|
OutputFileSearchServerToolItem,
|
|
OutputFileSearchServerToolItemTypedDict,
|
|
)
|
|
from .outputfunctioncallitem import (
|
|
OutputFunctionCallItem,
|
|
OutputFunctionCallItemTypedDict,
|
|
)
|
|
from .outputfusionservertoolitem import (
|
|
OutputFusionServerToolItem,
|
|
OutputFusionServerToolItemTypedDict,
|
|
)
|
|
from .outputimagegenerationcallitem import (
|
|
OutputImageGenerationCallItem,
|
|
OutputImageGenerationCallItemTypedDict,
|
|
)
|
|
from .outputimagegenerationservertoolitem import (
|
|
OutputImageGenerationServerToolItem,
|
|
OutputImageGenerationServerToolItemTypedDict,
|
|
)
|
|
from .outputmcpservertoolitem import (
|
|
OutputMcpServerToolItem,
|
|
OutputMcpServerToolItemTypedDict,
|
|
)
|
|
from .outputmemoryservertoolitem import (
|
|
OutputMemoryServerToolItem,
|
|
OutputMemoryServerToolItemTypedDict,
|
|
)
|
|
from .outputmessageitem import OutputMessageItem, OutputMessageItemTypedDict
|
|
from .outputreasoningitem import OutputReasoningItem, OutputReasoningItemTypedDict
|
|
from .outputsearchmodelsservertoolitem import (
|
|
OutputSearchModelsServerToolItem,
|
|
OutputSearchModelsServerToolItemTypedDict,
|
|
)
|
|
from .outputshellcallitem import OutputShellCallItem, OutputShellCallItemTypedDict
|
|
from .outputshellcalloutputitem import (
|
|
OutputShellCallOutputItem,
|
|
OutputShellCallOutputItemTypedDict,
|
|
)
|
|
from .outputsubagentservertoolitem import (
|
|
OutputSubagentServerToolItem,
|
|
OutputSubagentServerToolItemTypedDict,
|
|
)
|
|
from .outputtexteditorservertoolitem import (
|
|
OutputTextEditorServerToolItem,
|
|
OutputTextEditorServerToolItemTypedDict,
|
|
)
|
|
from .outputtoolsearchservertoolitem import (
|
|
OutputToolSearchServerToolItem,
|
|
OutputToolSearchServerToolItemTypedDict,
|
|
)
|
|
from .outputwebfetchservertoolitem import (
|
|
OutputWebFetchServerToolItem,
|
|
OutputWebFetchServerToolItemTypedDict,
|
|
)
|
|
from .outputwebsearchcallitem import (
|
|
OutputWebSearchCallItem,
|
|
OutputWebSearchCallItemTypedDict,
|
|
)
|
|
from .outputwebsearchservertoolitem import (
|
|
OutputWebSearchServerToolItem,
|
|
OutputWebSearchServerToolItemTypedDict,
|
|
)
|
|
from openrouter.utils import get_discriminator
|
|
from pydantic import Discriminator, Tag
|
|
from typing import Union
|
|
from typing_extensions import Annotated, TypeAliasType
|
|
|
|
|
|
OutputItemsTypedDict = TypeAliasType(
|
|
"OutputItemsTypedDict",
|
|
Union[
|
|
OutputToolSearchServerToolItemTypedDict,
|
|
OutputWebSearchServerToolItemTypedDict,
|
|
OutputFileSearchServerToolItemTypedDict,
|
|
OutputWebSearchCallItemTypedDict,
|
|
OutputFileSearchCallItemTypedDict,
|
|
OutputImageGenerationCallItemTypedDict,
|
|
OutputApplyPatchServerToolItemTypedDict,
|
|
OutputTextEditorServerToolItemTypedDict,
|
|
OutputSearchModelsServerToolItemTypedDict,
|
|
OutputDatetimeItemTypedDict,
|
|
OutputApplyPatchCallItemTypedDict,
|
|
OutputMcpServerToolItemTypedDict,
|
|
OutputShellCallItemTypedDict,
|
|
OutputBrowserUseServerToolItemTypedDict,
|
|
OutputComputerCallItemTypedDict,
|
|
OutputCodeInterpreterCallItemTypedDict,
|
|
OutputCustomToolCallItemTypedDict,
|
|
OutputMemoryServerToolItemTypedDict,
|
|
OutputMessageItemTypedDict,
|
|
OutputShellCallOutputItemTypedDict,
|
|
OutputBashServerToolItemTypedDict,
|
|
OutputFunctionCallItemTypedDict,
|
|
OutputImageGenerationServerToolItemTypedDict,
|
|
OutputWebFetchServerToolItemTypedDict,
|
|
OutputCodeInterpreterServerToolItemTypedDict,
|
|
OutputReasoningItemTypedDict,
|
|
OutputFusionServerToolItemTypedDict,
|
|
OutputAdvisorServerToolItemTypedDict,
|
|
OutputSubagentServerToolItemTypedDict,
|
|
],
|
|
)
|
|
r"""An output item from the response"""
|
|
|
|
|
|
OutputItems = Annotated[
|
|
Union[
|
|
Annotated[OutputApplyPatchCallItem, Tag("apply_patch_call")],
|
|
Annotated[OutputCodeInterpreterCallItem, Tag("code_interpreter_call")],
|
|
Annotated[OutputComputerCallItem, Tag("computer_call")],
|
|
Annotated[OutputCustomToolCallItem, Tag("custom_tool_call")],
|
|
Annotated[OutputFileSearchCallItem, Tag("file_search_call")],
|
|
Annotated[OutputFunctionCallItem, Tag("function_call")],
|
|
Annotated[OutputImageGenerationCallItem, Tag("image_generation_call")],
|
|
Annotated[OutputMessageItem, Tag("message")],
|
|
Annotated[OutputAdvisorServerToolItem, Tag("openrouter:advisor")],
|
|
Annotated[OutputApplyPatchServerToolItem, Tag("openrouter:apply_patch")],
|
|
Annotated[OutputBashServerToolItem, Tag("openrouter:bash")],
|
|
Annotated[OutputBrowserUseServerToolItem, Tag("openrouter:browser_use")],
|
|
Annotated[
|
|
OutputCodeInterpreterServerToolItem, Tag("openrouter:code_interpreter")
|
|
],
|
|
Annotated[OutputDatetimeItem, Tag("openrouter:datetime")],
|
|
Annotated[
|
|
OutputSearchModelsServerToolItem,
|
|
Tag("openrouter:experimental__search_models"),
|
|
],
|
|
Annotated[OutputFileSearchServerToolItem, Tag("openrouter:file_search")],
|
|
Annotated[OutputFusionServerToolItem, Tag("openrouter:fusion")],
|
|
Annotated[
|
|
OutputImageGenerationServerToolItem, Tag("openrouter:image_generation")
|
|
],
|
|
Annotated[OutputMcpServerToolItem, Tag("openrouter:mcp")],
|
|
Annotated[OutputMemoryServerToolItem, Tag("openrouter:memory")],
|
|
Annotated[OutputSubagentServerToolItem, Tag("openrouter:subagent")],
|
|
Annotated[OutputTextEditorServerToolItem, Tag("openrouter:text_editor")],
|
|
Annotated[OutputToolSearchServerToolItem, Tag("openrouter:tool_search")],
|
|
Annotated[OutputWebFetchServerToolItem, Tag("openrouter:web_fetch")],
|
|
Annotated[OutputWebSearchServerToolItem, Tag("openrouter:web_search")],
|
|
Annotated[OutputReasoningItem, Tag("reasoning")],
|
|
Annotated[OutputShellCallItem, Tag("shell_call")],
|
|
Annotated[OutputShellCallOutputItem, Tag("shell_call_output")],
|
|
Annotated[OutputWebSearchCallItem, Tag("web_search_call")],
|
|
],
|
|
Discriminator(lambda m: get_discriminator(m, "type", "type")),
|
|
]
|
|
r"""An output item from the response"""
|