# This file was auto-generated by Fern from our API Definition.

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .provider_enum import ProviderEnum
from .scope_enum import ScopeEnum
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ModelProviderConnectionRequest(UncheckedBaseModel):
    api_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    Model provider API key
    """

    auth_token: typing.Optional[str] = pydantic.Field(default=None)
    """
    Model provider Auth token
    """

    budget_alert_threshold: typing.Optional[float] = pydantic.Field(default=None)
    """
    Budget alert threshold for the given provider connection
    """

    cached_available_models: typing.Optional[str] = pydantic.Field(default=None)
    """
    List of available models from the provider
    """

    deployment_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure OpenAI deployment name
    """

    endpoint: typing.Optional[str] = pydantic.Field(default=None)
    """
    Azure OpenAI endpoint
    """

    google_application_credentials: typing.Optional[str] = pydantic.Field(default=None)
    """
    The content of GOOGLE_APPLICATION_CREDENTIALS json file
    """

    google_location: typing.Optional[str] = pydantic.Field(default=None)
    """
    Google project location
    """

    google_project_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Google project ID
    """

    is_internal: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether the model provider connection is internal, not visible to the user
    """

    provider: typing.Optional[ProviderEnum] = None
    scope: typing.Optional[ScopeEnum] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
