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

from __future__ import annotations
from .containerautoenvironment import (
    ContainerAutoEnvironment,
    ContainerAutoEnvironmentTypedDict,
)
from .containerreferenceenvironment import (
    ContainerReferenceEnvironment,
    ContainerReferenceEnvironmentTypedDict,
)
from openrouter.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import Union
from typing_extensions import Annotated, TypeAliasType


ShellServerToolEnvironmentTypedDict = TypeAliasType(
    "ShellServerToolEnvironmentTypedDict",
    Union[ContainerAutoEnvironmentTypedDict, ContainerReferenceEnvironmentTypedDict],
)
r"""Server-side execution environment for the shell tool. Only container-backed environments are supported; \"local\" shells are not."""


ShellServerToolEnvironment = Annotated[
    Union[
        Annotated[ContainerAutoEnvironment, Tag("container_auto")],
        Annotated[ContainerReferenceEnvironment, Tag("container_reference")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
r"""Server-side execution environment for the shell tool. Only container-backed environments are supported; \"local\" shells are not."""
