dockerfile里安装:
bash展开代码# 安装 Node.js 和 npm
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm
# 安装 opencode-ai
RUN npm install -g opencode-ai@latest
自定义模型,工程下面创建opencode.json写上自己的模型:
bash展开代码{
"$schema": "https://opencode.ai/config.json",
"model": "xx/claude-3-7-sonnet-20250219",
"provider": {
"stepfun": {
"npm": "@ai-sdk/openai-compatible",
"name": "xx Models Proxy",
"options": {
"baseURL": "https://models-proxy.xx-inc.com/v1"
},
"models": {
"claude-3-7-sonnet-20250219": {
"name": "Claude 3.7 Sonnet 20250219"
}
}
}
}
}


本文作者:Dong
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC。本作品采用《知识共享署名-非商业性使用 4.0 国际许可协议》进行许可。您可以在非商业用途下自由转载和修改,但必须注明出处并提供原作者链接。 许可协议。转载请注明出处!