"""Deck Consistency Agent — cross-slide drift reviewer. Tools are intentionally narrower than the Slide Reviewer: this agent works across slides and does not need image / palette / confidentiality probes. """ from __future__ import annotations import os from agents import Agent from agents._prompt_loader import load_prompt from agents.context import AuditContext from agents.output_schemas import DeckFindings from agents.tools import ( get_rubric_section, get_slide_text, list_slide_summaries, ) def _model_name() -> str: """Return the OpenAI model for cross-slide consistency review. The deck-consistency pass reasons across the whole deck so it benefits from a stronger model. Defaults to ``gpt-4o``; override with ``OPENAI_MODEL_DECK`` (or the legacy ``OPENAI_MODEL``). """ return ( os.environ.get("OPENAI_MODEL_DECK") or os.environ.get("OPENAI_MODEL") or "gpt-4o" ) deck_consistency: Agent[AuditContext] = Agent[AuditContext]( name="Deck Consistency", instructions=load_prompt("consistency"), model=_model_name(), tools=[ list_slide_summaries, get_slide_text, get_rubric_section, ], output_type=DeckFindings, )