Error "reasoning part reasoning-0 not found" from tool calls using GLM 4.5 Air #4015

Open
opened 2026-02-16 17:42:18 -05:00 by yindo · 17 comments
Owner

Originally created by @jhov94 on GitHub (Dec 30, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

I just updated OpenCode from v1.0.163 to v1.0.218 and now tool calls using GLM 4.5 Air result in an error "reasoning part reasoning-0 not found". Prior to updating OpenCode the model had no issues calling tools. It appears that the tool calls finish and the model is able to see the results of the tool call, but is not able to respond. If prompted to continue, it was able to respond as if no error occurred for a while until eventually every prompt to continue resulted in the error.

OpenCode version

1.0.218

Steps to reproduce

  1. Load GLM 4.5 Air (I'm using LMStudio locally)
  2. Have the model attempt a tool call

Screenshot and/or share link

Image

Operating System

Windows 10

Terminal

Powershell 7

Originally created by @jhov94 on GitHub (Dec 30, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description I just updated OpenCode from v1.0.163 to v1.0.218 and now tool calls using GLM 4.5 Air result in an error "reasoning part reasoning-0 not found". Prior to updating OpenCode the model had no issues calling tools. It appears that the tool calls finish and the model is able to see the results of the tool call, but is not able to respond. If prompted to continue, it was able to respond as if no error occurred for a while until eventually every prompt to continue resulted in the error. ### OpenCode version 1.0.218 ### Steps to reproduce 1. Load GLM 4.5 Air (I'm using LMStudio locally) 2. Have the model attempt a tool call ### Screenshot and/or share link ![Image](https://github.com/user-attachments/assets/6a7f607e-2e18-4313-810d-0e13072722db) ### Operating System Windows 10 ### Terminal Powershell 7
yindo added the windowsbug labels 2026-02-16 17:42:18 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 30, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #6039: Malformed thinking block in toolcall (glm-4.7-free) - Similar issue with GLM models reporting errors in thinking/reasoning blocks during tool calls
  • #6418: Error: Invalid signature in thinking block - Related issue with thinking block errors when switching between GLM models and other providers

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 30, 2025): This issue might be a duplicate of existing issues. Please check: - #6039: Malformed thinking block in toolcall (glm-4.7-free) - Similar issue with GLM models reporting errors in thinking/reasoning blocks during tool calls - #6418: Error: Invalid `signature` in `thinking` block - Related issue with thinking block errors when switching between GLM models and other providers Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 30, 2025):

cann u share your config?

@rekram1-node commented on GitHub (Dec 30, 2025): cann u share your config?
Author
Owner

@jhov94 commented on GitHub (Dec 30, 2025):

I also tried it with no options defined for the model since I'm not sure if those options are model specific or not. Here's my config:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "lmstudio": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "LM Studio (local)",
      "options": {
        "baseURL": "http://192.168.0.2:1234/v1"
      },
      "models": {
        "qwen3-30b-a3b-thinking-2507": {
          "name": "Qwen3 30B A3B Thinking 2507",
	         "options": {
            "reasoningEffort": "high",
            "textVerbosity": "low",
            "reasoningSummary": "auto",
            }
        },
        "qwen3-coder-30b-a3b-instruct": {
         "name": "Qwen3 Coder 30B A3B Instruct"
        },
        "gpt-oss-120b": {
         "name": "GPT OSS 120B",
         "options": {
                  "reasoningEffort": "high",
                  "textVerbosity": "low",
                  "reasoningSummary": "auto",
         }
        },
        "bytedance/seed-oss-36b": {
         "name": "Seed OSS 36B",
         "options": {
                  "reasoningEffort": "high",
                  "textVerbosity": "low",
                  "reasoningSummary": "auto",
         }
        },
        "glm-4.5-air": {
         "name": "GLM 4.5 Air",
         "options": {
                  "reasoningEffort": "high",
                  "textVerbosity": "low",
                  "reasoningSummary": "auto",
         }
        },
        "mistralai/devstral-small-2-2512": {
         "name": "Devstrall 2 Small 2512",
         "options": {
                  "reasoningEffort": "high",
                  "textVerbosity": "low",
                  "reasoningSummary": "auto",
         }
        },
        "arliai_glm-4.5-air-derestricted": {
         "name": "GLM 4.5 Air Derestricted",
        "options": {
                  "reasoningEffort": "high",
                  "textVerbosity": "low",
                  "reasoningSummary": "auto",
         }
        },
        "kwaipilot_kat-dev": {
         "name": "Kat-Dev",
         "options": {
                  "reasoningEffort": "high",
                  "textVerbosity": "low",
                  "reasoningSummary": "auto",
         }
        },
        "gpt-oss-20b": {
         "name": "GPT OSS 20B",
         "options": {
                  "reasoningEffort": "high",
                  "textVerbosity": "low",
                  "reasoningSummary": "auto",
         }
        },
        "nemotron-3-nano-30b-a3b": {
         "name": "Nemotron 3 Nano 30B",
         "options": {
                  "reasoningEffort": "high",
                  "textVerbosity": "low",
                  "reasoningSummary": "auto",
         }

        }
      }
    }
  },

  "keybinds": {
    "leader": "ctrl+z",
    "app_exit": "ctrl+c,ctrl+d,<leader>q",
    "editor_open": "<leader>e",
    "theme_list": "<leader>t",
    "sidebar_toggle": "<leader>b",
    "username_toggle": "none",
    "status_view": "<leader>s",
    "session_export": "<leader>x",
    "session_new": "<leader>n",
    "session_list": "<leader>l",
    "session_timeline": "<leader>g",
    "session_share": "none",
    "session_unshare": "none",
    "session_interrupt": "escape",
    "session_compact": "<leader>c",
    "session_child_cycle": "<leader>+right",
    "session_child_cycle_reverse": "<leader>+left",
    "messages_page_up": "pageup",
    "messages_page_down": "pagedown",
    "messages_half_page_up": "ctrl+alt+u",
    "messages_half_page_down": "ctrl+alt+d",
    "messages_first": "ctrl+g,home",
    "messages_last": "ctrl+alt+g,end",
    "messages_copy": "<leader>y",
    "messages_undo": "<leader>u",
    "messages_redo": "<leader>r",
    "messages_last_user": "none",
    "messages_toggle_conceal": "<leader>h",
    "model_list": "<leader>m",
    "model_cycle_recent": "f2",
    "model_cycle_recent_reverse": "shift+f2",
    "command_list": "ctrl+p",
    "agent_list": "<leader>a",
    "agent_cycle": "tab",
    "agent_cycle_reverse": "shift+tab",
    "input_clear": "ctrl+c",
    "input_paste": "ctrl+v",
    "input_submit": "return",
    "input_newline": "shift+return,ctrl+return,alt+return,ctrl+j",
    "input_move_left": "left,ctrl+b",
    "input_move_right": "right,ctrl+f",
    "input_move_up": "up",
    "input_move_down": "down",
    "input_select_left": "shift+left",
    "input_select_right": "shift+right",
    "input_select_up": "shift+up",
    "input_select_down": "shift+down",
    "input_line_home": "ctrl+a",
    "input_line_end": "ctrl+e",
    "input_select_line_home": "ctrl+shift+a",
    "input_select_line_end": "ctrl+shift+e",
    "input_visual_line_home": "alt+a",
    "input_visual_line_end": "alt+e",
    "input_select_visual_line_home": "alt+shift+a",
    "input_select_visual_line_end": "alt+shift+e",
    "input_buffer_home": "home",
    "input_buffer_end": "end",
    "input_select_buffer_home": "shift+home",
    "input_select_buffer_end": "shift+end",
    "input_delete_line": "ctrl+shift+d",
    "input_delete_to_line_end": "ctrl+k",
    "input_delete_to_line_start": "ctrl+u",
    "input_backspace": "backspace,shift+backspace",
    "input_delete": "ctrl+d,delete,shift+delete",
    "input_undo": "ctrl+-,super+z",
    "input_redo": "ctrl+.,super+shift+z",
    "input_word_forward": "alt+f,alt+right,ctrl+right",
    "input_word_backward": "alt+b,alt+left,ctrl+left",
    "input_select_word_forward": "alt+shift+f,alt+shift+right",
    "input_select_word_backward": "alt+shift+b,alt+shift+left",
    "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
    "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
    "history_previous": "up",
    "history_next": "down",
    "terminal_suspend": "ctrl+z"
  }
}
@jhov94 commented on GitHub (Dec 30, 2025): I also tried it with no options defined for the model since I'm not sure if those options are model specific or not. Here's my config: ``` { "$schema": "https://opencode.ai/config.json", "provider": { "lmstudio": { "npm": "@ai-sdk/openai-compatible", "name": "LM Studio (local)", "options": { "baseURL": "http://192.168.0.2:1234/v1" }, "models": { "qwen3-30b-a3b-thinking-2507": { "name": "Qwen3 30B A3B Thinking 2507", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } }, "qwen3-coder-30b-a3b-instruct": { "name": "Qwen3 Coder 30B A3B Instruct" }, "gpt-oss-120b": { "name": "GPT OSS 120B", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } }, "bytedance/seed-oss-36b": { "name": "Seed OSS 36B", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } }, "glm-4.5-air": { "name": "GLM 4.5 Air", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } }, "mistralai/devstral-small-2-2512": { "name": "Devstrall 2 Small 2512", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } }, "arliai_glm-4.5-air-derestricted": { "name": "GLM 4.5 Air Derestricted", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } }, "kwaipilot_kat-dev": { "name": "Kat-Dev", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } }, "gpt-oss-20b": { "name": "GPT OSS 20B", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } }, "nemotron-3-nano-30b-a3b": { "name": "Nemotron 3 Nano 30B", "options": { "reasoningEffort": "high", "textVerbosity": "low", "reasoningSummary": "auto", } } } } }, "keybinds": { "leader": "ctrl+z", "app_exit": "ctrl+c,ctrl+d,<leader>q", "editor_open": "<leader>e", "theme_list": "<leader>t", "sidebar_toggle": "<leader>b", "username_toggle": "none", "status_view": "<leader>s", "session_export": "<leader>x", "session_new": "<leader>n", "session_list": "<leader>l", "session_timeline": "<leader>g", "session_share": "none", "session_unshare": "none", "session_interrupt": "escape", "session_compact": "<leader>c", "session_child_cycle": "<leader>+right", "session_child_cycle_reverse": "<leader>+left", "messages_page_up": "pageup", "messages_page_down": "pagedown", "messages_half_page_up": "ctrl+alt+u", "messages_half_page_down": "ctrl+alt+d", "messages_first": "ctrl+g,home", "messages_last": "ctrl+alt+g,end", "messages_copy": "<leader>y", "messages_undo": "<leader>u", "messages_redo": "<leader>r", "messages_last_user": "none", "messages_toggle_conceal": "<leader>h", "model_list": "<leader>m", "model_cycle_recent": "f2", "model_cycle_recent_reverse": "shift+f2", "command_list": "ctrl+p", "agent_list": "<leader>a", "agent_cycle": "tab", "agent_cycle_reverse": "shift+tab", "input_clear": "ctrl+c", "input_paste": "ctrl+v", "input_submit": "return", "input_newline": "shift+return,ctrl+return,alt+return,ctrl+j", "input_move_left": "left,ctrl+b", "input_move_right": "right,ctrl+f", "input_move_up": "up", "input_move_down": "down", "input_select_left": "shift+left", "input_select_right": "shift+right", "input_select_up": "shift+up", "input_select_down": "shift+down", "input_line_home": "ctrl+a", "input_line_end": "ctrl+e", "input_select_line_home": "ctrl+shift+a", "input_select_line_end": "ctrl+shift+e", "input_visual_line_home": "alt+a", "input_visual_line_end": "alt+e", "input_select_visual_line_home": "alt+shift+a", "input_select_visual_line_end": "alt+shift+e", "input_buffer_home": "home", "input_buffer_end": "end", "input_select_buffer_home": "shift+home", "input_select_buffer_end": "shift+end", "input_delete_line": "ctrl+shift+d", "input_delete_to_line_end": "ctrl+k", "input_delete_to_line_start": "ctrl+u", "input_backspace": "backspace,shift+backspace", "input_delete": "ctrl+d,delete,shift+delete", "input_undo": "ctrl+-,super+z", "input_redo": "ctrl+.,super+shift+z", "input_word_forward": "alt+f,alt+right,ctrl+right", "input_word_backward": "alt+b,alt+left,ctrl+left", "input_select_word_forward": "alt+shift+f,alt+shift+right", "input_select_word_backward": "alt+shift+b,alt+shift+left", "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete", "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace", "history_previous": "up", "history_next": "down", "terminal_suspend": "ctrl+z" } } ```
Author
Owner

