Skip to content

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

Closed as not planned

Description

@huangxiaonian93

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.

Activity

  1. github-actions commented on Aug 31, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your request is specifically about specialized per-model system prompts (the deepseek.txt/qwen.txt templates and tool-calling optimizations), that portion appears distinct and not covered by existing issues.

  2. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    Thanks for the suggestion. DeepSeek, Qwen (Alibaba / DashScope) and GLM (Zhipu AI / Z.ai) are already built-in providers: pick them in /connect and they work without a custom openai-compatible setup. V2 also handles DeepSeek's reasoning output natively.

    We're not planning separate per-model system prompts for these models right now. If you want to tune the prompt for one of them, a custom agent can set its own system prompt: https://opencode.ai/v2/docs/agents#system. Closing as not planned.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions