












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. 效果如下:

此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。