feat(models): add OpenCode Go provider - #3866
Open
DaweiTian wants to merge 10 commits into
Open
Conversation
…ls over an OpenAI-compatible API. OpenCode Go is a low-cost ($10/month) subscription gateway from OpenCode that gives reliable access to curated open coding models. This Dify plugin exposes those models as a first-class LLM provider. What you get • Predefined models from the OpenCode Go catalog (GLM-5.x, Kimi K2/K3, DeepSeek V4, MiMo-V2.5, MiniMax M3/M2.x, Qwen3.x, LongCat-2.0, Hy3/Hy4, and more) • Custom model support for newly added model IDs • Streaming and non-streaming chat completions • Tool / function calling on models that support it • Default base URL: https://opencode.ai/zen/go/v1 OpenCode Go client requirements OpenCode Go asks clients to identify themselves and send a stable session id. This plugin automatically includes: • User-Agent: dify-opencode-go-plugin/0.1.0 (not a generic SDK name) • x-opencode-session: dify-opencode-go/<client-id>/<dify-user> — collision-resistant and stable per Dify user Setup 1. Subscribe to OpenCode Go at https://opencode.ai/auth and copy your API key. 2. Install this plugin in Dify. 3. Go to Settings → Model Providers → OpenCode Go, paste the API key, and save. 4. Select an OpenCode Go model in your app. Notes • This plugin uses the OpenAI-compatible path (POST {base}/chat/completions). • Some gateway models that only speak the OpenAI Responses API (e.g. Grok 4.6, GPT 5.6 Luna) are not included as predefined models. • Unofficial community plugin. Not affiliated with OpenCode / Anomaly or Dify. • Docs: https://opencode.ai/docs/go/
5 tasks
crazywoola
previously approved these changes
Sep 11, 2026
crazywoola
had a problem deploying
to
models/opencode-go
September 11, 2026 14:25 — with
GitHub Actions
Failure
set author to langgenius and drop build artifacts
crazywoola
approved these changes
Sep 14, 2026
crazywoola
had a problem deploying
to
models/opencode-go
September 14, 2026 01:31 — with
GitHub Actions
Failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a new OpenCode Go model provider for Dify.
OpenCode Go recently introduced stricter client requirements for its gateway. This plugin implements them natively so Dify apps can call Go models without being treated as a generic/abusive client.
OpenCode Go API client requirements → how this plugin addresses them
User-Agent: dify-opencode-go-plugin/0.1.0on every requestx-opencode-sessionfor routing & prompt-cache affinityx-opencode-session: dify-opencode-go/<client-id>/<dify-user>— namespaced, collision-resistant, stable per Dify user (avoids bare ids likeest-user/ short numeric ids that can collide across workspaces)POST {base}/chat/completionswith defaulthttps://opencode.ai/zen/go/v1Reference: OpenCode Go — Where can I use it?
What else is included
Release Notes
User-Agentand namespacedx-opencode-sessionheader for routing and prompt cachingChange Type
Screenshots / Videos
LLM Plugin Checklist
Areas affected by this change (check all that apply)
Version
versioninmanifest.yaml(not the one undermeta)dify_plugindeclared inpyproject.tomlTesting
Verified against a live OpenCode Go key:
GET /zen/go/v1/modelsreturns the catalogchat/completionssucceed for GLM / Kimi / DeepSeek / MiMo / Qwen / Hy / MiniMax M3x-opencode-sessionDocs: https://opencode.ai/docs/go/