Unable to connect local Ollama #7815

Open
opened 2026-02-16 18:08:21 -05:00 by yindo · 1 comment
Owner

Originally created by @stephenttt626 on GitHub (Jan 28, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

OpenCode Version: 1.1.38
Operating System: Linux
Content of opencode.json:
{ "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://172.18.4.152:11434/v1" }, "models": { "qwen3:14b": { "name": "qwen3:14b", "tool_call": false } } } } }
Error Message:
ERROR 2026-01-28T08:04:45 +1ms service=session.processor error=Unable to connect stack="AI_APICallError: Unable to connect\n at <anonymous> (../../node_modules/.bun/@ai-sdk+provider-utils@3.0.20+d6123d32214422cb/node_modules/@ai-sdk/provider-utils/dist/index.mjs:918:18)\n at processTicksAndRejections (native:7:39)" process

Problem Description:
I am able to run curl manually to Ollama, but when integrated with opencode, it shows "Unable to connect"

Plugins

No response

OpenCode version

1.1.38

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @stephenttt626 on GitHub (Jan 28, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description OpenCode Version: 1.1.38 Operating System: Linux Content of opencode.json: `{ "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://172.18.4.152:11434/v1" }, "models": { "qwen3:14b": { "name": "qwen3:14b", "tool_call": false } } } } }` Error Message: `ERROR 2026-01-28T08:04:45 +1ms service=session.processor error=Unable to connect stack="AI_APICallError: Unable to connect\n at <anonymous> (../../node_modules/.bun/@ai-sdk+provider-utils@3.0.20+d6123d32214422cb/node_modules/@ai-sdk/provider-utils/dist/index.mjs:918:18)\n at processTicksAndRejections (native:7:39)" process` Problem Description: I am able to run curl manually to Ollama, but when integrated with opencode, it shows "Unable to connect" ### Plugins _No response_ ### OpenCode version 1.1.38 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:08:21 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 28, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7278: Error: Unable to connect. Is the computer able to access the url?
  • #5344: OllamaError: Unable to connect. Is the computer able to access the url?
  • #2667: Remote Ollama stopped working
  • #4488: Ollama integration: API returns HTTP 200 but responses not displayed
  • #10945: [Windows] Raw ANSI escape codes flooding console & "Unable to connect" errors during tool execution

These issues all involve Ollama connection problems with similar "Unable to connect" error messages and baseURL configurations. They may contain solutions or workarounds that could help resolve your issue.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 28, 2026): This issue might be a duplicate of existing issues. Please check: - #7278: Error: Unable to connect. Is the computer able to access the url? - #5344: OllamaError: Unable to connect. Is the computer able to access the url? - #2667: Remote Ollama stopped working - #4488: Ollama integration: API returns HTTP 200 but responses not displayed - #10945: [Windows] Raw ANSI escape codes flooding console & "Unable to connect" errors during tool execution These issues all involve Ollama connection problems with similar "Unable to connect" error messages and baseURL configurations. They may contain solutions or workarounds that could help resolve your issue. Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7815