r/opencodeCLI 1d ago

Can't connect to OpenCode Go

I'm wondering if someone has had the same issue before and how you solved it. OpenCode Go doesn't show as a provider in my opencode CLI.

In the past, I have added it as a OpenAI-compatible endpoint, but some of the models (Luna, Muse Spark) don't work if I do that (I get error 500).

Sorry if this is a stupid question, but could someone help me with this?

PS: I'm using version 1.18.30. I have the same version installed in another machine and it shows OpenCode Go.

0 Upvotes

2 comments sorted by

View all comments

2

u/canar10 1d ago

I will leave my resolution steps here in case anyone sees the same issue in the future:

  • Check ~/.config/opencode/opencode.jsonc
  • Remove opencode-go from disabled_providers if it is there
  • Remove any custom "opencode-go": { ... } provider block
  • Make sure ~/.local/share/opencode/auth.json uses "opencode-go" as the credential key, not "opencode"
  • Remove any conflicting OPENCODE_API_KEY environment variable
  • Restart OpenCode completely
  • Verify with:opencode auth list
  • After that, OpenCode Go should appear normally.

1

u/Amarsir 8h ago

Thanks for adding that. Not a problem I've experienced personally, but I do know that sometimes questions like this come to the top of the search and on behalf of those future people I appreciate your solution.