Skip to content

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

Closed

Description

@0xbasi

[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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 10, 2025
  2. github-actions commented on Dec 10, 2025

    @github-actions
    Contributor

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

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

  3. self-assigned this
    on Dec 10, 2025
  4. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 10, 2025
  5. rekram1-node commented on Dec 11, 2025

    @rekram1-node
    Collaborator

    can u show me output of:

    opencode debug config

  6. 0xbasi commented on Dec 12, 2025

    @0xbasi
    Author

    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"
      }
    }
    
  7. 0xbasi commented on Dec 12, 2025

    @0xbasi
    Author

    @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.)

  8. agustif commented on Dec 14, 2025

    @agustif

    @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!

  9. 0xbasi commented on Dec 20, 2025

    @0xbasi
    Author
  10. rekram1-node commented on Dec 20, 2025

    @rekram1-node
    Collaborator

    @averageCryptoNerd can u try now?

    Do opencode models --refresh and try again?

  11. 0xbasi commented on Dec 24, 2025

    @0xbasi
    Author

    @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>
    
  12. AnemoneIndicum commented on Jan 8, 2026

    @AnemoneIndicum

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

    Image
  13. 0xbasi commented on Jan 13, 2026

    @0xbasi
    Author
  14. zhangzhiweilimei commented on Jan 22, 2026

    @zhangzhiweilimei

    @rekram1-node
    Has this issue been resolved ?

  15. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions