# 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 OrchestratorToolMockBehaviorConfig(UncheckedBaseModel):
    """
    Orchestrator-side config: tools are identified by resolved names.
    """

    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_names: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Tool names to mock. Only used when mocking_strategy is 'selected'.
    """

    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
