惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
腾讯CDC
博客园_首页
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
有赞技术团队
有赞技术团队
博客园 - 叶小钗

博客园 - Dsp Tian

MMDiT 骨干网络详解 DiT (Diffusion Transformer) 骨干网络详解 Flow Matching 原理与 MNIST 条件生成实践 Claude Code 自动推送测试 ssh端口转发 【Python】使用uv虚拟环境 解决ModuleNotFoundError: No module named 'pkg_resources' 配置Nginx反向代理 【Python】大模型工具调用 Claude Code配置Qwen3-Coder 【Python】vllm部署调用Qwen3-VL make指定安装目录 解决colcon编译卡死 【Python】调用C++ 深度学习(Grad-CAM) 深度学习(CVAE) 深度学习(DBBNet重参数化) 深度学习(视觉注意力SeNet/CbmaNet/SkNet/EcaNet) 深度学习(ACNet重参数化) 深度学习(RepVGG重参数化) 深度学习(修改onnx文件batchsize) 【Python】生成git仓库贡献热力图 深度学习(onnx量化) 深度学习(pytorch量化) cmake构建后执行命令
OpenCode + Oh My OpenCode配置Qwen3-Coder
Dsp Tian · 2026-01-24 · via 博客园 - Dsp Tian

1. 下载Qwen3-Coder模型:

modelscope download --model Qwen/Qwen3-Coder-30B-A3B-Instruct --local_dir ./

2. vllm带工具参数启动模型:

vllm serve Qwen/Qwen3-Coder-30B-A3B-Instruct   --tensor-parallel-size 2   --enable-auto-tool-choice   --tool-call-parser qwen3_coder

3. 安装OpenCode:

curl -fsSL https://opencode.ai/install | bash

4. 安装bun:

curl -fsSL https://bun.sh/install | bash

5. 安装Oh My OpenCode(这里用本地部署的Qwen3,全部选no):

bunx oh-my-opencode install --no-tui --claude=no --chatgpt=no --gemini=no

6. 安装完成后在/home/xx/.config/opencode/目录下会有 opencode.json和 oh-my-opencode.json两个文件,修改如下:

 opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "local": {
      "options": {
        "baseURL": "http://127.0.0.1:8000/v1",
        "apiKey": "API_KEY"
      },
      "models": {
        "Qwen/Qwen3-Coder-30B-A3B-Instruct": {
          "name": "Qwen/Qwen3-Coder-30B-A3B-Instruct",
          "reasoning": true,
          "tool_call": true
        }
      }
    }
  },
  "plugin": [
    "oh-my-opencode"
  ]
}

oh-my-opencode.json:

{
  "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
  "agents": {
    "Sisyphus": {
      "model": "Qwen/Qwen3-Coder-30B-A3B-Instruct"
    },
    "librarian": {
      "model": "Qwen/Qwen3-Coder-30B-A3B-Instruct"
    },
    "explore": {
      "model": "Qwen/Qwen3-Coder-30B-A3B-Instruct"
    },
    "oracle": {
      "model": "Qwen/Qwen3-Coder-30B-A3B-Instruct"
    },
    "frontend-ui-ux-engineer": {
      "model": "Qwen/Qwen3-Coder-30B-A3B-Instruct"
    },
    "document-writer": {
      "model": "Qwen/Qwen3-Coder-30B-A3B-Instruct"
    },
    "multimodal-looker": {
      "model": "Qwen/Qwen3-Coder-30B-A3B-Instruct"
    }
  }
}

7. 终端输入opencode启动软件,首先输入/connect选择provider,输入local(和opencode.json中的provider配置对应),API KEY可以任意给定,选择模型之后就能正常使用了。

8. 效果如下:

Screenshot from 2026-01-23 19-54-50

参考:How to connect opencode to local Qwen3 Coder 30B and create your own self-hosted Claude Code alternative. | by Lexy EYN | Medium