OpenCode

How to fix an OpenCode connection or 404 error

First determine whether the request can reach the service, then check the Base URL and adapter combination.

Start with these checks

The request did not reach the expected AI Code With endpoint.

  • The request times out, returns ECONNREFUSED or 404, or has no response.
  • The Base URL is incomplete or has an extra path
  • Compare the Base URL with the generated config
ECONNREFUSEDtimeout

01

Separate a connection failure from an HTTP response

A timeout or ECONNREFUSED usually means the request did not arrive; a 404 means the service received an unmatched path.

02

Check Base URL and adapter

Use only the Base URL from the project config. Do not add or remove /v1 from memory, and keep the adapter aligned with the Provider.

  1. 1Compare the Base URL with the generated config
  2. 2Do not add an unverified path manually

03

Confirm the request path

Reopen OpenCode and retry while keeping the status code. A service response confirms the network path is working.

  1. 1Do not add an unverified path manually
  2. 2Reopen OpenCode and retry

If it is still not fixed

Sources

Reconfigure

Return to the integration center and continue the setup steps.

Return to the related setup step