Skip to content

feat(provider): add OpenCode Zen and OpenCode Go providers - #765

Closed
DevAgarwal2 wants to merge 1 commit into
NousResearch:mainfrom
DevAgarwal2:feat/opencode-providers
Closed

feat(provider): add OpenCode Zen and OpenCode Go providers#765
DevAgarwal2 wants to merge 1 commit into
NousResearch:mainfrom
DevAgarwal2:feat/opencode-providers

Conversation

@DevAgarwal2

@DevAgarwal2 DevAgarwal2 commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Added support for two new model providers from OpenCode.

OpenCode Zen

Pay-as-you-go access to 35+ curated models:

  • GPT 5.x series (5.4-pro, 5.4, 5.3-codex, etc.)
  • Claude Opus/Sonnet/Haiku (4.6, 4.5, 4, etc.)
  • Gemini 3.x series (3.1-pro, 3-pro, 3-flash)
  • MiniMax M2.5, GLM 5/4.7/4.6, Kimi K2.5/K2, Qwen3 Coder, Big Pickle
  • API endpoint: https://opencode.ai/zen/v1

OpenCode Go

$10/month subscription for open models:

Usage

hermes model opencode-zen:gpt-5.3-codex
hermes model zen:claude-opus-4-6
hermes model go:kimi-k2.5

Files Changed

  • hermes_cli/auth.py - Provider registration with API key auth
  • hermes_cli/config.py - OPENCODE_ZEN_API_KEY, OPENCODE_GO_API_KEY env vars
  • hermes_cli/models.py - Model catalogs and provider aliases
  • agent/model_metadata.py - Context lengths for all models
  • .env.example - Documentation

API Keys

Get keys at https://opencode.ai/auth

Add support for OpenCode AI providers:
- OpenCode Zen: pay-as-you-go access to 35+ curated models (GPT, Claude, Gemini, etc.)
- OpenCode Go: /month subscription for open models (GLM-5, Kimi K2.5, MiniMax M2.5)

Changes:
- Register providers in auth.py with base URLs
- Add env vars (OPENCODE_ZEN_API_KEY, OPENCODE_GO_API_KEY)
- Add model catalogs (35 models for Zen, 3 for Go)
- Add context lengths for all models
- Add provider labels and aliases
- Update .env.example with documentation

Usage:
  hermes model opencode-zen:gpt-5.3-codex
  hermes model opencode-go:kimi-k2.5
  hermes model zen:claude-opus-4-6
@DevAgarwal2
DevAgarwal2 force-pushed the feat/opencode-providers branch 2 times, most recently from 5959909 to 4365c1a Compare March 10, 2026 03:58
@Allmight97

Copy link
Copy Markdown

Thanks for putting this together. The provider presets and model list are useful prior art, but I think the provider model here is still incomplete for how OpenCode actually works.

Three concrete issues:

  1. OpenCode Go and OpenCode Zen should not be modeled as separate credentials. They are separate provider products, but they sit behind the same OpenCode account/auth surface, so Hermes should use one canonical OPENCODE_API_KEY and let the user choose OpenCode Go vs OpenCode Zen explicitly.

  2. Onboarding needs to expose both products directly. Right now this adds provider IDs and model aliases, but a new Hermes user still cannot choose OpenCode Go or OpenCode Zen during setup in the same first-class way as the other providers.

  3. Hermes currently resolves one runtime transport per provider, but OpenCode needs transport selection by provider + model family, not just provider. Zen is not one OpenAI-compatible endpoint: OpenAI-family traffic goes through a Responses path, Anthropic-family traffic goes through a Messages path, and Gemini-family traffic uses a different path again. Go also differs from Zen in model discovery behavior.

Because of that, I think the clean path is:

  • first, a small runtime abstraction PR so Hermes can resolve transport from provider + selected model
  • then, a focused provider/onboarding PR for opencode-go and opencode-zen using one canonical OPENCODE_API_KEY

I’m working on that approach from a fresh branch off current upstream main so the follow-up is reviewable and based on the latest code.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for this! The code looks clean and follows our provider patterns correctly.

Before we move forward, could you share screenshots showing it working end-to-end? Specifically:

  1. The hermes model command showing OpenCode Zen/Go as available providers
  2. The model selection step (after picking the provider) showing the models list populating correctly
  3. A conversation with the banner visible showing the provider:model string, confirming a response comes back

We don't have OpenCode subscriptions on our end so we can't test this ourselves. Once we can see it working we'll reconsider — thanks!

@DevAgarwal2

Copy link
Copy Markdown
Contributor Author

Thanks for this! The code looks clean and follows our provider patterns correctly.

Before we move forward, could you share screenshots showing it working end-to-end? Specifically:

  1. The hermes model command showing OpenCode Zen/Go as available providers
  2. The model selection step (after picking the provider) showing the models list populating correctly
  3. A conversation with the banner visible showing the provider:model string, confirming a response comes back

We don't have OpenCode subscriptions on our end so we can't test this ourselves. Once we can see it working we'll reconsider — thanks!

yeah sure bro
Screenshot 2026-03-11 at 2 05 13 PM
Screenshot 2026-03-11 at 2 06 27 PM

@Allmight97

Copy link
Copy Markdown

I got it working fine as well from the onboarding page. Works fine! Highly recommend adding opencode go/zen support as they are starting to become a serious alternative to Openrouter.

@xamey

xamey commented Mar 13, 2026

Copy link
Copy Markdown

I agree, their plan is highly competitive

@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #1650. Your provider registrations, model catalogs, and context lengths were preserved with authorship. I completed the integration by adding the missing setup wizard branches (hermes_cli/setup.py), model flow dispatch (hermes_cli/main.py), and aux model defaults (agent/auxiliary_client.py) that are needed on current main. Thanks @DevAgarwal2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants