Custom Model cannot see the outputs

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After updating the cursor and changing to GLM-5.1, and via a custom openapi key and url cursor agent could not see the outputs I am not getting this error on opencode or claude code. Auto etc is working correctly. Model is giving me this error
I’m experiencing a persistent issue where none of my tool calls are returning any output. This seems to be a systemic problem with the tool execution environment. I can see the tool outputs there is nothing wrong there

Steps to Reproduce

Enter glm openapi key and url and just try to use it ide agents or model cannot see anything while there are outputs

Operating System

MacOS

Version Information

Version: 2.6.22 (Universal)
VSCode Version: 1.105.1
Commit: c6285feaba0ad62603f7c22e72f0a170dc8415a0
Date: 2026-03-27T15:59:31.561Z (2 days ago)
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.1.0

For AI issues: which model did you use?

GLM-5.1

Does this stop you from using Cursor

Yes - Cursor is unusable

Hi Ozan,

Thanks for your forum post! This looks most consistent with a compatibility gap in the current custom-provider path rather than anything misconfigured in your setup. You’re using GLM-5.1 through z.ai, and while Cursor can work with some OpenAI-compatible endpoints, full Agent behavior is most reliable with the providers we officially support end-to-end today. In cases like this, the tool calls can execute, but the tool results are not always round-tripped back to the model in the format the provider expects.

So the short version is: this is a limitation in the current BYOK compatibility path for this provider/model combination.

For the most dependable Agent behavior today, the safest path is a native Cursor model or an officially supported BYOK provider.

Best,
Kevin

I’m having the same exact problem with GLM 5.1 in cursor as well

In that case, I’m switching to other IDEs now

Better to just use Kilo Code for GLM 5.1 - They actually have a cursor integration

**glm-5.1** — receives THE EXACT SAME tool response with the same content, but instead of processing the content, it responds with “Unfortunately, Shell tool returned empty output again”.

So **the problem is not in the sandbox, not in the Shell tool, not in the environment** — the tool returns the same result to both models. The difference is in how the model interprets it:

- **glm-4.7** sees the text in the `tool` message and uses it

- **glm-5.1** somehow ignores/doesn’t see the tool response content and generates a response as if the output is empty

This is a **glm-5.1** bug in handling tool call results. The model either:

1. Doesn’t parse content from the tool message correctly

2. Confuses the empty `` block (in the instructions) with the actual tool call result

3. Has an issue with how 5.1 processes `last_content_preview` in streaming mode

Essentially — this needs to be reported as a bug in glm-5.1. The model receives the data but “thinks” the output is empty.

Having same problem. GLM-5 doesn’t work and GLM-5.1 doesn’t work too…

Same or similar problem here: