# 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 .mock_no_match_behavior import MockNoMatchBehavior
from .mocking_strategy import MockingStrategy


class SimulationToolMockBehaviorConfig(UncheckedBaseModel):
    """
    Simulation/preview-side config: tools are identified by IDs, resolved to names at runtime.
    """

    mocking_strategy: typing.Optional[MockingStrategy] = pydantic.Field(default=None)
    """
    Which tools to mock: 'all' mocks every mockable tool, 'selected' mocks only those in mocked_tool_names/mocked_tool_ids, 'none' disables mocking.
    """

    fallback_strategy: typing.Optional[MockNoMatchBehavior] = pydantic.Field(default=None)
    """
    Behavior when no mock matches a tool call.
    """

    mocked_tool_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Tool IDs to mock. Resolved to tool names before being passed to the orchestrator.
    """

    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