@onurakman commented on GitHub (Jan 2, 2026):

I got the same error with GLM-4.5-Air after upgrading to v1.0.223

Sometimes GLM outputs <think></think> empty tags with may be this is causing problem

@onurakman commented on GitHub (Jan 2, 2026): I got the same error with GLM-4.5-Air after upgrading to v1.0.223 Sometimes GLM outputs `<think></think>` empty tags with may be this is causing problem
Author
Owner

@onurakman commented on GitHub (Jan 5, 2026):

I tried with version 1.1.2 and the problem still exits. The change added in version 1.0.218 #6463 causes problems with GLM models.

@onurakman commented on GitHub (Jan 5, 2026): I tried with version 1.1.2 and the problem still exits. The change added in version 1.0.218 #6463 causes problems with GLM models.
Author
Owner

@jnargi commented on GitHub (Jan 6, 2026):

Also having this error with GLM 4.5 Air on latest opencode on win. Running model local FP8

@jnargi commented on GitHub (Jan 6, 2026): Also having this error with GLM 4.5 Air on latest opencode on win. Running model local FP8
Author
Owner

@rekram1-node commented on GitHub (Jan 6, 2026):

ahh

@rekram1-node commented on GitHub (Jan 6, 2026): ahh
Author
Owner

@arkamar commented on GitHub (Jan 9, 2026):

