mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 09:47:28 +00:00
fix(agents): demote Ollama empty-discovery log from warn to debug (#26379)
When Ollama responds successfully but returns zero models (e.g. on Linux with the bundled `ollama-stub.service`), `discoverOllamaModels` was logging at `warn` level: [agents/model-providers] No Ollama models found on local instance This appeared on every agent invocation even when Ollama was not intentionally configured, polluting production logs. An empty model list is a normal operational state — it warrants at most a debug note, not a warning. Fix: change `log.warn` → `log.debug` for the zero-models branch. The error paths (HTTP failure, fetch exception) remain at `warn` since those indicate genuine connectivity problems. Closes #26354
This commit is contained in:
@@ -252,7 +252,7 @@ async function discoverOllamaModels(baseUrl?: string): Promise<ModelDefinitionCo
|
||||
}
|
||||
const data = (await response.json()) as OllamaTagsResponse;
|
||||
if (!data.models || data.models.length === 0) {
|
||||
log.warn("No Ollama models found on local instance");
|
||||
log.debug("No Ollama models found on local instance");
|
||||
return [];
|
||||
}
|
||||
return data.models.map((model) => {
|
||||
|
||||
Reference in New Issue
Block a user