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
Kimi 2.5 Reasoning Cutoff/Missing when using NVIDIA API #13515
When using the Kimi K2.5 model via the NVIDIA API key, the reasoning process (thinking) is cut off or missing entirely within OpenCode. However, the exact same model and API key work perfectly on the NVIDIA NIM website/playground (no reasoning truncation). Kimi K2.5 free with opencode zen works just fine.
Plugins
None
OpenCode version
1.1.65
Steps to reproduce
use opencode command at the terminal
ctrl + p
press on connect provider
choose Nvidia
submit api key
select Kimi K2.5 under the Nvidia provider section
send prompt (and this should return thinking section)
now observe the end of the thinking section and you will notice reasoning truncation
This issue appears to be a duplicate of or directly related to #11194 ("Last token cut off in thinking"), which also reports Kimi K2.5 reasoning truncation via NVIDIA API. Both issues describe identical symptoms with the same model/provider combination.
Please check #11194 to see if it resolves your issue or if there are any workarounds mentioned in the discussion.
I messed nvidia team, I think this is a bug on their end because we are rendering exactly what the api returns:
data: {"id":"chatcmpl-9dc205430a2de124","object":"chat.completion.chunk","created":1771014517,"model":"moonshotai/kimi-k2.5","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":null},"logprobs":null,"finish_reason":null}],"prompt_token_ids":null}
data: {"id":"chatcmpl-9dc205430a2de124","object":"chat.completion.chunk","created":1771014517,"model":"moonshotai/kimi-k2.5","choices":[{"index":0,"delta":{"reasoning":" The","reasoning_content":" The"},"logprobs":null,"finish_reason":null,"token_ids":null}]}
data: {"id":"chatcmpl-9dc205430a2de124","object":"chat.completion.chunk","created":1771014517,"model":"moonshotai/kimi-k2.5","choices":[{"index":0,"delta":{"reasoning":" user is greeting me casually. I should respond in","reasoning_content":" user is greeting me casually. I should respond in"},"logprobs":null,"finish_reason":null,"token_ids":null}]}
data: {"id":"chatcmpl-9dc205430a2de124","object":"chat.completion.chunk","created":1771014517,"model":"moonshotai/kimi-k2.5","choices":[{"index":0,"delta":{"content":" Hey! Not","reasoning_content":null},"logprobs":null,"finish_reason":null,"token_ids":null}]}
data: {"id":"chatcmpl-9dc205430a2de124","object":"chat.completion.chunk","created":1771014517,"model":"moonshotai/kimi-k2.5","choices":[{"index":0,"delta":{"content":" much, just here to help. What can I","reasoning_content":null},"logprobs":null,"finish_reason":null,"token_ids":null}]}
data: {"id":"chatcmpl-9dc205430a2de124","object":"chat.completion.chunk","created":1771014517,"model":"moonshotai/kimi-k2.5","choices":[{"index":0,"delta":{"content":" do for you today?","reasoning_content":null},"logprobs":null,"finish_reason":"stop","stop_reason":163586,"token_ids":null}]}
data: {"id":"chatcmpl-9dc205430a2de124","object":"chat.completion.chunk","created":1771014517,"model":"moonshotai/kimi-k2.5","choices":[],"usage":{"prompt_tokens":13389,"total_tokens":13426,"completion_tokens":37}}
data: [DONE]
So I just tried the nvidia api with python (the code is provided at the nvidia website) but no reasoning truncation happened. So I think the problem lies with opencode.
github won't let me upload the files so had to make a shorter one. here is the code:
#!/usr/bin/env python3importjsonimportrequests# API callr=requests.post("https://integrate.api.nvidia.com/v1/chat/completions",
headers={"Authorization": "Bearer API-KEY",
"Accept": "text/event-stream"},
json={"model": "moonshotai/kimi-k2.5", "messages": [{"role": "user", "content": "In a world where gravity pushes objects upward and water is solid at room temperature, explain how a person would boil a pot of tea."}],
"max_tokens": 16384, "temperature": 1.0, "top_p": 1.0, "stream": True, "chat_template_kwargs": {"thinking": True}})
# Stream to console and collectlines= []
forlinr.iter_lines():
ifl:
d=l.decode()
print(d)
lines.append(d)
withopen("response.json", "w") asf:
json.dump({"streamed_response": lines}, f)
run the code and you can see that the reasoning works fine so it is opencode that's the problem.
Yeah If I disable tools on opencode it stops happening.
Seems like an nvidia bug to me.
My bad, I totally forgot about the tool calls. I made a api request with weather tool enabled and asked for weather for a city and got a successful response? Tools seem to work on the website.
I'm not really sure what it is, but when I copy the opencode tools into the python example it starts to malfunction
Given that we use the exact same code path for nvidia as we do all other openai compat providers, I think this is a bug on their end. Almost all the providers have weird bugs.
I could be totally wrong but most of the time I investigate these cases I find bugs. So far I've found bugs in:
Activity
github-actions commentedon Feb 13, 2026
This issue appears to be a duplicate of or directly related to #11194 ("Last token cut off in thinking"), which also reports Kimi K2.5 reasoning truncation via NVIDIA API. Both issues describe identical symptoms with the same model/provider combination.
Please check #11194 to see if it resolves your issue or if there are any workarounds mentioned in the discussion.
rekram1-node commentedon Feb 13, 2026
Investigating...
rekram1-node commentedon Feb 13, 2026
Interesting
rekram1-node commentedon Feb 13, 2026
I messed nvidia team, I think this is a bug on their end because we are rendering exactly what the api returns:
Phouter0499 commentedon Feb 13, 2026
Are you sure? cause when I tried using it in the website, it worked perfectly without any reasoning truncation. Here is an image:
No truncation at the end.
rekram1-node commentedon Feb 13, 2026
Yeah I just don't know what would cause that.
Phouter0499 commentedon Feb 13, 2026
So I just tried the nvidia api with python (the code is provided at the nvidia website) but no reasoning truncation happened. So I think the problem lies with opencode.
rekram1-node commentedon Feb 13, 2026
@Phouter0499 send example?
rekram1-node commentedon Feb 13, 2026
If you are using a non streaming example then it's not the same type of request..
Phouter0499 commentedon Feb 13, 2026
github won't let me upload the files so had to make a shorter one. here is the code:
run the code and you can see that the reasoning works fine so it is opencode that's the problem.
Phouter0499 commentedon Feb 13, 2026
the default example uses streaming.
rekram1-node commentedon Feb 13, 2026
If I pass tools to nvidia I replicate the issue using ur snippet.
rekram1-node commentedon Feb 13, 2026
Yeah If I disable tools on opencode it stops happening.
Seems like an nvidia bug to me.
Phouter0499 commentedon Feb 13, 2026
My bad, I totally forgot about the tool calls. I made a api request with weather tool enabled and asked for weather for a city and got a successful response? Tools seem to work on the website.
rekram1-node commentedon Feb 14, 2026
I'm not really sure what it is, but when I copy the opencode tools into the python example it starts to malfunction
Given that we use the exact same code path for nvidia as we do all other openai compat providers, I think this is a bug on their end. Almost all the providers have weird bugs.
I could be totally wrong but most of the time I investigate these cases I find bugs. So far I've found bugs in:
Phouter0499 commentedon Feb 14, 2026
@rekram1-node This issue doesn't look like it will be fixed anytime soon but thank you for all the responses anyways.
Yuxiza commentedon Feb 26, 2026
also found in GLM5 provide by nvidia. the cutoff also lead to failure tool call. this issue also appears on nvidia nim's web app.
using default parameters with prompt "使用tool call,测试提供给你的工具。" (Use tool calls to test the tools provided to you.)
the hex color was cutoff in the response. i think this is an nvidia bug
Yuxiza commentedon Feb 26, 2026
everything looks fine when not using the stream API. if so, #14786 might be helpful as a work around.
zanellig commentedon Mar 26, 2026
Same happening here, seems like NVIDIA's NIM problem.
github-actions commentedon Jul 3, 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.