I am having the same issue with 1.1.8. I reverted the #6463 locally and the issue really seems to be gone, however, the thinking block is not differentiated from the response (the ... is part of the response). In my case I run GLM 4.6V Flash in llama.cpp.

@arkamar commented on GitHub (Jan 9, 2026): I am having the same issue with 1.1.8. I reverted the #6463 locally and the issue really seems to be gone, however, the thinking block is not differentiated from the response (the <think>...</think> is part of the response). In my case I run GLM 4.6V Flash in llama.cpp.
Author
Owner

@rmhubbert commented on GitHub (Jan 23, 2026):

I'm seeing this as well, but only on vLLM. My llama.cpp version does not throw the error.

In vLLM, the error is thrown on the first tool call attempt.

I'm running https://huggingface.co/cyankiwi/GLM-4.5-Air-AWQ-4bit via vLLM v0.14.0, with Opencode v1.1.34 on an up to date Arch Linux.

EDIT: I'm also seeing the error when using https://huggingface.co/QuantTrio/GLM-4.5-Air-AWQ-FP16Mix in vLLM.

My vLLM config is as follows (via llama-swap)

"glm-4.5-air":
    name: "GLM 4.5 Air"
    ttl: 1800
    env:
      - "OMP_NUM_THREADS=4"
      - "CUDA_DEVICE_ORDER=PCI_BUS_ID"
      - "CUDA_VISIBLE_DEVICES=0,1,4,5"
      - "CUDA_HOME=/opt/cuda"
      - "PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True"
      - "HF_TOKEN=${HF_TOKEN}"
    cmd: |
      uv run vllm serve cyankiwi/GLM-4.5-Air-AWQ-4bit
      --served-model-name glm-4.5-air
      --max-model-len auto
      --host 0.0.0.0
      --port ${PORT}
      --seed 3407
      --tensor-parallel-size 4
      --enable-expert-parallel
      --tool-call-parser glm45
      --reasoning-parser glm45
      --enable-auto-tool-choice
      --disable-custom-all-reduce
      --max-num-seqs 8
      --gpu-memory-utilization 0.95

