OpenCode: how to configure Inline Prompts? #3102
Closed
stonemaster
started this conversation in
General
Replies: 1 comment 1 reply
|
Ok I got to work now. I was near but I think I missed that GO doesn't use a prefix (opencode-go) in the HTTP mode: opts = {
adapters = {
http = {
opencode_http = function()
return require("codecompanion.adapters").extend("openai_compatible", {
env = {
api_key = "OPENCODE_API_KEY",
url = "https://opencode.ai/zen/go",
},
schema = {
model = {
default = "qwen3.6-plus", -- No opencode-go prefix here
},
},
})
end,
},
},
interactions = {
inline = {
adapter = "opencode_http",
},
chat = {
adapter = "opencode",
model = "opencode-go/qwen3.6-plus",
},
},
},A thing like that might make sense to put in the documentation so if the maintainers agree, I'll happily create a PR :-) Thanks for a great plugin btw! |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I recently switch from Copilot to Opencode.ai (Go) to evaluate the quality of models. While the chat/agentic mode works perfectly fine, the inline feature fails with
Only HTTP adapters are for inline interactions.Has anybody managed to get the opencode.ai API working? I tried to set the API endpoint to https://opencode.ai/zen/go/v1/chat/completions but I am getting a 404 error there 🤔
All reactions