""" Server-wide configuration loaded from .env via Pydantic Settings. All modules import `settings` from here — never read env vars directly. """ from pydantic import Field from pydantic_settings import BaseSettings class Settings(BaseSettings): # LLM backend llm_base_url: str = Field(description="OpenAI-compatible LLM backend base URL") llm_api_key: str = Field(default="not-needed", description="API key for the LLM backend") # Default models (can be overridden per-session or per-bot) default_bot_model: str = Field(description="Default model used for bot turns") default_orchestrator_model: str = Field(description="Model used for orchestrator calls") # Server limits max_bots_per_session: int = Field(default=10, description="Hard cap on bots per session") session_ttl_default: int = Field(default=3600, description="Default idle TTL in seconds") # Debug debug: bool = Field(default=False, description="Enable debug mode server-wide") model_config = {"env_file": ".env", "env_file_encoding": "utf-8"} settings = Settings() # type: ignore[call-arg]