OllamaError: Unable to connect. Is the computer able to access the url? #3451

Open
opened 2026-02-16 17:40:07 -05:00 by yindo · 11 comments
Owner

Originally created by @averageCryptoNerd on GitHub (Dec 10, 2025).

Originally assigned to: @rekram1-node on GitHub.

[Not VPN/Proxy issue. Have tried on multiple devices.]

Description

Upon linking an Ollama API key, I am unable to send a message to any of the models provided that use Ollama.

OpenCode version

1.0.143

Steps to reproduce

  1. Connect Ollama API key.
  2. Attempt to message any model that uses Ollama as the provider.

Screenshot and/or share link

Image

Operating System

Windows 11 (26220.7344)

Terminal

Powershell / Windows Terminal

Originally created by @averageCryptoNerd on GitHub (Dec 10, 2025). Originally assigned to: @rekram1-node on GitHub. [Not VPN/Proxy issue. Have tried on multiple devices.] ### Description Upon linking an Ollama API key, I am unable to send a message to any of the models provided that use Ollama. ### OpenCode version 1.0.143 ### Steps to reproduce 1. Connect Ollama API key. 2. Attempt to message any model that uses Ollama as the provider. ### Screenshot and/or share link <img width="1107" height="580" alt="Image" src="https://github.com/user-attachments/assets/aa2e8149-e6ec-4244-8627-4d3213eea283" /> ### Operating System Windows 11 (26220.7344) ### Terminal Powershell / Windows Terminal
yindo added the bug label 2026-02-16 17:40:07 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 10, 2025):

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

  • #5187: Ollama: User message content arrives as empty array - model cannot see user input
  • #4862: need help setting up ollama
  • #2667: Remote Ollama stopped working
  • #227: bug? Ollama does not work as a provider unless configured with an API key

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

@github-actions[bot] commented on GitHub (Dec 10, 2025): This issue might be a duplicate of existing issues. Please check: - #5187: Ollama: User message content arrives as empty array - model cannot see user input - #4862: need help setting up ollama - #2667: Remote Ollama stopped working - #227: bug? Ollama does not work as a provider unless configured with an API key Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 11, 2025):

can u show me output of:

opencode debug config

@rekram1-node commented on GitHub (Dec 11, 2025): can u show me output of: opencode debug config
Author
Owner

@averageCryptoNerd commented on GitHub (Dec 11, 2025):

can u show me output of:

opencode debug config

