Cannot use third-party API, network error occurred.Error: Unable to connect. Is the computer able to access the url? #8733

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

Originally created by @winmerdx on GitHub (Feb 6, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Unable to use any third-party APIs; network error is displayed:Error: Unable to connect. Is the computer able to access the url?
However, these third-party APIs work normally on other applications or another computer.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "nvidia1": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://integrate.api.nvidia.com/v1",
        "apiKey": "****"
      },
      "models": {
        "z-ai/glm4.7": {
          "name": "GLM 4.7"
        },
        "minimaxai/minimax-m2.1": {
          "name": "minimax-m2.1"
        }
      }
    },
    "API": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://***",
        "apiKey": "***"
      },
      "models": {
        "gpt-4.1": {
          "name": "gpt-4.1"
        }
      }
    }
  }
}

Error

ERROR 2026-02-07T07:03:16 +103ms service=llm providerID=opencode modelID=gpt-5-nano sessionID=ses_3c91688c1ffeg1z1IB9Vrl3cWY small=true agent=title mode=primary error={"error":{"code":"ConnectionRefused","path":"https://integrate.api.nvidia.com/v1/chat/completions","errno":0}} stream error
ERROR 2026-02-07T07:03:16 +3ms service=session.processor error=Unable to connect. Is the computer able to access the url? process

ERROR 2026-02-07T07:30:00 +417ms service=llm providerID=opencode modelID=gpt-5-nano sessionID=ses_3c8fea4eeffezWPDwY7jN7BzeA small=true agent=title mode=primary error={"error":{"code":"ConnectionRefused","path":"https://*****/v1/chat/completions","errno":0}} stream error
ERROR 2026-02-07T07:30:00 +0ms service=session.processor error=Unable to connect. Is the computer able to access the url? process

INFO  2026-02-09T08:37:00 +2ms service=server status=completed duration=2073 method=GET path=/mcp request
ERROR 2026-02-09T08:37:00 +332ms service=mcp clientName=grep_app error=MCP error -32601: Method not found failed to get prompts
INFO  2026-02-09T08:37:00 +2ms service=server status=completed duration=2413 method=GET path=/command request
ERROR 2026-02-09T08:37:00 +71ms service=mcp clientName=grep_app error=MCP error -32601: Method not found failed to get prompts

Why are the provider ID and model ID reported as errors in my log different from the ones I customized? I have tried clearing the cache, deleting configuration files, uninstalling and reinstalling the application, but none of these methods seem to work.

Plugins

Nothing

OpenCode version

1.1.53

Operating System

Windows 11 IoT LTSC 24H2

Terminal

Windows Terminal
Windows TUI

Screenshot and/or share link

Image
Originally created by @winmerdx on GitHub (Feb 6, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Unable to use any third-party APIs; network error is displayed:Error: Unable to connect. Is the computer able to access the url? However, these third-party APIs work normally on other applications or another computer. ```opencode.json : { "$schema": "https://opencode.ai/config.json", "provider": { "nvidia1": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://integrate.api.nvidia.com/v1", "apiKey": "****" }, "models": { "z-ai/glm4.7": { "name": "GLM 4.7" }, "minimaxai/minimax-m2.1": { "name": "minimax-m2.1" } } }, "API": { "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://***", "apiKey": "***" }, "models": { "gpt-4.1": { "name": "gpt-4.1" } } } } } ``` ### Error ```log ERROR 2026-02-07T07:03:16 +103ms service=llm providerID=opencode modelID=gpt-5-nano sessionID=ses_3c91688c1ffeg1z1IB9Vrl3cWY small=true agent=title mode=primary error={"error":{"code":"ConnectionRefused","path":"https://integrate.api.nvidia.com/v1/chat/completions","errno":0}} stream error ERROR 2026-02-07T07:03:16 +3ms service=session.processor error=Unable to connect. Is the computer able to access the url? process ERROR 2026-02-07T07:30:00 +417ms service=llm providerID=opencode modelID=gpt-5-nano sessionID=ses_3c8fea4eeffezWPDwY7jN7BzeA small=true agent=title mode=primary error={"error":{"code":"ConnectionRefused","path":"https://*****/v1/chat/completions","errno":0}} stream error ERROR 2026-02-07T07:30:00 +0ms service=session.processor error=Unable to connect. Is the computer able to access the url? process INFO 2026-02-09T08:37:00 +2ms service=server status=completed duration=2073 method=GET path=/mcp request ERROR 2026-02-09T08:37:00 +332ms service=mcp clientName=grep_app error=MCP error -32601: Method not found failed to get prompts INFO 2026-02-09T08:37:00 +2ms service=server status=completed duration=2413 method=GET path=/command request ERROR 2026-02-09T08:37:00 +71ms service=mcp clientName=grep_app error=MCP error -32601: Method not found failed to get prompts ``` **Why are the provider ID and model ID reported as errors in my log different from the ones I customized? I have tried clearing the cache, deleting configuration files, uninstalling and reinstalling the application, but none of these methods seem to work.** ### Plugins Nothing ### OpenCode version 1.1.53 ### Operating System Windows 11 IoT LTSC 24H2 ### Terminal Windows Terminal Windows TUI ### Screenshot and/or share link <img width="964" height="498" alt="Image" src="https://github.com/user-attachments/assets/d196b5f9-59f2-435a-81bb-96b169d6ebcb" />
yindo added the windowsbug labels 2026-02-16 18:10:42 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 6, 2026):

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

  • #12083: Intranet environment unable to connect - similar "Unable to connect" error with third-party APIs
  • #7278: General network connectivity error with same error message
  • #12102: Unable to connect Azure AI Foundry with custom baseURL configuration - specifically related to third-party OpenAI-compatible APIs
  • #9788: Offline deployment with custom model service URLs (vLLM) encountering the same error

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

@github-actions[bot] commented on GitHub (Feb 6, 2026): This issue might be a duplicate of existing issues. Please check: - #12083: Intranet environment unable to connect - similar "Unable to connect" error with third-party APIs - #7278: General network connectivity error with same error message - #12102: Unable to connect Azure AI Foundry with custom baseURL configuration - specifically related to third-party OpenAI-compatible APIs - #9788: Offline deployment with custom model service URLs (vLLM) encountering the same error 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#8733