opencode go
Question
目前是不支持接入 opencode go 吗?
可以用,url用”https://opencode.ai/zen/go/v1“
不过有点玄学,切一下模型或者/exit在进入试试
打算后面再试试看,配置以后model列表不显示;correct也找不到该供应商,deepseek倒是正常
供应商 id 不要写 opencode 或者包含 opencode 的字符串。可以写 oc,然后名字可以写 opencode。他这个过滤了 id 包含 opencode 的供应商。你可以直接打开配置文件把你添加的 opencode 供应商 id 给换掉。~/.config/mimocode/mimocode.jsonc
刚刚检查代码看了下,mimo-free.ts 里,在加入 mimo免费模型后,会把opencode 和 opencode-go供应商加入disabled_providers。他的原意是为了屏蔽掉 opencode 里的免费模型,但是把付费供应商也给误杀了
I want to try this, but how do I configure it? Can you share an example of the config block?
I want to try this, but how do I configure it? Can you share an example of the config block?
在 mimocode.jsonc 的provider 块中,增加
"oc": {
"name": "OpenCode GO",
"npm": "@ai-sdk/openai-compatible", //如果需要使用MiniMax/Qwen,则把 npm 的值改为 @ai-sdk/anthropic
"options": {
"baseURL": "https://opencode.ai/zen/go/v1",
"apiKey":"<apikey>"
},
"models": {
"kimi-k2.6": {
"name": "Kimi K2.6"
},
"deepseek-v4-flash": {
"name": "Deepseek V4 Flash"
}
//若 npm 的值是@ai-sdk/openai-compatible,只能写支持chat/completions接口的opencode模型
//若 npm 的值是@ai-sdk/anthropic,则只能写/v1/messages接口的模型。
//可用模型可以参考文档:https://opencode.ai/docs/go/
}
}
Thank you @Lemonbx 🚀
Translated version in English (for others like me 😅).:
In the provider block of mimocode.jsonc, add:
"oc": {
"name": "OpenCode GO",
"npm": "@ai-sdk/openai-compatible", // If you need to use MiniMax/Qwen, change the npm value to @ai-sdk/anthropic
"options": {
"baseURL": "https://opencode.ai/zen/go/v1",
"apiKey": "<apikey>"
},
"models": {
"kimi-k2.6": {
"name": "Kimi K2.6"
},
"deepseek-v4-flash": {
"name": "Deepseek V4 Flash"
}
// If npm is @ai-sdk/openai-compatible, you can only list OpenCode models that support the chat/completions API.
// If npm is @ai-sdk/anthropic, you can only list models that support the /v1/messages API.
// Available models can be found in the documentation: https://opencode.ai/docs/go/
}
}
Why the OpenCode free and Go models disabled?
这个问题在我的issue已经修复,https://github.com/XiaomiMiMo/MiMo-Code/issues/1216 有时候就得较真,你知道吧?