"""config/models.py ~~~~~~~~~~~~~~~~ Loads model names and provider base URLs from models.yaml. Do NOT edit this file. Edit config/models.yaml instead. settings.py imports Groq, Gemini, Ollama from here — interface is unchanged. """ import pathlib import types import yaml _cfg_path = pathlib.Path(__file__).parent / "models.yaml" _cfg = yaml.safe_load(_cfg_path.read_text()) def _ns(section: dict) -> types.SimpleNamespace: """Convert a YAML section dict to a SimpleNamespace with UPPER_CASE attributes.""" return types.SimpleNamespace(**{k.upper(): v for k, v in section.items()}) Groq = _ns(_cfg["groq"]) Gemini = _ns(_cfg["gemini"]) Ollama = _ns(_cfg["ollama"])