Skip to content

Kimi 2.5 Reasoning Cutoff/Missing when using NVIDIA API #13515

Closed as not planned

Description

@Phouter0499

Description

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

  1. use opencode command at the terminal
  2. ctrl + p
  3. press on connect provider
  4. choose Nvidia
  5. submit api key
  6. select Kimi K2.5 under the Nvidia provider section
  7. send prompt (and this should return thinking section)
  8. now observe the end of the thinking section and you will notice reasoning truncation

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04

Terminal

bash

Activity

  1. github-actions commented on Feb 13, 2026

    @github-actions
    Contributor

    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.

  2. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor

    Investigating...

  3. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor
    Image

    Interesting

  4. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor

    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]
    
  5. Phouter0499 commented on Feb 13, 2026

    @Phouter0499
    Author

    I messed nvidia team, I think this is a bug on their end because we are rendering exactly what the api returns:

    Are you sure? cause when I tried using it in the website, it worked perfectly without any reasoning truncation. Here is an image:

    Image

    No truncation at the end.

  6. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor

    Yeah I just don't know what would cause that.

  7. Phouter0499 commented on Feb 13, 2026

    @Phouter0499
    Author

    Yeah I just don't know what would cause that.

    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.

  8. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor

    @Phouter0499 send example?

  9. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor

    If you are using a non streaming example then it's not the same type of request..

  10. Phouter0499 commented on Feb 13, 2026

    @Phouter0499
    Author

    @Phouter0499 send example?

    github won't let me upload the files so had to make a shorter one. here is the code:

    #!/usr/bin/env python3
    import json
    import requests
    
    # API call
    r = 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 collect
    lines = []
    for l in r.iter_lines():
        if l:
            d = l.decode()
            print(d)
            lines.append(d)
    with open("response.json", "w") as f:
        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.

  11. Phouter0499 commented on Feb 13, 2026

    @Phouter0499
    Author

    If you are using a non streaming example then it's not the same type of request..

    the default example uses streaming.

  12. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor

    If I pass tools to nvidia I replicate the issue using ur snippet.

  13. rekram1-node commented on Feb 13, 2026

    @rekram1-node
    Contributor

    Yeah If I disable tools on opencode it stops happening.

    Seems like an nvidia bug to me.

  14. Phouter0499 commented on Feb 13, 2026

    @Phouter0499
    Author

    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.

  15. rekram1-node commented on Feb 14, 2026

    @rekram1-node
    Contributor

    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:

    • ollama
    • cloudflare ai gateway
    • minimax
    • deepinfra
    • baseten
  16. Phouter0499 commented on Feb 14, 2026

    @Phouter0499
    Author

    @rekram1-node This issue doesn't look like it will be fixed anytime soon but thank you for all the responses anyways.

  17. Yuxiza commented on Feb 26, 2026

    @Yuxiza

    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.)

    Image

    the hex color was cutoff in the response. i think this is an nvidia bug

  18. Yuxiza commented on Feb 26, 2026

    @Yuxiza

    everything looks fine when not using the stream API. if so, #14786 might be helpful as a work around.

  19. zanellig commented on Mar 26, 2026

    @zanellig

    Same happening here, seems like NVIDIA's NIM problem.

  20. removed
    bugSomething isn't working
    zenRelates to Zen
    on May 3, 2026
  21. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions