{"record":{"id":"c356515e874897c5","repo":"continuedev/continue","slug":"error-fetching-tags-e-message","errorCode":null,"errorMessage":"Error fetching tags: ${e.message}","messagePattern":"Error fetching tags: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/llm/index.ts","lineNumber":481,"sourceCode":"          }\n\n          const error = await this.parseError(resp);\n          throw error;\n        }\n\n        return resp;\n      } catch (e: any) {\n        Logger.error(e, {\n          context: \"llm_fetch\",\n          url: String(input),\n          method: init?.method || \"GET\",\n          model: this.model,\n          provider: this.providerName,\n        });\n\n        // Errors to ignore\n        if (e.message.includes(\"/api/tags\")) {\n          throw new Error(`Error fetching tags: ${e.message}`);\n        } else if (e.message.includes(\"/api/show\")) {\n          throw new Error(\n            `HTTP ${e.response.status} ${e.response.statusText} from ${e.response.url}\\n\\n${e.response.body}`,\n          );\n        } else {\n          if (!isAbortError(e)) {\n            // Don't pollute console with abort errors. Check on name instead of instanceof, to avoid importing node-fetch here\n            console.debug(\n              `${e.message}\\n\\nCode: ${e.code}\\nError number: ${e.errno}\\nSyscall: ${e.erroredSysCall}\\nType: ${e.type}\\n\\n${e.stack}`,\n            );\n          }\n          if (\n            e.code === \"ECONNREFUSED\" &&\n            e.message.includes(\"http://127.0.0.1:11434\")\n          ) {\n            const message = (await isOllamaInstalled())\n              ? \"Unable to connect to local Ollama instance. Ollama may not be running.\"\n              : \"Unable to connect to local Ollama instance. Ollama may not be installed or may not running.\";","sourceCodeStart":463,"sourceCodeEnd":499,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/llm/index.ts#L463-L499","documentation":"Thrown inside the Ollama customFetch error path when a caught error's message references /api/tags — the local Ollama endpoint used to list models. Fetching http://localhost:11434/api/tags failed, usually because Ollama isn't running or reachable at that address.","triggerScenarios":"The configured Ollama connection can't serve /api/tags: Ollama not started, listening on a different host/port, or an OLLAMA_HOST override pointing somewhere unreachable.","commonSituations":"Fresh machines where Ollama isn't installed/started; OLLAMA_HOST set to a remote or custom port; Docker networking preventing localhost access; Ollama still booting.","solutions":["Start Ollama (ollama serve or launch the app) and verify: curl http://localhost:11434/api/tags","If OLLAMA_HOST is customized, ensure the client's apiBase matches it exactly","For Docker/WSL, use host.docker.internal or the host's IP instead of 127.0.0.1","Wait a moment after install/start for the server to bind"],"exampleFix":"# before\n# Ollama not running; error: Error fetching tags: fetch failed\n# after\nollama serve &\ncurl http://localhost:11434/api/tags  # returns {\"models\":[...]}","handlingStrategy":"retry","validationCode":"const ok = await fetch('http://localhost:11434/api/tags').then(r => r.ok).catch(() => false); if (!ok) await startOrWaitForOllama();","typeGuard":null,"tryCatchPattern":"catch (e) { if (e.message.includes('Error fetching tags')) { await ensureOllamaRunning(); retry(); } else throw e; }","preventionTips":["Start Ollama before model discovery","Align client apiBase with OLLAMA_HOST","Add a startup readiness check on port 11434"],"tags":["ollama","connection","local-server","model-list"],"backgroundTag":"connection-refused","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}