"""FluentGerman.ai — Application configuration.""" from functools import lru_cache from typing import Literal from pydantic_settings import BaseSettings class Settings(BaseSettings): """App settings loaded from environment / .env file.""" # App app_name: str = "FluentGerman.ai" app_port: int = 8999 app_domain: str = "" debug: bool = False # Security secret_key: str = "CHANGE-ME-in-production" access_token_expire_minutes: int = 60 * 24 # 24h algorithm: str = "HS256" # Database database_url: str = "mysql+aiomysql://fluentgerman:fluentgerman@localhost:3306/fluentgerman" # LLM llm_provider: str = "openai" # used by litellm routing llm_api_key: str = "" llm_model: str = "gpt-4o-mini" # Voice feature flag: "api" = LLM provider Whisper/TTS, "browser" = Web Speech API voice_mode: Literal["api", "browser"] = "api" tts_model: str = "tts-1" tts_voice: str = "alloy" stt_model: str = "whisper-1" # Admin bootstrap admin_email: str = "admin@fluentgerman.ai" admin_username: str = "admin" admin_password: str = "CHANGE-ME" model_config = {"env_file": ".env", "env_file_encoding": "utf-8"} @lru_cache def get_settings() -> Settings: return Settings()