My working llama.cpp config is as follows

"glm-4.5-air-llama":
    name: "GLM 4.5 Air Llama"
    ttl: 1800
    cmd: |
      llama-server --host 0.0.0.0 --port ${PORT}
      --flash-attn on
      --fit on
      --fit-target 512
      --seed 3407
      --prio 2
      --threads 12
      --threads-batch 12
      --main-gpu 1
      --parallel 1
      --no-mmap
      --mlock
      --jinja
      --model models/GLM-4.5-Air-UD-Q6_K_XL-00001-of-00003.gguf
      --chat-template-file ./templates/glm-4.5-air-chat-template.jinja
      --ctx-size 98304
      --batch-size 4096
      --ubatch-size 2048
      --temp 0.6
      --top-p 0.95
      --top-k 40

The relevant part of my opencode.json

"provider": {
  "llama.cpp": {
    "npm": "@ai-sdk/openai-compatible",
    "name": "Llama.cpp",
    "options": {
      "baseURL": "http://localhost/v1"
    },
    "models": {
      "glm-4.5-air": {
        "name": "GLM 4.5 Air",
        "reasoning": true,
        "tool_call": true,
        "temperature": true,
        "open_weights": true,
        "modalities": {
          "input": ["text"],
          "output": ["text"]
        },
        "cost": {
          "input": 0,
          "output": 0,
          "cache_read": 0
        },
        "limit": {
          "context": 98304,
          "output": 98304
        }
      }
   }
}
@rmhubbert commented on GitHub (Jan 23, 2026): I'm seeing this as well, but only on vLLM. My llama.cpp version does not throw the error. In vLLM, the error is thrown on the first tool call attempt. I'm running https://huggingface.co/cyankiwi/GLM-4.5-Air-AWQ-4bit via vLLM v0.14.0, with Opencode v1.1.34 on an up to date Arch Linux. EDIT: I'm also seeing the error when using https://huggingface.co/QuantTrio/GLM-4.5-Air-AWQ-FP16Mix in vLLM. My vLLM config is as follows (via llama-swap) ```yaml "glm-4.5-air": name: "GLM 4.5 Air" ttl: 1800 env: - "OMP_NUM_THREADS=4" - "CUDA_DEVICE_ORDER=PCI_BUS_ID" - "CUDA_VISIBLE_DEVICES=0,1,4,5" - "CUDA_HOME=/opt/cuda" - "PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True" - "HF_TOKEN=${HF_TOKEN}" cmd: | uv run vllm serve cyankiwi/GLM-4.5-Air-AWQ-4bit --served-model-name glm-4.5-air --max-model-len auto --host 0.0.0.0 --port ${PORT} --seed 3407 --tensor-parallel-size 4 --enable-expert-parallel --tool-call-parser glm45 --reasoning-parser glm45 --enable-auto-tool-choice --disable-custom-all-reduce --max-num-seqs 8 --gpu-memory-utilization 0.95 ``` My working llama.cpp config is as follows ```yaml "glm-4.5-air-llama": name: "GLM 4.5 Air Llama" ttl: 1800 cmd: | llama-server --host 0.0.0.0 --port ${PORT} --flash-attn on --fit on --fit-target 512 --seed 3407 --prio 2 --threads 12 --threads-batch 12 --main-gpu 1 --parallel 1 --no-mmap --mlock --jinja --model models/GLM-4.5-Air-UD-Q6_K_XL-00001-of-00003.gguf --chat-template-file ./templates/glm-4.5-air-chat-template.jinja --ctx-size 98304 --batch-size 4096 --ubatch-size 2048 --temp 0.6 --top-p 0.95 --top-k 40 ``` The relevant part of my opencode.json ```json "provider": { "llama.cpp": { "npm": "@ai-sdk/openai-compatible", "name": "Llama.cpp", "options": { "baseURL": "http://localhost/v1" }, "models": { "glm-4.5-air": { "name": "GLM 4.5 Air", "reasoning": true, "tool_call": true, "temperature": true, "open_weights": true, "modalities": { "input": ["text"], "output": ["text"] }, "cost": { "input": 0, "output": 0, "cache_read": 0 }, "limit": { "context": 98304, "output": 98304 } } } } ```
Author
Owner

@mkondakov commented on GitHub (Jan 25, 2026):

I have the same issue
My setup:
opencode v1.1.36 on mac
LM Studio 0.3.39 + zai-org/glm-4.6v-flash on windows

@mkondakov commented on GitHub (Jan 25, 2026): I have the same issue My setup: opencode v1.1.36 on mac LM Studio 0.3.39 + zai-org/glm-4.6v-flash on windows
Author
Owner

@vim-reaper commented on GitHub (Jan 26, 2026):

Downgrading to v1.0.201 is a workaround.

@vim-reaper commented on GitHub (Jan 26, 2026): Downgrading to v1.0.201 is a workaround.
Author
Owner

@arkamar commented on GitHub (Jan 27, 2026):

@rmhubbert I am wondering, is the different result related to different templates used in vLLM and llama.cpp? I noticed the --chat-template-file ./templates/glm-4.5-air-chat-template.jinja parameter in your llama.cpp command. I am having this issue with default template in llama.cpp and you have the same issue in vLLM, which most probably runs also with default template, right?

@arkamar commented on GitHub (Jan 27, 2026): @rmhubbert I am wondering, is the different result related to different templates used in vLLM and llama.cpp? I noticed the `--chat-template-file ./templates/glm-4.5-air-chat-template.jinja` parameter in your llama.cpp command. I am having this issue with default template in llama.cpp and you have the same issue in vLLM, which most probably runs also with default template, right?
Author
Owner

@jovanwongzixi commented on GitHub (Jan 27, 2026):

This issue is due to the LLM endpoint returning an empty thinking block that is not parsed correctly in the extractReasoningMiddleware function in the Vercel AI module. I have submitted a PR in Vercel's ai repo detailing the fix, which you can implement yourself in the meantime too.

The PR can be found at vercel/ai#12055

@jovanwongzixi commented on GitHub (Jan 27, 2026): This issue is due to the LLM endpoint returning an empty thinking block <think></think> that is not parsed correctly in the `extractReasoningMiddleware` function in the Vercel AI module. I have submitted a PR in Vercel's ai repo detailing the fix, which you can implement yourself in the meantime too. The PR can be found at vercel/ai#12055
Author
Owner

@rmhubbert commented on GitHub (Jan 30, 2026):

Thanks @jovanwongzixi, much appreciated!

@arkamar It was definitely worth a shot, but unfortunately, running my vLLM instances with the same explicit template file didn't make any difference.

@rmhubbert commented on GitHub (Jan 30, 2026): Thanks @jovanwongzixi, much appreciated! @arkamar It was definitely worth a shot, but unfortunately, running my vLLM instances with the same explicit template file didn't make any difference.
Author
Owner

@jovanwongzixi commented on GitHub (Jan 30, 2026):

Update: The PR has been approved and included in the latest release of the ai SDK (v6.0.64).

However, opencode is using v5.0.124 at the time of writing, and based on my previous tests while patching, v6.0.0 onwards introduces changes that will break opencode. I have not looked into detail on what's the issue (and if the issue still exists).

I worked around by patching v5.0.119 and linked the local patch to opencode.

@jovanwongzixi commented on GitHub (Jan 30, 2026): Update: The PR has been approved and included in the latest release of the ai SDK ([v6.0.64](https://github.com/vercel/ai/releases/tag/ai@6.0.64)). However, opencode is using v5.0.124 at the time of writing, and based on my previous tests while patching, v6.0.0 onwards introduces changes that will break opencode. I have not looked into detail on what's the issue (and if the issue still exists). I worked around by patching v5.0.119 and linked the local patch to opencode.
Author
Owner

@rmhubbert commented on GitHub (Feb 2, 2026):

Interesting! Something has changed with Opencode 1.1.48. I noticed that the ai-sdk library version was bumped to the latest v5 version, so maybe @jovanwongzixi's fix was backported to v5?

Anyway, I am no longer seeing the original reasoning part reasoning-0 not found error after tool calls when running GLM 4.5 Air on vLLM. There is a new issue; All output after the initial tool call is wrapped in <think></think> tags, but the task does now complete.

@rmhubbert commented on GitHub (Feb 2, 2026): Interesting! Something has changed with Opencode 1.1.48. I noticed that the ai-sdk library version was bumped to the latest v5 version, so maybe @jovanwongzixi's fix was backported to v5? Anyway, I am no longer seeing the original `reasoning part reasoning-0 not found` error after tool calls when running GLM 4.5 Air on vLLM. There is a new issue; All output after the initial tool call is wrapped in `<think></think>` tags, but the task does now complete.
Author
Owner

@jovanwongzixi commented on GitHub (Feb 2, 2026):

Interesting! Something has changed with Opencode 1.1.48. I noticed that the ai-sdk library version was bumped to the latest v5 version, so maybe @jovanwongzixi's fix was backported to v5?

Anyway, I am no longer seeing the original reasoning part reasoning-0 not found error after tool calls when running GLM 4.5 Air on vLLM. There is a new issue; All output after the initial tool call is wrapped in <think></think> tags, but the task does now complete.

Are you able to share more details on how to replicate the issue and/or possibly some screenshots? I'm unlikely to have time to look into this anytime soon but it could possibly help others who are willing to take a look at it 😄

@jovanwongzixi commented on GitHub (Feb 2, 2026): > Interesting! Something has changed with Opencode 1.1.48. I noticed that the ai-sdk library version was bumped to the latest v5 version, so maybe [@jovanwongzixi](https://github.com/jovanwongzixi)'s fix was backported to v5? > > Anyway, I am no longer seeing the original `reasoning part reasoning-0 not found` error after tool calls when running GLM 4.5 Air on vLLM. There is a new issue; All output after the initial tool call is wrapped in `<think></think>` tags, but the task does now complete. Are you able to share more details on how to replicate the issue and/or possibly some screenshots? I'm unlikely to have time to look into this anytime soon but it could possibly help others who are willing to take a look at it 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4015