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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .conversation_config_client_override_output import ConversationConfigClientOverrideOutput
from .conversation_initiation_source_info import ConversationInitiationSourceInfo
from .orchestrator_tool_mock_behavior_config import OrchestratorToolMockBehaviorConfig
from .tool_response_mock_config_output import ToolResponseMockConfigOutput


class ConversationInitiationClientDataInternal(UncheckedBaseModel):
    conversation_config_override: typing.Optional[ConversationConfigClientOverrideOutput] = None
    custom_llm_extra_body: typing.Optional[typing.Dict[str, typing.Any]] = None
    user_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the end user participating in this conversation (for agent owner's user identification)
    """

    source_info: typing.Optional[ConversationInitiationSourceInfo] = None
    branch_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the agent branch to use for this conversation
    """

    environment: typing.Optional[str] = pydantic.Field(default=None)
    """
    Environment to use for resolving environment variables
    """

    starting_workflow_node_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    If set, start the workflow at this node id instead of the default entry
    """

    dynamic_variables: typing.Optional[typing.Dict[str, typing.Any]] = None
    tool_mock_config: typing.Optional[OrchestratorToolMockBehaviorConfig] = pydantic.Field(default=None)
    """
    Configuration for which tools to mock and fallback behavior
    """

    tool_mock_overrides: typing.Optional[typing.Dict[str, typing.List[ToolResponseMockConfigOutput]]] = pydantic.Field(
        default=None
    )
    """
    Per-tool response mock overrides keyed by resolved tool name, applied ahead of the tool's shared mocks. Used for test-specific mocks.
    """

    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
