# 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


class LegacyExtractionAdvancedOptionsReviewAgent(UncheckedBaseModel):
    """
    Configuration for the review agent that analyzes extraction results.
    When enabled, each field in the output metadata will include a `reviewAgentScore` (1-5)
    and may include additional `insights` of type `issue` or `review_summary` to help identify
    fields that may need manual review.

    To learn more, view the [Review Agent Documentation](https://docs.extend.ai/2026-02-09/product/extraction/review-agent)
    """

    enabled: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether to enable the review agent for the extraction output.
    """

    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
