"""Configuration utilities.""" import toml from src.standard.llm_client import resolve_llm_config __all__ = ["load_config", "resolve_llm_config"] def resolve_config_path(path: str) -> str: import os from pathlib import Path if os.path.exists(path): return path pkg_config = Path(__file__).resolve().parent.parent.parent.parent / "config" / "config.toml" if pkg_config.exists(): return str(pkg_config) return path def load_config(path: str = "config/config.toml") -> dict: resolved = resolve_config_path(path) with open(resolved, "r", encoding="utf-8") as f: return toml.load(f)