"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
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 .outputdatetimeitem import OutputDatetimeItem, OutputDatetimeItemTypedDict
from .outputfilesearchcallitem import (
    OutputFileSearchCallItem,
    OutputFileSearchCallItemTypedDict,
)
from .outputfilesearchservertoolitem import (
    OutputFileSearchServerToolItem,
    OutputFileSearchServerToolItemTypedDict,
)
from .outputfunctioncallitem import (
    OutputFunctionCallItem,
    OutputFunctionCallItemTypedDict,
)
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 .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[
        OutputWebSearchServerToolItemTypedDict,
        OutputToolSearchServerToolItemTypedDict,
        OutputFileSearchServerToolItemTypedDict,
        OutputWebSearchCallItemTypedDict,
        OutputFileSearchCallItemTypedDict,
        OutputImageGenerationCallItemTypedDict,
        OutputTextEditorServerToolItemTypedDict,
        OutputApplyPatchServerToolItemTypedDict,
        OutputDatetimeItemTypedDict,
        OutputMcpServerToolItemTypedDict,
        OutputBrowserUseServerToolItemTypedDict,
        OutputFunctionCallItemTypedDict,
        OutputImageGenerationServerToolItemTypedDict,
        OutputMessageItemTypedDict,
        OutputComputerCallItemTypedDict,
        OutputWebFetchServerToolItemTypedDict,
        OutputMemoryServerToolItemTypedDict,
        OutputCodeInterpreterCallItemTypedDict,
        OutputBashServerToolItemTypedDict,
        OutputCodeInterpreterServerToolItemTypedDict,
        OutputReasoningItemTypedDict,
    ],
)
r"""An output item from the response"""


OutputItems = Annotated[
    Union[
        Annotated[OutputCodeInterpreterCallItem, Tag("code_interpreter_call")],
        Annotated[OutputComputerCallItem, Tag("computer_call")],
        Annotated[OutputFileSearchCallItem, Tag("file_search_call")],
        Annotated[OutputFunctionCallItem, Tag("function_call")],
        Annotated[OutputImageGenerationCallItem, Tag("image_generation_call")],
        Annotated[OutputMessageItem, Tag("message")],
        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[OutputFileSearchServerToolItem, Tag("openrouter:file_search")],
        Annotated[
            OutputImageGenerationServerToolItem, Tag("openrouter:image_generation")
        ],
        Annotated[OutputMcpServerToolItem, Tag("openrouter:mcp")],
        Annotated[OutputMemoryServerToolItem, Tag("openrouter:memory")],
        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[OutputWebSearchCallItem, Tag("web_search_call")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
r"""An output item from the response"""
