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

from __future__ import annotations
from .providersort import ProviderSort
from .providersortconfig import ProviderSortConfig, ProviderSortConfigTypedDict
from openrouter.utils import validate_open_enum
from pydantic.functional_validators import PlainValidator
from typing import Union
from typing_extensions import Annotated, TypeAliasType


ProviderSortUnionTypedDict = TypeAliasType(
    "ProviderSortUnionTypedDict", Union[ProviderSortConfigTypedDict, ProviderSort]
)


ProviderSortUnion = TypeAliasType(
    "ProviderSortUnion",
    Union[
        ProviderSortConfig,
        Annotated[ProviderSort, PlainValidator(validate_open_enum(False))],
    ],
)
