Skip to content

OpenCode Go API Key Invalid Across All Models #44326

Closed as not planned
Closed as not planned

Description

@yxp-system

Description

OpenCode Go API key is invalid across all models.

I logged into the OpenCode website normally and copied a newly generated OpenCode Go API key directly from the official web page.

After connecting OpenCode Go with this key, every OpenCode Go model fails with the same error:

"API key is invalid"

I tested multiple different models and all of them return the same error, so this does not appear to be a model-specific issue.

I have also generated/copied a fresh API key from the OpenCode website, but the problem still persists.

Could you please check whether there is any problem with my OpenCode Go account, workspace, subscription, API access, or account status?

If possible, please perform a manual review of my account/API access.

Plugins

None

OpenCode version

1.18.21

Steps to reproduce

  1. Log in to the OpenCode website.
  2. Copy a newly generated OpenCode Go API key.
  3. Open OpenCode.
  4. Run /connect.
  5. Select OpenCode Go.
  6. Paste the newly generated API key.
  7. Select any OpenCode Go model.
  8. Send a normal prompt.
  9. The request fails with: "API key is invalid".
  10. Switching to other OpenCode Go models results in the same error.

Screenshot and/or share link

Image

Operating System

windows11

Terminal

windows

Activity

  1. github-actions commented on Aug 23, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The OpenCode version field contains the literal command opencode --version instead of the actual version output. Please run the command and paste the real version number.
    • Steps to reproduce is empty. Please provide steps so the team can investigate.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


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

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. Xiao0219 commented on Aug 23, 2026

    @Xiao0219

    +1

  3. github-actions commented on Aug 23, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now includes all the required information — a clear description, version number, detailed steps to reproduce, a screenshot, and system info. We appreciate you taking the time to fill everything out.

  4. Pooh121974 commented on Sep 26, 2026

    @Pooh121974

    I’m seeing the same OpenCode Go authentication failure from the official OpenCode CLI on Windows/Git Bash.
    My Go subscription is active in the dashboard and usage remains at 0%.
    opencode models opencode-go lists the Go models correctly.
    I re-authenticated with:
    opencode auth login -p opencode-go
    The CLI reports Done, but:
    opencode run -m opencode-go/gpt-5.6-luna "test"
    returns:
    Error: Invalid API key.
    Control tests:

    • opencode/mimo-v2.6-flash-free works successfully.
    • openai/gpt-5.6-luna reaches my separate OpenAI provider and returns that provider’s expected usage-limit error.
    • only opencode-go/... is rejected as an invalid API key.
      I paid for Go about a week ago. The dashboard initially took several days to show the subscription as active, and it now shows active but still 0% usage because no Go request has authenticated successfully.
      Please check whether this is the same Go gateway/key-provisioning issue. I can provide account/invoice details privately if needed.
      Environment: Windows, Git Bash, OpenCode CLI.
      I will not post the API key publicly.
  5. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions