You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: OpenCode Go + Kimi K2.6/K2.5 returns 'Provider returned error' on CLI 1.14.20 #23887
OpenCode Go provider works perfectly for all models except Kimi K2.6 and K2.5, which consistently return "Provider returned error". Other models (GLM-5, Qwen3.5 Plus, MiniMax M2.5/M2.7) under the same OpenCode Go subscription work fine.
Environment
OpenCode Version: 1.14.20
OS: macOS
Provider: OpenCode Go (paid subscription, $10/month)
Affected Models: kimi-k2.6, kimi-k2.5
Working Models: glm-5, glm-5.1, qwen3.5-plus, minimax-m2.5, minimax-m2.7
Steps to Reproduce
Run opencode and connect to OpenCode Go via /connect
Select kimi-k2.6 from /models
Send any message (e.g., "hi")
Observe: "Provider returned error" appears immediately
Evidence
Same API key works with Kimi on other clients: The exact same OpenCode Go API key works perfectly with Kimi K2.6 on:
OpenClaw gateway (same machine, different session)
OpenCode Zen provider (same machine, different provider selection)
This rules out API key invalidity or server-side Kimi outage.
Troubleshooting Already Attempted
Cleared ~/.local/share/opencode and re-authenticated
Cleared ~/.cache/opencode to force provider package re-download
Reinstalled opencode-ai globally via npm
Changed network (WiFi → mobile hotspot) to rule out IP-based blocking
Verified same API key works with other OpenCode Go models
Verified same API key works with Kimi on OpenCode Zen
Expected Behavior
Kimi K2.6/K2.5 should work through OpenCode Go provider, just like GLM-5 and Qwen3.5 Plus do.
Actual Behavior
Only Kimi models fail with a generic "Provider returned error" message. No detailed error code or HTTP status is exposed in the UI.
Additional Context
This appears similar to previously reported issues:
However, in this case the API key is definitively valid (works on Zen and other models), and the error persists across cache clears, reinstalls, and network changes.
I've already tried all workarounds mentioned in #16685 and #23665 (cache clear, reinstall, network change). The issue persists. My case includes K2.6 as well, and I've confirmed the API key works via Zen and OpenClaw. Please keep this open.
Reacted by Alex Ruiz, jesusvillalba-tf, Antar Basil and ronisetiawan19
Update: Even with , the error is completely opaque:
No HTTP status code, no response body, no provider-specific error details are exposed. This matches the exact behavior described in #23665 where the provider package swallows the actual Kimi/Moonshot API error.
Update: Even with --log-level DEBUG, the error is completely opaque. No HTTP status code, no response body, no provider-specific error details are exposed. This matches the exact behavior described in #23665 where the provider package swallows the actual Kimi/Moonshot API error.
I struggled to find a way to fix this issue without changing / custom build the opencode source code. I discovered that the problem seems came from the tool call, specifically related to registered MCPs. In my case, the "stitch" MCP was causing the error, once I removed it, everything ran smoothly without that persistent error. I suggest trying to remove any custom MCPs or configurations if you're seeing something similar.
Reacted by Pedro Santos Cabral, Byungsker, Eric, sergeilapp, Ketan Choyal, Jose Manuel Hernandez Farias, Ivan Bongiovanni, Luis Diego Cubero Chavarría, Thai NT, Muhammad Aulia Rasyid and 11 more
Reacted by Andres Palacios, Jose Manuel Hernandez Farias, Ivan Bongiovanni, Thai NT, Muhammad Aulia Rasyid, Fernando Lemos, Vuong, Rizki Budi Prasetyo, Mohamed Masoud and Ismael Ash
Reacted by Byungsker, Eric, Jose Manuel Hernandez Farias, Ivan Bongiovanni, Thai NT, Muhammad Aulia Rasyid, Fernando Lemos, Vuong, Rizki Budi Prasetyo, Mohamed Masoud and 1 more
I struggled to find a way to fix this issue without changing / custom build the opencode source code. I discovered that the problem seems came from the tool call, specifically related to registered MCPs. In my case, the "stitch" MCP was causing the error, once I removed it, everything ran smoothly without that persistent error. I suggest trying to remove any custom MCPs or configurations if you're seeing something similar.
this worked for me, thanks!
Reacted by Nathanael Valentino Davis and Byungsker
I struggled to find a way to fix this issue without changing / custom build the opencode source code. I discovered that the problem seems came from the tool call, specifically related to registered MCPs. In my case, the "stitch" MCP was causing the error, once I removed it, everything ran smoothly without that persistent error. I suggest trying to remove any custom MCPs or configurations if you're seeing something similar.
Oh, I followed your instructions, and now Kimi is working perfectly! Thank you @nathandavismem ! 👍🏻
In my specific case, Kimi started working as soon as I disabled my custom MCP, figma-console.
However, while this serves as a temporary workaround, I'm not sure if the root cause of the problem has actually been resolved. Shouldn't Kimi—which I access via an OpenCode Go subscription—function without issues regardless of which MCP I happen to be using?
I struggled to find a way to fix this issue without changing / custom build the opencode source code. I discovered that the problem seems came from the tool call, specifically related to registered MCPs. In my case, the "stitch" MCP was causing the error, once I removed it, everything ran smoothly without that persistent error. I suggest trying to remove any custom MCPs or configurations if you're seeing something similar.
It worked for me, but i have remove complete mcp from the config
However, while this serves as a temporary workaround, I'm not sure if the root cause of the problem has actually been resolved. Shouldn't Kimi—which I access via an OpenCode Go subscription—function without issues regardless of which MCP I happen to be using?
Yeah, it's probably an issue with the provider tools handler. I've seen similar reports, but the root causes were different. Either way, Kimi providers should work fine with any MCP or plugins.
I struggled to find a way to fix this issue without changing / custom build the opencode source code. I discovered that the problem seems came from the tool call, specifically related to registered MCPs. In my case, the "stitch" MCP was causing the error, once I removed it, everything ran smoothly without that persistent error. I suggest trying to remove any custom MCPs or configurations if you're seeing something similar.
It worked for me, but i have remove complete mcp from the config
I am getting the same error without any MCPs installed and there does not seem to be a way to resolve it in this case. I am in a deep session that seems borked with not way for me to continue as far as I can tell.
Reacted by Allyn, Yami, Phil, Intedya-Cibersecurity and Quack
Me costó encontrar una solución a este problema sin modificar ni compilar a medida el código fuente de OpenCode. Descubrí que el problema parecía provenir de la llamada a la herramienta, específicamente de los MCP registrados. En mi caso, el MCP "stitch" era el causante del error; una vez que lo eliminé, todo funcionó correctamente sin ese error persistente. Sugiero intentar eliminar cualquier MCP o configuración personalizada si experimentas algo similar.
I struggled to find a way to fix this issue without changing / custom build the opencode source code. I discovered that the problem seems came from the tool call, specifically related to registered MCPs. In my case, the "stitch" MCP was causing the error, once I removed it, everything ran smoothly without that persistent error. I suggest trying to remove any custom MCPs or configurations if you're seeing something similar.
I was able to resolve the issue by disabling Stitch MCP. I left my other MCP servers enabled. Thanks for the suggestion.
I have this just now from kimi and deepseek in GO, but i dont know this is diffrent issue :(
kimi
Server: cloudflare\n\nBody:\n{\"error\":{\"message\":\"Error from provider: Provider returned error\",\"code\":400,\"metadata\":{\"raw\":\"{\\\"error\\\":{\\\"message\\\":\\\"thinking is enabled but reasoning_content is missing in assistant tool call message at index 13\\\",\\\"type\\\":\\\"invalid_request_error\\\"}}\",\"provider_name\":\"Moonshot AI\",\"is_byok\":true}},\"user_id\":\"user_2z4xm5LomaIHfsnVqMhFsWrVrGY\"}
deepseek
Server: cloudflare\n\nBody:\n{\"error\":{\"message\":\"Error from provider (DeepSeek): The `reasoning_content` in the thinking mode must be passed back to the API.\",\"type\":\"invalid_request_error\",\"param\":null,\"code\":\"invalid_request_error\"}}\n"
Yes. #37496 I made an issue.
I have tried with --pure, disabled oh-my-opencode, ponytail, herdr-agent-state plugins and icm. No luck, then i disabled Gitnexus mcp and that appears to be the offending actor.
Activity
github-actions commentedon Apr 22, 2026
This issue might be a duplicate of existing issues. Please check:
byungsker commentedon Apr 22, 2026
I've already tried all workarounds mentioned in #16685 and #23665 (cache clear, reinstall, network change). The issue persists. My case includes K2.6 as well, and I've confirmed the API key works via Zen and OpenClaw. Please keep this open.
byungsker commentedon Apr 22, 2026
Update: Even with , the error is completely opaque:
No HTTP status code, no response body, no provider-specific error details are exposed. This matches the exact behavior described in #23665 where the provider package swallows the actual Kimi/Moonshot API error.
byungsker commentedon Apr 22, 2026
Update: Even with --log-level DEBUG, the error is completely opaque. No HTTP status code, no response body, no provider-specific error details are exposed. This matches the exact behavior described in #23665 where the provider package swallows the actual Kimi/Moonshot API error.
nathandavismem commentedon Apr 22, 2026
I struggled to find a way to fix this issue without changing / custom build the opencode source code. I discovered that the problem seems came from the tool call, specifically related to registered MCPs. In my case, the "stitch" MCP was causing the error, once I removed it, everything ran smoothly without that persistent error. I suggest trying to remove any custom MCPs or configurations if you're seeing something similar.
PedroCabral04 commentedon Apr 23, 2026
this worked for me, thanks!
byungsker commentedon Apr 23, 2026
Oh, I followed your instructions, and now Kimi is working perfectly! Thank you @nathandavismem ! 👍🏻
In my specific case, Kimi started working as soon as I disabled my custom MCP,
figma-console.However, while this serves as a temporary workaround, I'm not sure if the root cause of the problem has actually been resolved. Shouldn't Kimi—which I access via an OpenCode Go subscription—function without issues regardless of which MCP I happen to be using?
chandankumar123456 commentedon Apr 23, 2026
It worked for me, but i have remove complete mcp from the config
nathandavismem commentedon Apr 23, 2026
Yeah, it's probably an issue with the provider tools handler. I've seen similar reports, but the root causes were different. Either way, Kimi providers should work fine with any MCP or plugins.
nathandavismem commentedon Apr 23, 2026
Have you tried removing partial MCPs?
mokafolio commentedon Apr 23, 2026
I am getting the same error without any MCPs installed and there does not seem to be a way to resolve it in this case. I am in a deep session that seems borked with not way for me to continue as far as I can tell.
Andrez421 commentedon Apr 23, 2026
It worked for me, thank you very much
sergeilapp commentedon Apr 23, 2026
I was able to resolve the issue by disabling Stitch MCP. I left my other MCP servers enabled. Thanks for the suggestion.
24 remaining items
rekram1-node commentedon May 4, 2026
Is anyone still having this issue?
jc01rho commentedon May 4, 2026
I have this just now from kimi and deepseek in GO, but i dont know this is diffrent issue :(
kimi
deepseek
desarrollador1IR commentedon May 5, 2026
in my case, the problem was postman's MCP. I disabled it and now Kimi is working again lol
rekram1-node commentedon May 5, 2026
Ill get my PR across the finish line to fix
Anferomol commentedon May 14, 2026
I'm having the same issue. with PI and my IDE Zed. Looks like reasoning is not supported. However, in my hermes-agent everything runs smoothly.
jesusvillalbam commentedon May 28, 2026
Having the same issue from Github Copilot Cli
$env:COPILOT_PROVIDER_TYPE="openai"
$env:COPILOT_PROVIDER_BASE_URL="https://opencode.ai/zen/go/v1"
$env:COPILOT_MODEL="kimi-k2.6"
2026-05-28T16:57:24.329Z [INFO] Using custom provider: type=openai, baseUrl=https://opencode.ai/zen/go/v1, wireApi=completions
2026-05-28T16:57:24.329Z [INFO]
2026-05-28T16:57:24.330Z [INFO] --- Start of group: Custom provider configured settings: ---
2026-05-28T16:57:24.330Z [INFO] --- End of group ---
2026-05-28T16:57:24.428Z [INFO] --- Start of group: Completion request configuration: ---
2026-05-28T16:57:24.429Z [INFO] --- End of group ---
2026-05-28T16:57:24.559Z [INFO] CompactionProcessor: Utilization 17.6% (22574/128000 tokens) below threshold 80%
2026-05-28T16:57:24.560Z [INFO] --- Start of group: Sending request to the AI model ---
2026-05-28T16:57:29.640Z [ERROR] error (Request-ID null)
2026-05-28T16:57:29.650Z [ERROR] {
"status": 400,
"headers": {},
"requestID": null,
"error": {
"message": "Error from provider: Provider returned error",
"code": 400,
"metadata": {
"raw": "{"error":{"message":"Invalid request: tools.function.parameters is not a valid moonshot flavored json schema, details: \u003cAt path 'properties.recommendedAction.$ref': references must start with #/$defs/\u003e","type":"invalid_request_error"}}",
"provider_name": "Moonshot AI",
"is_byok": true
}
},
"code": 400,
"request_id": null,
"ghRequestId": null,
"name": "CAPIError",
"message": "400 Error from provider: Provider returned error",
"stack": "CAPIError: 400 Error from provider: Provider returned error\n at t.fromAPIError (file:///C:/Users/Jesus%20Villalba/AppData/Local/copilot/pkg/win32-x64/1.0.54/app.js:1023:1099)\n at z8e.getCompletionWithTools (file:///C:/Users/Jesus%20Villalba/AppData/Local/copilot/pkg/win32-x64/1.0.54/app.js:3971:32917)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async z8e.getCompletionWithTools (file:///C:/Users/Jesus%20Villalba/AppData/Local/copilot/pkg/win32-x64/1.0.54/app.js:4002:3936)\n at async t.runAgenticLoop (file:///C:/Users/Jesus%20Villalba/AppData/Local/copilot/pkg/win32-x64/1.0.54/app.js:4954:5314)\n at async t.processQueuedItems (file:///C:/Users/Jesus%20Villalba/AppData/Local/copilot/pkg/win32-x64/1.0.54/app.js:4952:12797)\n at async t.processQueue (file:///C:/Users/Jesus%20Villalba/AppData/Local/copilot/pkg/win32-x64/1.0.54/app.js:4952:3448)\n at async t.send (file:///C:/Users/Jesus%20Villalba/AppData/Local/copilot/pkg/win32-x64/1.0.54/app.js:4950:4400)\n at async file:///C:/Users/Jesus%20Villalba/AppData/Local/copilot/pkg/win32-x64/1.0.54/app.js:7735:16969"
}
2026-05-28T16:57:30.651Z [INFO] --- End of group ---
petterssonjonas commentedon Jul 26, 2026
Yes. #37496 I made an issue.
I have tried with --pure, disabled oh-my-opencode, ponytail, herdr-agent-state plugins and icm. No luck, then i disabled Gitnexus mcp and that appears to be the offending actor.
github-actions commentedon Sep 25, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.