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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .vertex_ai_auth import VertexAiAuth


class CreateVertexAillmRequest(UniversalBaseModel):
    """
    Request to create a Vertex AI Large Language Model connection for Gemini models.
    """

    type: typing.Literal["vertex-ai"] = "vertex-ai"
    name: str = pydantic.Field()
    """
    Name to reference the LLM. This will be used in other endpoints (like query) when using this LLM. If this name conflicts with a global LLM (a LLM that is preconfigured with the Vectara platform), then it will override that LLM for all usages.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Description of the LLM.
    """

    model: str = pydantic.Field()
    """
    The model name to use (e.g. gemini-2.5-flash, gemini-2.5-pro, gemini-2.0-experimental-1219, etc).
    """

    uri: str = pydantic.Field()
    """
    The URI endpoint for the Vertex AI API
    """

    auth: VertexAiAuth
    test_model_parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Any additional parameters that are required for the LLM during the test call.
    """

    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
