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

from __future__ import annotations
from openrouter.types import BaseModel
from typing import Literal, Union
from typing_extensions import TypeAliasType, TypedDict


OpenAIResponsesToolChoiceTypeWebSearchPreview = Literal["web_search_preview",]


OpenAIResponsesToolChoiceTypeWebSearchPreview20250311 = Literal[
    "web_search_preview_2025_03_11",
]


TypeTypedDict = TypeAliasType(
    "TypeTypedDict",
    Union[
        OpenAIResponsesToolChoiceTypeWebSearchPreview20250311,
        OpenAIResponsesToolChoiceTypeWebSearchPreview,
    ],
)


Type = TypeAliasType(
    "Type",
    Union[
        OpenAIResponsesToolChoiceTypeWebSearchPreview20250311,
        OpenAIResponsesToolChoiceTypeWebSearchPreview,
    ],
)


class OpenAIResponsesToolChoiceTypedDict(TypedDict):
    type: TypeTypedDict


class OpenAIResponsesToolChoice(BaseModel):
    type: Type


OpenAIResponsesToolChoiceTypeFunction = Literal["function",]


class OpenAIResponsesToolChoiceFunctionTypedDict(TypedDict):
    type: OpenAIResponsesToolChoiceTypeFunction
    name: str


class OpenAIResponsesToolChoiceFunction(BaseModel):
    type: OpenAIResponsesToolChoiceTypeFunction

    name: str


OpenAIResponsesToolChoiceRequired = Literal["required",]


OpenAIResponsesToolChoiceNone = Literal["none",]


OpenAIResponsesToolChoiceAuto = Literal["auto",]


OpenAIResponsesToolChoiceUnionTypedDict = TypeAliasType(
    "OpenAIResponsesToolChoiceUnionTypedDict",
    Union[
        OpenAIResponsesToolChoiceTypedDict,
        OpenAIResponsesToolChoiceFunctionTypedDict,
        OpenAIResponsesToolChoiceAuto,
        OpenAIResponsesToolChoiceNone,
        OpenAIResponsesToolChoiceRequired,
    ],
)


OpenAIResponsesToolChoiceUnion = TypeAliasType(
    "OpenAIResponsesToolChoiceUnion",
    Union[
        OpenAIResponsesToolChoice,
        OpenAIResponsesToolChoiceFunction,
        OpenAIResponsesToolChoiceAuto,
        OpenAIResponsesToolChoiceNone,
        OpenAIResponsesToolChoiceRequired,
    ],
)
