from __future__ import annotations from pathlib import Path from pydantic_settings import BaseSettings _PROJECT_ROOT = Path(__file__).resolve().parent.parent.parent _ENV_FILE = _PROJECT_ROOT / ".env" class Settings(BaseSettings): """Minimal app settings for the Decidron simulator. The deterministic simulator needs no LLM provider credentials; the only configurable surface today is CORS for local dev where the CRA dev server (:3000) talks to the FastAPI backend (:7860). """ cors_origins: str = "http://localhost:3000,http://localhost:7860" model_config = {"env_file": str(_ENV_FILE), "env_file_encoding": "utf-8"} @property def cors_origin_list(self) -> list[str]: return [o.strip() for o in self.cors_origins.split(",") if o.strip()] settings = Settings()