Skip to content

Missing OpenCode Zen and OpenCode Go providers in desktop provider pick2. #842

Description

@GittForYou

Add OpenCode Zen / OpenCode Go support to provider picker

The Hermes CLI backend already supports opencode-zen and opencode-go as first-class providers (aliased from opencodeopencode-zen, goopencode-go), and reads API keys from OPENCODE_ZEN_API_KEY / OPENCODE_GO_API_KEY env vars. However, the desktop app's hardcoded provider lists don't include them, so users can't select them from the dropdown or setup wizard.

Changes needed

1. src/renderer/src/constants.ts — Add to PROVIDERS.options:

Insert after the aggregators (e.g. after { value: "aimlapi", ... }):

{ value: "opencode-zen", label: "OpenCode Zen" },
{ value: "opencode-go", label: "OpenCode Go" },

2. src/renderer/src/constants.ts — Add to PROVIDERS.labels:

"opencode-zen": "OpenCode Zen",
"opencode-go": "OpenCode Go",

3. src/renderer/src/constants.ts — Add to PROVIDERS.setup (setup wizard cards):

Insert after the OAuth/local entries or in a logical position (e.g. after nous):

{
  id: "opencode-zen",
  name: "OpenCode Zen",
  desc: "Pay-as-you-go access to curated coding models",
  tag: "",
  envKey: "OPENCODE_ZEN_API_KEY",
  url: "https://opencode.ai/auth",
  placeholder: "sk-...",
  configProvider: "opencode-zen",
  baseUrl: "",
  needsKey: true,
},
{
  id: "opencode-go",
  name: "OpenCode Go",
  desc: "$10/month subscription for open coding models",
  tag: "",
  envKey: "OPENCODE_GO_API_KEY",
  url: "https://opencode.ai/auth",
  placeholder: "sk-...",
  configProvider: "opencode-go",
  baseUrl: "",
  needsKey: true,
},

4. src/main/provider-registry.ts — Add base URLs to PROVIDER_BASE_URLS:

"opencode-zen": "https://opencode.ai/zen/v1",
"opencode-go": "https://opencode.ai/go/v1",

Why no dashboardModelMatches fix?

The alias resolution (opencodeopencode-zen) happens in the CLI backend. If the desktop's model validation does exact-string comparison and the CLI returns the aliased name, a mismatch may occur. This was observed in the AUR-packaged v0.7.3 binary but may not affect source-built versions. If the desktop uses the raw model.options response as the display value rather than comparing against the requested provider name, no additional fix is needed here.

Verification steps

  1. After building, open Settings → Providers
  2. Select "OpenCode Zen" from the provider dropdown
  3. Pick a model (e.g. deepseek-v4-flash-free)
  4. Send a message — it should route through https://opencode.ai/zen/v1 using OPENCODE_ZEN_API_KEY

Hope this helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions