Skip to content

[BUG] apiBaseUrl settings appear to be ignored in v0.7.5 #247

Closed

Description

@NameMeLeo

🐛 What happened?

The opencodego.apiBaseUrl and opencodezen.apiBaseUrl settings appear to be ignored. After configuring a custom compatible API gateway and reloading VS Code, the extension still appears to send requests to the default opencode.ai endpoints instead of the configured base URL.

🔄 Steps to reproduce

  1. Set opencodego.apiBaseUrl (or opencodezen.apiBaseUrl) in User Settings to a compatible custom gateway URL.
  2. Reload the VS Code window.
  3. Use Refresh Models, Test Connection, or send a chat request with that provider.
  4. Check the gateway access logs or the OpenCode output channel to see which host receives the request.

✅ What did you expect?

Requests should use the configured base URL, with the appropriate route appended (for example, /models, /chat/completions, /messages, or /responses; /usage for Go where applicable).

🧾 What happened instead?

Requests appear to continue using the built-in defaults: https://opencode.ai/zen/go/v1/... for Go or https://opencode.ai/zen/v1/... for Zen. This makes a custom gateway unusable.

The installed v0.7.5 package declares and documents both settings, but its compiled provider definitions still contain these fixed endpoint URLs. The settings key and URL helper appear in the bundle, but I could not find a runtime path applying the configured setting to the provider URLs. The changelog says custom base URLs should apply to chat, model discovery, inline completions, and Go usage sync, so this may be a packaging/runtime regression.

🖥️ Environment

  • Extension version: 0.7.5
  • VS Code version: Please fill in from Help → About
  • Provider: OpenCode Go / OpenCode Zen (please specify which you tested)
  • Model: Please fill in the model used, if testing chat
  • Setting tested: opencodego.apiBaseUrl / opencodezen.apiBaseUrl (please specify)

📸 Logs or screenshots (optional)

I can provide redacted gateway access logs or the relevant OpenCode output log. Any API keys or authorization headers should be removed before sharing.

Activity

  1. ltmoerdani commented on Oct 13, 2026

    @ltmoerdani
    Owner

    Thanks for the clear report, the reproduction steps made this easy to pin down.

    You were right about what's in the bundle: the setting keys and the URL helper exist, but nothing at runtime ever read the setting. We dug into the history and this is a regression on our side, not a packaging quirk. Configurable base URLs were fully implemented back in #149 (Aug), but a series of internal refactors afterwards (extracting the provider definitions into their own module, then moving the provider class out of extension.ts) reverted the definitions to hardcoded opencode.ai URLs and dropped the wiring. What survived was the settings schema, the URL helpers, and a usage-tracker hook that nothing supplied anymore, which is why the package "declared" the feature while ignoring it.

    The fix re-wires it in the current structure: the base URL is read once at startup from the root config with the full key, normalized (non-http(s), embedded credentials, query/hash fall back to the default), and every route (chat transports, agents window, model discovery, connection test, inline completions, and the Go /usage sync) derives from it. Reload after changing, same as documented.

    If you want to follow along: #257. It'll land in 0.7.9. Your gateway logs should show traffic hitting your host once it's out. If anything still points at opencode.ai after upgrading, let us know which command path it was and we'll chase it.

  2. added a commit that references this issue on Oct 13, 2026
    5389221
  3. added a commit that references this issue on Oct 13, 2026
    acb7860
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions