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

import typing

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


class AssistantStandardResponse(UniversalBaseModel):
    """
    Standard assistant response with model configuration.
    """

    id: str = pydantic.Field()
    """
    Assistant ID
    """

    name: str = pydantic.Field()
    """
    Assistant name
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Assistant description
    """

    icon_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Icon ID
    """

    icon_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    Icon URL
    """

    icon_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    Icon type (deprecated)
    """

    icon_data: typing.Optional[str] = pydantic.Field(default=None)
    """
    Icon data (deprecated)
    """

    is_default: bool = pydantic.Field()
    """
    Is default assistant
    """

    created_at: int = pydantic.Field()
    """
    Creation timestamp
    """

    updated_at: int = pydantic.Field()
    """
    Update timestamp
    """

    access_mode: str = pydantic.Field()
    """
    Access mode
    """

    api_enabled: bool = pydantic.Field()
    """
    API enabled
    """

    is_active: bool = pydantic.Field()
    """
    Is active
    """

    temperature: float = pydantic.Field()
    """
    Temperature
    """

    user_access_level: typing.Optional[str] = pydantic.Field(default=None)
    """
    User's access level: owner, edit, view
    """

    workflow_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Linked workflow ID (if workflow-based assistant)
    """

    workflow_version: typing.Optional[int] = pydantic.Field(default=None)
    """
    Version of linked workflow
    """

    workflow_based: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether this assistant executes through a workflow
    """

    default_model_key: str = pydantic.Field()
    """
    Default model key
    """

    allowed_model_providers: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Allowed model providers
    """

    allowed_models: typing.Optional[typing.Dict[str, typing.Optional[typing.List[str]]]] = pydantic.Field(default=None)
    """
    Per-provider model selection
    """

    context_strategy: str = pydantic.Field()
    """
    Context strategy
    """

    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
