fix(#95): prevent check_connection from overwriting configured model

check_connection() was auto-overwriting self.config.model with the
first model returned by /v1/models, causing deepseek-r1:8b to be
replaced by deepseek-r1:14b (or whatever Ollama listed first).

Now logs available models without changing the configured model.
Fixes issue #95 item 1.
This commit is contained in:
KoalaTrapLord authored and GitHub committed 2026-03-23 10:37:39 -04:00
1 parent 2b6d4dcdb1
commit 25e064d265
1 file changed
+1 -2
+1 -2
View File
@@ -543,9 +543,8 @@ class DeepSeekBrain:
if models:
model_id = models[0].get("id", self.config.model)
if model_id:
self.config.model = model_id
logger.info("Available model: %s (keeping configured: %s)", model_id, self.config.model)
logger.info("Auto-detected model: %s", model_id)
logger.info("LLM brain connected to %s", self.config.api_base)
return True
except Exception as e:
logger.warning("LLM brain connection failed: %s", e)