From d444c99c23159a33a9ace294fd817195ee821381 Mon Sep 17 00:00:00 2001 From: Woody Date: Mon, 27 Apr 2026 15:11:36 +0800 Subject: [PATCH] feat(config): log resolved llm and embedding model names on startup Add INFO log in get_settings() to print the actual model names after merging .env and class defaults. Confirms pydantic-settings priority: env values override class defaults as expected. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- backend/app/core/config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/app/core/config.py b/backend/app/core/config.py index bab6b88..34e508c 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -1,8 +1,11 @@ from functools import lru_cache +import logging from pathlib import Path from pydantic_settings import BaseSettings +logger = logging.getLogger(__name__) + class Settings(BaseSettings): # LLM access @@ -41,4 +44,6 @@ class Settings(BaseSettings): @lru_cache def get_settings() -> Settings: - return Settings() + s = Settings() + logger.info("Settings loaded: llm_model=%s embedding_model=%s", s.llm_model_name, s.embedding_model) + return s