feat(config): watch runtime configuration changes (#5026)

This commit is contained in:
chengyongru
2026-07-22 13:08:39 +08:00
committed by GitHub
parent 7bf7469d90
commit 3748f664b2
11 changed files with 190 additions and 7 deletions
+1 -5
View File
@@ -235,11 +235,7 @@ class AgentLoop:
def llm_runtime(self) -> LLMRuntime:
"""Resolve the immutable default used to admit the next turn."""
previous = self.runtime_resolver.runtime
try:
runtime = self.runtime_resolver.current(refresh=True)
except Exception:
logger.exception("Failed to refresh model runtime")
return previous
runtime = self.runtime_resolver.admit()
if (
runtime.model != previous.model
or runtime.model_preset != previous.model_preset