PS C:\Windows\System32> opencode debug config
{
  "agent": {},
  "mode": {},
  "plugin": [],
  "command": {},
  "username": "Carson",
  "keybinds": {
    "leader": "ctrl+x",
    "app_exit": "ctrl+c,ctrl+d,<leader>q",
    "editor_open": "<leader>e",
    "theme_list": "<leader>t",
    "sidebar_toggle": "<leader>b",
    "scrollbar_toggle": "none",
    "username_toggle": "none",
    "status_view": "<leader>s",
    "session_export": "<leader>x",
    "session_new": "<leader>n",
    "session_list": "<leader>l",
    "session_timeline": "<leader>g",
    "session_share": "none",
    "session_unshare": "none",
    "session_interrupt": "escape",
    "session_compact": "<leader>c",
    "messages_page_up": "pageup",
    "messages_page_down": "pagedown",
    "messages_half_page_up": "ctrl+alt+u",
    "messages_half_page_down": "ctrl+alt+d",
    "messages_first": "ctrl+g,home",
    "messages_last": "ctrl+alt+g,end",
    "messages_last_user": "none",
    "messages_copy": "<leader>y",
    "messages_undo": "<leader>u",
    "messages_redo": "<leader>r",
    "messages_toggle_conceal": "<leader>h",
    "tool_details": "none",
    "model_list": "<leader>m",
    "model_cycle_recent": "f2",
    "model_cycle_recent_reverse": "shift+f2",
    "command_list": "ctrl+p",
    "agent_list": "<leader>a",
    "agent_cycle": "tab",
    "agent_cycle_reverse": "shift+tab",
    "input_clear": "ctrl+c",
    "input_paste": "ctrl+v",
    "input_submit": "return",
    "input_newline": "shift+return,ctrl+return,alt+return,ctrl+j",
    "input_move_left": "left,ctrl+b",
    "input_move_right": "right,ctrl+f",
    "input_move_up": "up",
    "input_move_down": "down",
    "input_select_left": "shift+left",
    "input_select_right": "shift+right",
    "input_select_up": "shift+up",
    "input_select_down": "shift+down",
    "input_line_home": "ctrl+a",
    "input_line_end": "ctrl+e",
    "input_select_line_home": "ctrl+shift+a",
    "input_select_line_end": "ctrl+shift+e",
    "input_visual_line_home": "alt+a",
    "input_visual_line_end": "alt+e",
    "input_select_visual_line_home": "alt+shift+a",
    "input_select_visual_line_end": "alt+shift+e",
    "input_buffer_home": "home",
    "input_buffer_end": "end",
    "input_select_buffer_home": "shift+home",
    "input_select_buffer_end": "shift+end",
    "input_delete_line": "ctrl+shift+d",
    "input_delete_to_line_end": "ctrl+k",
    "input_delete_to_line_start": "ctrl+u",
    "input_backspace": "backspace,shift+backspace",
    "input_delete": "ctrl+d,delete,shift+delete",
    "input_undo": "ctrl+-,super+z",
    "input_redo": "ctrl+.,super+shift+z",
    "input_word_forward": "alt+f,alt+right,ctrl+right",
    "input_word_backward": "alt+b,alt+left,ctrl+left",
    "input_select_word_forward": "alt+shift+f,alt+shift+right",
    "input_select_word_backward": "alt+shift+b,alt+shift+left",
    "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
    "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
    "history_previous": "up",
    "history_next": "down",
    "session_child_cycle": "<leader>right",
    "session_child_cycle_reverse": "<leader>left",
    "terminal_suspend": "ctrl+z"
  }
}
@averageCryptoNerd commented on GitHub (Dec 11, 2025): > can u show me output of: > > opencode debug config ``` PS C:\Windows\System32> opencode debug config { "agent": {}, "mode": {}, "plugin": [], "command": {}, "username": "Carson", "keybinds": { "leader": "ctrl+x", "app_exit": "ctrl+c,ctrl+d,<leader>q", "editor_open": "<leader>e", "theme_list": "<leader>t", "sidebar_toggle": "<leader>b", "scrollbar_toggle": "none", "username_toggle": "none", "status_view": "<leader>s", "session_export": "<leader>x", "session_new": "<leader>n", "session_list": "<leader>l", "session_timeline": "<leader>g", "session_share": "none", "session_unshare": "none", "session_interrupt": "escape", "session_compact": "<leader>c", "messages_page_up": "pageup", "messages_page_down": "pagedown", "messages_half_page_up": "ctrl+alt+u", "messages_half_page_down": "ctrl+alt+d", "messages_first": "ctrl+g,home", "messages_last": "ctrl+alt+g,end", "messages_last_user": "none", "messages_copy": "<leader>y", "messages_undo": "<leader>u", "messages_redo": "<leader>r", "messages_toggle_conceal": "<leader>h", "tool_details": "none", "model_list": "<leader>m", "model_cycle_recent": "f2", "model_cycle_recent_reverse": "shift+f2", "command_list": "ctrl+p", "agent_list": "<leader>a", "agent_cycle": "tab", "agent_cycle_reverse": "shift+tab", "input_clear": "ctrl+c", "input_paste": "ctrl+v", "input_submit": "return", "input_newline": "shift+return,ctrl+return,alt+return,ctrl+j", "input_move_left": "left,ctrl+b", "input_move_right": "right,ctrl+f", "input_move_up": "up", "input_move_down": "down", "input_select_left": "shift+left", "input_select_right": "shift+right", "input_select_up": "shift+up", "input_select_down": "shift+down", "input_line_home": "ctrl+a", "input_line_end": "ctrl+e", "input_select_line_home": "ctrl+shift+a", "input_select_line_end": "ctrl+shift+e", "input_visual_line_home": "alt+a", "input_visual_line_end": "alt+e", "input_select_visual_line_home": "alt+shift+a", "input_select_visual_line_end": "alt+shift+e", "input_buffer_home": "home", "input_buffer_end": "end", "input_select_buffer_home": "shift+home", "input_select_buffer_end": "shift+end", "input_delete_line": "ctrl+shift+d", "input_delete_to_line_end": "ctrl+k", "input_delete_to_line_start": "ctrl+u", "input_backspace": "backspace,shift+backspace", "input_delete": "ctrl+d,delete,shift+delete", "input_undo": "ctrl+-,super+z", "input_redo": "ctrl+.,super+shift+z", "input_word_forward": "alt+f,alt+right,ctrl+right", "input_word_backward": "alt+b,alt+left,ctrl+left", "input_select_word_forward": "alt+shift+f,alt+shift+right", "input_select_word_backward": "alt+shift+b,alt+shift+left", "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete", "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace", "history_previous": "up", "history_next": "down", "session_child_cycle": "<leader>right", "session_child_cycle_reverse": "<leader>left", "terminal_suspend": "ctrl+z" } } ```
Author
Owner

