Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

fix: apply LLM_REASONING_EFFORT env var via resolver path as well

Xinyu Du66d0f62a7e48
diff --git a/deeptutor/services/llm/config.py b/deeptutor/services/llm/config.py
index ba833c16f..fb2db987d 100644
--- a/deeptutor/services/llm/config.py
+++ b/deeptutor/services/llm/config.py
@@ -236,6 +236,14 @@ def get_llm_config() -> LLMConfig:
exc,
)
_LLM_CONFIG_CACHE = _get_llm_config_from_env()
+
+ # Allow LLM_REASONING_EFFORT from .env to override the resolver path
+ env_reasoning = _strip_value(get_env_store().get("LLM_REASONING_EFFORT"))
+ if env_reasoning:
+ _LLM_CONFIG_CACHE = _LLM_CONFIG_CACHE.model_copy(
+ update={"reasoning_effort": env_reasoning}
+ )
+
return _LLM_CONFIG_CACHE