anomalyco / anomalyco/opencode

[FEATURE]:Native provider support and specialized system prompts for domestic LLMs (DeepSeek, Qwen, GLM)

Open
#46,366 1 comment 0 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Aug 31, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
🎯 Problem Statement

Currently, OpenCode provides excellent built-in, per-model optimized system prompts for Western models like Anthropic's Claude, OpenAI's GPT, and Google's Gemini. However, to use top-tier domestic models such as DeepSeek-R1/V4, Qwen-2.5-Coder, or GLM-4, users have to rely on the generic openai-compatible adapter.

While these models are highly capable, a one-size-fits-all generic prompt often causes suboptimal performance. For instance:

  • DeepSeek-R1 cannot fully leverage its <think> tag workflows inside OpenCode's agent tool loop.
  • Qwen-Coder occasionally generates slight format discrepancies when producing structural JSON/XML Diff patches under general prompts, leading to tool-calling failures.
✨ Proposed Solution

I propose introducing native provider drivers and specialized system prompts (.txt templates) tailored for these leading domestic LLMs:

  1. Dedicated System Prompts: Add specific routing for deepseek.txt and qwen.txt inside the core prompt manager, optimizing tool-calling constraints and Diff patch consistency for them.
  2. DeepSeek Reasoner Adaptation: Optimize the prompt to explicitly instruct DeepSeek models to cleanly handle thinking blocks without breaking the terminal streaming or UI parsing.
  3. First-class Config Support: Allow users to specify "provider": "deepseek" or "provider": "dashscope" (Qwen) natively in opencode.jsonc, rather than nesting them under openai-compatible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.