@averageCryptoNerd commented on GitHub (Dec 11, 2025):

@agustif I don't believe that https://github.com/agustif/opencode/issues/12 would resolve this, as I am not running the model locally. It should be using Ollama Cloud.

(Apologies if I misunderstood your issue description.)

@averageCryptoNerd commented on GitHub (Dec 11, 2025): @agustif I don't believe that https://github.com/agustif/opencode/issues/12 would resolve this, as I am not running the model locally. It should be using Ollama Cloud. (Apologies if I misunderstood your issue description.)
Author
Owner

@agustif commented on GitHub (Dec 13, 2025):

@agustif I don't believe that agustif#12 would resolve this, as I am not running the model locally. It should be using Ollama Cloud.

(Apologies if I misunderstood your issue description.)

yep sorry about that, closed my PR!

@agustif commented on GitHub (Dec 13, 2025): > [@agustif](https://github.com/agustif) I don't believe that [agustif#12](https://github.com/agustif/opencode/issues/12) would resolve this, as I am not running the model locally. It should be using Ollama Cloud. > > (Apologies if I misunderstood your issue description.) yep sorry about that, closed my PR!
Author
Owner

@averageCryptoNerd commented on GitHub (Dec 19, 2025):

@rekram1-node Bump.

@averageCryptoNerd commented on GitHub (Dec 19, 2025): @rekram1-node Bump.
Author
Owner

@rekram1-node commented on GitHub (Dec 19, 2025):

@averageCryptoNerd can u try now?

Do opencode models --refresh and try again?

@rekram1-node commented on GitHub (Dec 19, 2025): @averageCryptoNerd can u try now? Do `opencode models --refresh` and try again?
Author
Owner

@averageCryptoNerd commented on GitHub (Dec 24, 2025):

@averageCryptoNerd can u try now?

Do opencode models --refresh and try again?

Hello! I do apologize for the late response, I was out of town. It's still not working. The output was as follows:

PS C:\WINDOWS\system32> opencode models --refresh
Models cache refreshed
opencode/big-pickle
opencode/glm-4.7-free
opencode/gpt-5-nano
opencode/grok-code
github-copilot/claude-3.5-sonnet
github-copilot/claude-3.7-sonnet
github-copilot/claude-3.7-sonnet-thought
github-copilot/claude-haiku-4.5
github-copilot/claude-opus-4
github-copilot/claude-opus-4.5
github-copilot/claude-opus-41
github-copilot/claude-sonnet-4
github-copilot/claude-sonnet-4.5
github-copilot/gemini-2.0-flash-001
github-copilot/gemini-2.5-pro
github-copilot/gemini-3-flash-preview
github-copilot/gemini-3-pro-preview
github-copilot/gpt-4.1
github-copilot/gpt-4o
github-copilot/gpt-5
github-copilot/gpt-5-codex
github-copilot/gpt-5-mini
github-copilot/gpt-5.1
github-copilot/gpt-5.1-codex
github-copilot/gpt-5.1-codex-max
github-copilot/gpt-5.1-codex-mini
github-copilot/gpt-5.2
github-copilot/grok-code-fast-1
github-copilot/o3
github-copilot/o3-mini
github-copilot/o4-mini
github-copilot/oswe-vscode-prime
ollama-cloud/cogito-2.1:671b-cloud
ollama-cloud/deepseek-v3.1:671b-cloud
ollama-cloud/gemini-3-pro-preview:latest
ollama-cloud/glm-4.6:cloud
ollama-cloud/gpt-oss:120b-cloud
ollama-cloud/gpt-oss:20b-cloud
ollama-cloud/kimi-k2-thinking:cloud
ollama-cloud/kimi-k2:1t-cloud
ollama-cloud/minimax-m2:cloud
ollama-cloud/qwen3-coder:480b-cloud
ollama-cloud/qwen3-vl-235b-cloud
ollama-cloud/qwen3-vl-235b-instruct-cloud
PS C:\WINDOWS\system32>
@averageCryptoNerd commented on GitHub (Dec 24, 2025): > [@averageCryptoNerd](https://github.com/averageCryptoNerd) can u try now? > > Do `opencode models --refresh` and try again? Hello! I do apologize for the late response, I was out of town. It's still not working. The output was as follows: ``` PS C:\WINDOWS\system32> opencode models --refresh Models cache refreshed opencode/big-pickle opencode/glm-4.7-free opencode/gpt-5-nano opencode/grok-code github-copilot/claude-3.5-sonnet github-copilot/claude-3.7-sonnet github-copilot/claude-3.7-sonnet-thought github-copilot/claude-haiku-4.5 github-copilot/claude-opus-4 github-copilot/claude-opus-4.5 github-copilot/claude-opus-41 github-copilot/claude-sonnet-4 github-copilot/claude-sonnet-4.5 github-copilot/gemini-2.0-flash-001 github-copilot/gemini-2.5-pro github-copilot/gemini-3-flash-preview github-copilot/gemini-3-pro-preview github-copilot/gpt-4.1 github-copilot/gpt-4o github-copilot/gpt-5 github-copilot/gpt-5-codex github-copilot/gpt-5-mini github-copilot/gpt-5.1 github-copilot/gpt-5.1-codex github-copilot/gpt-5.1-codex-max github-copilot/gpt-5.1-codex-mini github-copilot/gpt-5.2 github-copilot/grok-code-fast-1 github-copilot/o3 github-copilot/o3-mini github-copilot/o4-mini github-copilot/oswe-vscode-prime ollama-cloud/cogito-2.1:671b-cloud ollama-cloud/deepseek-v3.1:671b-cloud ollama-cloud/gemini-3-pro-preview:latest ollama-cloud/glm-4.6:cloud ollama-cloud/gpt-oss:120b-cloud ollama-cloud/gpt-oss:20b-cloud ollama-cloud/kimi-k2-thinking:cloud ollama-cloud/kimi-k2:1t-cloud ollama-cloud/minimax-m2:cloud ollama-cloud/qwen3-coder:480b-cloud ollama-cloud/qwen3-vl-235b-cloud ollama-cloud/qwen3-vl-235b-instruct-cloud PS C:\WINDOWS\system32> ```
Author
Owner

@AnemoneIndicum commented on GitHub (Jan 7, 2026):

I am unable to launch OpenCodec on Windows 11, version 1.1.6.

Image
@AnemoneIndicum commented on GitHub (Jan 7, 2026): I am unable to launch OpenCodec on Windows 11, version 1.1.6. <img width="727" height="251" alt="Image" src="https://github.com/user-attachments/assets/c4dad477-a961-4e84-a4a4-f71abc61bb66" />
Author
Owner

@averageCryptoNerd commented on GitHub (Jan 12, 2026):

@rekram1-node

@averageCryptoNerd commented on GitHub (Jan 12, 2026): @rekram1-node
Author
Owner

@zhangzhiweilimei commented on GitHub (Jan 22, 2026):

@rekram1-node
Has this issue been resolved ?

@zhangzhiweilimei commented on GitHub (Jan 22, 2026): > [@rekram1-node](https://github.com/rekram1-node) Has this issue been resolved ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3451