- u1~u9: AI fallback infrastructure (router/prompts/schema/validator) + Step 12 hook - u10: e2e reject chain (writes final.html with AI-repaired slot, full coverage) - u11: frontend wiring deferred to follow-up commit (split from IMP-41 hunks) - u12: coverage_invariant guard - u13: cache save gate (visual_check PASS + user_approved/auto_cache) — Codex #22 verified Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
41 lines
1.4 KiB
Python
41 lines
1.4 KiB
Python
from __future__ import annotations
|
|
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Design Agent 설정."""
|
|
|
|
anthropic_api_key: str = ""
|
|
kei_api_url: str = "http://localhost:8000"
|
|
log_level: str = "DEBUG"
|
|
|
|
# 슬라이드 크기
|
|
slide_width: int = 1280
|
|
slide_height: int = 720
|
|
|
|
# IMP-33 u1 — AI fallback policy. Fallback-path only; normal path AI=0.
|
|
# Defaults locked by Stage 2 plan; do NOT inline literals downstream.
|
|
ai_fallback_enabled: bool = False
|
|
ai_fallback_model: str = "claude-opus-4-6-20250415"
|
|
ai_fallback_timeout_s: float = 60.0
|
|
ai_fallback_max_retries: int = 3
|
|
ai_fallback_backoff_base_s: float = 1.0
|
|
ai_fallback_backoff_cap_s: float = 8.0
|
|
ai_fallback_backoff_jitter: float = 0.3
|
|
ai_fallback_budget_per_run: int = 10
|
|
ai_fallback_circuit_breaker_threshold: int = 5
|
|
|
|
# IMP-46 u5 — auto-cache flag. When True, `save_proposal` bypasses the
|
|
# `user_approved` gate only (`visual_check_passed` is never bypassed).
|
|
# Default OFF preserves the dual-gate contract; the CLI flag
|
|
# `--auto-cache` in `src/phase_z2_pipeline.py` mutates this setting at
|
|
# parse time. Downstream callers MUST source the flag from Settings,
|
|
# never inline literals.
|
|
ai_fallback_auto_cache: bool = False
|
|
|
|
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
|
|
|
|
|
|
settings = Settings()
|