AI_APICallError: The messages parameter is illegal. Please check the documentation. - Zhipu AI GLM-4.5 #1695

Closed
opened 2026-02-16 17:32:12 -05:00 by yindo · 44 comments
Owner

Originally created by @jgwhite0111 on GitHub (Sep 12, 2025).

Originally assigned to: @fwang on GitHub.

Zhipu AI GLM-4.5 regularly hangs mid edit and waits for a response after the message "AI_APICallError: The messages parameter is illegal. Please check the documentation."

Edit: I don't think it is mid-edit. It seems to happen after session compaction. And it seems to then start its memory again from the last session.

Only settings that are none default are z.ai's recommended setup for 'Coding Plan' on opencode. In ~/.config/opencode/opencode.json I have:

{
    "$schema": "https://opencode.ai/config.json",
    "provider": {
        "zhipuai": {
            "api": "https://api.z.ai/api/coding/paas/v4"
        }
    }
}
Originally created by @jgwhite0111 on GitHub (Sep 12, 2025). Originally assigned to: @fwang on GitHub. Zhipu AI GLM-4.5 regularly hangs mid edit and waits for a response after the message "AI_APICallError: The messages parameter is illegal. Please check the documentation." **Edit:** I don't think it is mid-edit. It seems to happen after session compaction. And it seems to then start its memory again from the last session. Only settings that are none default are z.ai's [recommended](https://docs.z.ai/scenario-example/develop-tools/opencode#step-3%3A-using-opencode-with-the-glm-coding-plan) setup for 'Coding Plan' on opencode. In ~/.config/opencode/opencode.json I have: ```` { "$schema": "https://opencode.ai/config.json", "provider": { "zhipuai": { "api": "https://api.z.ai/api/coding/paas/v4" } } } ````
yindo closed this issue 2026-02-16 17:32:12 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 12, 2025):

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

  • #1880: GLM 4.5 String issue - Similar GLM 4.5 model problem with different error message but same hanging behavior
  • #2431: Add support for Z.ai GLM Coding Plan - Discusses the same Z.ai Anthropic-compatible endpoint configuration you're using
  • #1559: Please adapt to the official GLM-4.5 direct connection version - Related to GLM-4.5 connectivity issues and official API support

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

@github-actions[bot] commented on GitHub (Sep 12, 2025): This issue might be a duplicate of existing issues. Please check: - #1880: GLM 4.5 String issue - Similar GLM 4.5 model problem with different error message but same hanging behavior - #2431: Add support for Z.ai GLM Coding Plan - Discusses the same Z.ai Anthropic-compatible endpoint configuration you're using - #1559: Please adapt to the official GLM-4.5 direct connection version - Related to GLM-4.5 connectivity issues and official API support Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Sep 12, 2025):

if this was happening at random intervals (like after compacts) can you try latest? There were some fixes shipped today

@rekram1-node commented on GitHub (Sep 12, 2025): if this was happening at random intervals (like after compacts) can you try latest? There were some fixes shipped today
Author
Owner

@jgwhite0111 commented on GitHub (Sep 14, 2025):

I'm still getting the message in the latest version. It's a shame, because apart from that, glm-4.5 runs very fast and intelligently in opencode compared to other cli tools I'm testing. Sadly, this error makes it pretty unusable, as I can't leave it unattended, and need to re-prompt the AI constantly to get it to continue after this error. My workflow is to set all permissions to allow and run it sandboxed in a VM, then connect through a mosh session on my phone. I'm not the only person that uses this type of workflow.

@jgwhite0111 commented on GitHub (Sep 14, 2025): I'm still getting the message in the latest version. It's a shame, because apart from that, glm-4.5 runs very fast and intelligently in opencode compared to other cli tools I'm testing. Sadly, this error makes it pretty unusable, as I can't leave it unattended, and need to re-prompt the AI constantly to get it to continue after this error. My workflow is to set all permissions to allow and run it sandboxed in a VM, then connect through a mosh session on my phone. I'm not the only person that uses this type of workflow.
Author
Owner

@rekram1-node commented on GitHub (Sep 14, 2025):

I haven't tested but someone in the discord said:

use the anthropic endpoint and it will fix it

ex:

"zai": {
      "name": "zai-anth-base",
      "npm": "@ai-sdk/anthropic",
      "models": {
        "glm-4.5": {
          "id": "glm-4.5",
          "name": "GLM-4.5",
          "attachment": true,
          "tool_call": true,
          },
          "limit": {
            "context": 131072,
            "output": 98304
          },
        },
      "options": {
        "baseURL": "https://api.z.ai/api/anthropic/v1"
      },
    },
@rekram1-node commented on GitHub (Sep 14, 2025): I haven't tested but someone in the discord said: > use the anthropic endpoint and it will fix it ex: ``` "zai": { "name": "zai-anth-base", "npm": "@ai-sdk/anthropic", "models": { "glm-4.5": { "id": "glm-4.5", "name": "GLM-4.5", "attachment": true, "tool_call": true, }, "limit": { "context": 131072, "output": 98304 }, }, "options": { "baseURL": "https://api.z.ai/api/anthropic/v1" }, }, ```
Author
Owner

@jgwhite0111 commented on GitHub (Sep 14, 2025):

Yea, I just saw that and tested it. It solves the issue. Thanks! I won't close for now in case anyone has any tweaks or recommendations to offer. Otherwise, feel free to close.

@jgwhite0111 commented on GitHub (Sep 14, 2025): Yea, I just saw that and tested it. It solves the issue. Thanks! I won't close for now in case anyone has any tweaks or recommendations to offer. Otherwise, feel free to close.
Author
Owner

@shekohex commented on GitHub (Sep 14, 2025):

But you now would lose the CoT and reasoning from the model.

@shekohex commented on GitHub (Sep 14, 2025): But you now would lose the CoT and reasoning from the model.
Author
Owner

@jgwhite0111 commented on GitHub (Sep 15, 2025):

OK so the Anthropic API doesn't suport reasoning? I think I'd rather put up with re-prompting it than lose reasoning for now.

@jgwhite0111 commented on GitHub (Sep 15, 2025): OK so the Anthropic API doesn't suport reasoning? I think I'd rather put up with re-prompting it than lose reasoning for now.
Author
Owner

@vinaychilukuri commented on GitHub (Sep 15, 2025):

Have been facing the same issue! And, I also don't want to lose reasoning at this point.

@vinaychilukuri commented on GitHub (Sep 15, 2025): Have been facing the same issue! And, I also don't want to lose reasoning at this point.
Author
Owner

@OscSer commented on GitHub (Sep 16, 2025):

Same problem here, today I've been getting this error repeatedly in opencode v0.9.5

@OscSer commented on GitHub (Sep 16, 2025): Same problem here, today I've been getting this error repeatedly in opencode v0.9.5
Author
Owner

@rekram1-node commented on GitHub (Sep 16, 2025):

Where does it say you lose CoT reasoning? just curious maybe I missed it

@rekram1-node commented on GitHub (Sep 16, 2025): Where does it say you lose CoT reasoning? just curious maybe I missed it
Author
Owner

@jgwhite0111 commented on GitHub (Sep 16, 2025):

Where does it say you lose CoT reasoning? just curious maybe I missed it

In the replies above from shekohex:

But you now would lose the CoT and reasoning from the model.

@jgwhite0111 commented on GitHub (Sep 16, 2025): > Where does it say you lose CoT reasoning? just curious maybe I missed it In the replies above from shekohex: > But you now would lose the CoT and reasoning from the model.
Author
Owner

@rekram1-node commented on GitHub (Sep 16, 2025):

Yeah I meant like where does the provider say this

@rekram1-node commented on GitHub (Sep 16, 2025): Yeah I meant like where does the provider say this
Author
Owner

@shekohex commented on GitHub (Sep 16, 2025):

Yeah I meant like where does the provider say this

Nowhere in the docs, but looks like the OpenAI format shows the CoT/Thinking but using the Anthropic compatible API DOES NOT show it, or maybe it is missing it altogether.

@shekohex commented on GitHub (Sep 16, 2025): > Yeah I meant like where does the provider say this Nowhere in the docs, but looks like the OpenAI format shows the CoT/Thinking but using the Anthropic compatible API DOES NOT show it, or maybe it is missing it altogether.
Author
Owner

@aemr3 commented on GitHub (Sep 16, 2025):

would love to see this fixed as well, I am using GLM-4.5 heavily as well, with subscription. I didn't switch to anthropic, this model is better with reasoning.

@aemr3 commented on GitHub (Sep 16, 2025): would love to see this fixed as well, I am using GLM-4.5 heavily as well, with subscription. I didn't switch to anthropic, this model is better with reasoning.
Author
Owner

@jgwhite0111 commented on GitHub (Sep 16, 2025):

would love to see this fixed as well, I am using GLM-4.5 heavily as well, with subscription. I didn't switch to anthropic, this model is better with reasoning.

Yea I agree. I had a problem today the AI spent ages on without reasoning. As soon as I switched to the OpenAI endpoint with reasoning it started to make progress. Auto-compaction is nice to have when I'm busy with work and need to leave a task running on my phone through mosh. Yes, in theory it is better to not let context-window get too high and manually clear and compact, but not always possible.

@jgwhite0111 commented on GitHub (Sep 16, 2025): > would love to see this fixed as well, I am using GLM-4.5 heavily as well, with subscription. I didn't switch to anthropic, this model is better with reasoning. Yea I agree. I had a problem today the AI spent ages on without reasoning. As soon as I switched to the OpenAI endpoint with reasoning it started to make progress. Auto-compaction is nice to have when I'm busy with work and need to leave a task running on my phone through mosh. Yes, in theory it is better to not let context-window get too high and manually clear and compact, but not always possible.
Author
Owner

@rekram1-node commented on GitHub (Sep 16, 2025):

I mentioned this to team, @fwang is going to take a look

@rekram1-node commented on GitHub (Sep 16, 2025): I mentioned this to team, @fwang is going to take a look
Author
Owner

@aemr3 commented on GitHub (Sep 16, 2025):

Yea I agree. I had a problem today the AI spent ages on without reasoning. As soon as I switched to the OpenAI endpoint with reasoning it started to make progress. Auto-compaction is nice to have when I'm busy with work and need to leave a task running on my phone through mosh. Yes, in theory it is better to not let context-window get too high and manually clear and compact, but not always possible.

This is happening without auto compaction too btw, I have already disabled auto compact/auto prune

@aemr3 commented on GitHub (Sep 16, 2025): > Yea I agree. I had a problem today the AI spent ages on without reasoning. As soon as I switched to the OpenAI endpoint with reasoning it started to make progress. Auto-compaction is nice to have when I'm busy with work and need to leave a task running on my phone through mosh. Yes, in theory it is better to not let context-window get too high and manually clear and compact, but not always possible. This is happening without auto compaction too btw, I have already disabled auto compact/auto prune
Author
Owner

@jgwhite0111 commented on GitHub (Sep 16, 2025):

Yea I agree. I had a problem today the AI spent ages on without reasoning. As soon as I switched to the OpenAI endpoint with reasoning it started to make progress. Auto-compaction is nice to have when I'm busy with work and need to leave a task running on my phone through mosh. Yes, in theory it is better to not let context-window get too high and manually clear and compact, but not always possible.

This is happening without auto compaction too btw, I have already disabled auto compact/auto prune

That's interesting. Either way, it prevents being able to leave a task running for longer periods.

@jgwhite0111 commented on GitHub (Sep 16, 2025): > > Yea I agree. I had a problem today the AI spent ages on without reasoning. As soon as I switched to the OpenAI endpoint with reasoning it started to make progress. Auto-compaction is nice to have when I'm busy with work and need to leave a task running on my phone through mosh. Yes, in theory it is better to not let context-window get too high and manually clear and compact, but not always possible. > > This is happening without auto compaction too btw, I have already disabled auto compact/auto prune That's interesting. Either way, it prevents being able to leave a task running for longer periods.
Author
Owner

@aemr3 commented on GitHub (Sep 16, 2025):

Also having this a lot with glm4.5:

AI_InvalidResponseDataError: Expected 'id' to be a string.

@aemr3 commented on GitHub (Sep 16, 2025): Also having this a lot with glm4.5: AI_InvalidResponseDataError: Expected 'id' to be a string.
Author
Owner

@jgwhite0111 commented on GitHub (Sep 16, 2025):

Also having this a lot with glm4.5:

AI_InvalidResponseDataError: Expected 'id' to be a string.

I've had that too.

@jgwhite0111 commented on GitHub (Sep 16, 2025): > Also having this a lot with glm4.5: > > AI_InvalidResponseDataError: Expected 'id' to be a string. I've had that too.
Author
Owner

@michaelgrafl commented on GitHub (Sep 17, 2025):

Also having this a lot with glm4.5:

AI_InvalidResponseDataError: Expected 'id' to be a string.

I'm getting this as well when using the recommended setup. I'm not getting it with the Anthropic compatible API, but then the context size at the top right corner shows incorrect values. Not sure about the claim that reasoning doesn't work with the Anthropic compatible API. But the ability to see the correct current context size is actually important to me so I can adapt my strategy when it keeps growing too big too fast for a given task.

Other than that the GLM-4.5 plan works amazingly well for my use cases.

@michaelgrafl commented on GitHub (Sep 17, 2025): > Also having this a lot with glm4.5: > > AI_InvalidResponseDataError: Expected 'id' to be a string. I'm getting this as well when using the recommended setup. I'm not getting it with the Anthropic compatible API, but then the context size at the top right corner shows incorrect values. Not sure about the claim that reasoning doesn't work with the Anthropic compatible API. But the ability to see the correct current context size is actually important to me so I can adapt my strategy when it keeps growing too big too fast for a given task. Other than that the GLM-4.5 plan works amazingly well for my use cases.
Author
Owner

@Aneaire commented on GitHub (Sep 17, 2025):

Got the same bug as well at 95k+ context

@Aneaire commented on GitHub (Sep 17, 2025): Got the same bug as well at 95k+ context
Author
Owner

@slipstr28 commented on GitHub (Sep 17, 2025):

Argh... AI_InvalidResponseDataError: Expected 'id' to be a string here too ( Not on zai's but abother openai for this one).
Need a bit more days to conclusion, but on 4 consecutive days swapping between anthropic compatible & openai compatible endpoints, quality of work has been far better when using the openai compatible endpoints for this GLM 4.5, than using the anthropic compatible model.

@slipstr28 commented on GitHub (Sep 17, 2025): Argh... AI_InvalidResponseDataError: Expected 'id' to be a string here too ( Not on zai's but abother openai for this one). Need a bit more days to conclusion, but on 4 consecutive days swapping between anthropic compatible & openai compatible endpoints, quality of work has been far better when using the openai compatible endpoints for this GLM 4.5, than using the anthropic compatible model.
Author
Owner

@fwang commented on GitHub (Sep 17, 2025):

does this happen using their standard API or only when using the coding plan subscription?

@fwang commented on GitHub (Sep 17, 2025): does this happen using their standard API or only when using the coding plan subscription?
Author
Owner

@aemr3 commented on GitHub (Sep 17, 2025):

does this happen using their standard API or only when using the coding plan subscription?

@fwang Spent around 3$, I couldn't get "The messages parameter is illegal" message with standard api but I still get this one randomly (tested with multiple subagents in a long session):

AI_InvalidResponseDataError: Expected 'id' to be a string

@aemr3 commented on GitHub (Sep 17, 2025): > does this happen using their standard API or only when using the coding plan subscription? @fwang Spent around 3$, I couldn't get "The messages parameter is illegal" message with standard api but I still get this one randomly (tested with multiple subagents in a long session): AI_InvalidResponseDataError: Expected 'id' to be a string
Author
Owner

@jdiaz5513 commented on GitHub (Sep 17, 2025):

I've seen it on the subscription and standard API.

In independent testing of the OpenAI API I have seen this error occur when sending a completion request with zero user role messages in it. Does not matter if there are system or assistant messages.

I'm going to guess the prompt template they're using for GLM 4.5 can't handle a completion request without at least one user message in it?

@jdiaz5513 commented on GitHub (Sep 17, 2025): I've seen it on the subscription and standard API. In independent testing of the OpenAI API I have seen this error occur when sending a completion request with zero `user` role messages in it. Does not matter if there are `system` or `assistant` messages. I'm going to guess the prompt template they're using for GLM 4.5 can't handle a completion request without at least one `user` message in it?
Author
Owner

@slipstr28 commented on GitHub (Sep 17, 2025):

worked all day on chutes GLM 4.5 FP8 and got also there 3 or 4 the AI_InvalidResponseDataError: Expected 'id' to be a string

@slipstr28 commented on GitHub (Sep 17, 2025): worked all day on chutes GLM 4.5 FP8 and got also there 3 or 4 the AI_InvalidResponseDataError: Expected 'id' to be a string
Author
Owner

@jdiaz5513 commented on GitHub (Sep 17, 2025):

#2659 fixes it locally for me!

@jdiaz5513 commented on GitHub (Sep 17, 2025): #2659 fixes it locally for me!
Author
Owner

@aemr3 commented on GitHub (Sep 17, 2025):

#2659 fixes it locally for me!

also this one?
Expected 'id' to be a string

@aemr3 commented on GitHub (Sep 17, 2025): > [#2659](https://github.com/sst/opencode/pull/2659) fixes it locally for me! also this one? Expected 'id' to be a string
Author
Owner

@jdiaz5513 commented on GitHub (Sep 17, 2025):

Expected 'id' to be a string

I suspect that one is unrelated.

My best guess from diagnosing the problem is that it's an upstream issue with the inference software. The tool call template might not be able to handle hallucinated output from the model gracefully (i.e. when it makes up a tool name that wasn't provided in the request).

That guess is based on the fact that this occurs far more often when tools are restricted, or nearly guaranteed if I ask it to use a nonexistent tool.

Now try calling a made up tool: `foogah`.
User (03:35 PM)

The tool foogah doesn't exist. Available tools are: bash, edit, webfetch, glob, grep, list, read, write, todowrite, toread, task.
Build glm-4.5 (03:35 PM)

Try anyway. It should cause an error.
User (03:36 PM)

AI_InvalidResponseDataError: Expected 'id' to be a string.
@jdiaz5513 commented on GitHub (Sep 17, 2025): > Expected 'id' to be a string I suspect that one is unrelated. My best guess from diagnosing the problem is that it's an upstream issue with the inference software. The tool call template might not be able to handle hallucinated output from the model gracefully (i.e. when it makes up a tool name that wasn't provided in the request). That guess is based on the fact that this occurs _far_ more often when tools are restricted, or nearly guaranteed if I ask it to use a nonexistent tool. ``` Now try calling a made up tool: `foogah`. User (03:35 PM) The tool foogah doesn't exist. Available tools are: bash, edit, webfetch, glob, grep, list, read, write, todowrite, toread, task. Build glm-4.5 (03:35 PM) Try anyway. It should cause an error. User (03:36 PM) AI_InvalidResponseDataError: Expected 'id' to be a string. ```
Author
Owner

@aemr3 commented on GitHub (Sep 17, 2025):

Expected 'id' to be a string

I suspect that one is unrelated.

My best guess from diagnosing the problem is that it's an upstream issue with the inference software. The tool call template might not be able to handle hallucinated output from the model gracefully (i.e. when it makes up a tool name that wasn't provided in the request).

That guess is based on the fact that this occurs far more often when tools are restricted, or nearly guaranteed if I ask it to use a nonexistent tool.

Now try calling a made up tool: `foogah`.
User (03:35 PM)

The tool foogah doesn't exist. Available tools are: bash, edit, webfetch, glob, grep, list, read, write, todowrite, toread, task.
Build glm-4.5 (03:35 PM)

Try anyway. It should cause an error.
User (03:36 PM)

AI_InvalidResponseDataError: Expected 'id' to be a string.

oh shoot, you're right. I did reproduce it too. can we silently ignore this error or maybe report it to llm?

@aemr3 commented on GitHub (Sep 17, 2025): > > Expected 'id' to be a string > > I suspect that one is unrelated. > > My best guess from diagnosing the problem is that it's an upstream issue with the inference software. The tool call template might not be able to handle hallucinated output from the model gracefully (i.e. when it makes up a tool name that wasn't provided in the request). > > That guess is based on the fact that this occurs _far_ more often when tools are restricted, or nearly guaranteed if I ask it to use a nonexistent tool. > > ``` > Now try calling a made up tool: `foogah`. > User (03:35 PM) > > The tool foogah doesn't exist. Available tools are: bash, edit, webfetch, glob, grep, list, read, write, todowrite, toread, task. > Build glm-4.5 (03:35 PM) > > Try anyway. It should cause an error. > User (03:36 PM) > > AI_InvalidResponseDataError: Expected 'id' to be a string. > ``` oh shoot, you're right. I did reproduce it too. can we silently ignore this error or maybe report it to llm?
Author
Owner

@jdiaz5513 commented on GitHub (Sep 17, 2025):

silently ignore this error

That depends on if there's something to salvage, but I think in this situation you see no streaming response at all.

Technically z.ai and other inference providers need to patch the bug and have the API behave more like OpenAI: GPT will happily return a hallucinated tool name in the response, leaving it up to the client (OpenCode) to deal with. Not sure what a good workaround here would be.

The chat template for GLM 4.5 is tricky, so I have some sympathy.

@jdiaz5513 commented on GitHub (Sep 17, 2025): > silently ignore this error That depends on if there's something to salvage, but I think in this situation you see no streaming response at all. Technically z.ai and other inference providers need to patch the bug and have the API behave more like OpenAI: GPT will happily return a hallucinated tool name in the response, leaving it up to the client (OpenCode) to deal with. Not sure what a good workaround here would be. [The chat template for GLM 4.5](https://huggingface.co/tiny-random/glm-4.5/blob/main/chat_template.jinja) is tricky, so I have some sympathy.
Author
Owner

@jgwhite0111 commented on GitHub (Sep 18, 2025):

Just want to say thankyou for this fix. glm-4.5 coder plan with opencode and openai endpoint is now ridiculously powerful -- almost too good to be true. I'll enjoy it while it lasts and z.ai sustain these prices. opencode has the best cli implementation I've tested.

@jgwhite0111 commented on GitHub (Sep 18, 2025): Just want to say thankyou for this fix. glm-4.5 coder plan with opencode and openai endpoint is now ridiculously powerful -- almost too good to be true. I'll enjoy it while it lasts and z.ai sustain these prices. opencode has the best cli implementation I've tested.
Author
Owner

@jgwhite0111 commented on GitHub (Sep 18, 2025):

Though unfortunately "AI_InvalidResponseDataError: Expected 'id' to be a string." is still bringing it to a halt at times, but it's still an improvement.

@jgwhite0111 commented on GitHub (Sep 18, 2025): Though unfortunately "AI_InvalidResponseDataError: Expected 'id' to be a string." is still bringing it to a halt at times, but it's still an improvement.
Author
Owner

@brokechubb commented on GitHub (Sep 19, 2025):

It is worse than ever using 0.10.3

@brokechubb commented on GitHub (Sep 19, 2025): It is worse than ever using 0.10.3
Author
Owner

@michabbb commented on GitHub (Sep 28, 2025):

opencode v0.12.1
Zhipu AI GLM-4.5

Whatever I send (for example, a simple "hi") shows the error: AI_APICallError: API 调用参数有误,请检查文档。

@michabbb commented on GitHub (Sep 28, 2025): opencode v0.12.1 Zhipu AI GLM-4.5 Whatever I send (for example, a simple "hi") shows the error: AI_APICallError: API 调用参数有误,请检查文档。
Author
Owner

@rekram1-node commented on GitHub (Sep 28, 2025):

@michabbb can u share your opencode.json?

@rekram1-node commented on GitHub (Sep 28, 2025): @michabbb can u share your opencode.json?
Author
Owner

@michabbb commented on GitHub (Sep 28, 2025):

@rekram1-node sure, but there´s nothing special in there, i only removed the mcps and one custom provider that is NOT used here....
here´s what's left:

{
  "$schema": "https://opencode.ai/config.json",
  "theme": "github",
  "model": "groq/moonshotai/kimi-k2-instruct-0905",
  "autoupdate": true,
  "permission": {
    "bash": {
      "rm": "ask"
    }
  },
  "agent": { "ask": { "mode": "primary", "tools": { "*": false }, "prompt": " " } },
}
@michabbb commented on GitHub (Sep 28, 2025): @rekram1-node sure, but there´s nothing special in there, i only removed the mcps and one custom provider that is NOT used here.... here´s what's left: ```json { "$schema": "https://opencode.ai/config.json", "theme": "github", "model": "groq/moonshotai/kimi-k2-instruct-0905", "autoupdate": true, "permission": { "bash": { "rm": "ask" } }, "agent": { "ask": { "mode": "primary", "tools": { "*": false }, "prompt": " " } }, }
Author
Owner

@rekram1-node commented on GitHub (Sep 28, 2025):

@michabbb are you on their coding plan subscription?

@rekram1-node commented on GitHub (Sep 28, 2025): @michabbb are you on their coding plan subscription?
Author
Owner

@michabbb commented on GitHub (Sep 28, 2025):

@rekram1-node nope, just using an api key that is connected to a pre-pay account with some $ in it.
in hope i am not mixing things up, i am talking about using a key from: https://z.ai/manage-apikey/apikey-list

i am confused, because: https://models.dev/?sort=output-costper&order=asc&search=GLM-4.5

shows "z.ai" and "Zhipu AI" as two different providers but in opencode i can only choose "Zhipu AI" - but whats the difference here ? 🙈

@michabbb commented on GitHub (Sep 28, 2025): @rekram1-node nope, just using an api key that is connected to a pre-pay account with some $ in it. in hope i am not mixing things up, i am talking about using a key from: https://z.ai/manage-apikey/apikey-list i am confused, because: https://models.dev/?sort=output-costper&order=asc&search=GLM-4.5 shows "z.ai" and "Zhipu AI" as two different providers but in opencode i can only choose "Zhipu AI" - but whats the difference here ? 🙈
Author
Owner

@fwang commented on GitHub (Sep 28, 2025):

Z.AI and Zhipu AI are marketed as two separate providers from the company Zhipu. Former facing international users, and the latter facing Chinese users. If you obtained the API key from https://z.ai, use the Z.AI provider.

Image
@fwang commented on GitHub (Sep 28, 2025): Z.AI and Zhipu AI are marketed as two separate providers from the company Zhipu. Former facing international users, and the latter facing Chinese users. If you obtained the API key from `https://z.ai`, use the Z.AI provider. <img width="688" height="443" alt="Image" src="https://github.com/user-attachments/assets/3899617c-4cc9-4546-b69b-0a446ccf636f" />
Author
Owner

@michabbb commented on GitHub (Sep 28, 2025):

@fwang thanks a lot for clarification, i was wondering why i do see "Zhipu Ai" but not "Z.Ai", now i know. because i used the wrong one 🙈

@rekram1-node sorry for the noise! 😞

@michabbb commented on GitHub (Sep 28, 2025): @fwang thanks a lot for clarification, i was wondering why i do see "Zhipu Ai" but not "Z.Ai", now i know. because i used the wrong one 🙈 @rekram1-node sorry for the noise! 😞
Author
Owner

@rekram1-node commented on GitHub (Sep 28, 2025):

hey no problem

@rekram1-node commented on GitHub (Sep 28, 2025): hey no problem
Author
Owner

@ShamanicArts commented on GitHub (Oct 2, 2025):

I am also seeing a lot of AI_APICallError: Invalid API parameter, please check the documentation. errors suddenly. not sure the cause

@ShamanicArts commented on GitHub (Oct 2, 2025): I am also seeing a lot of ``` AI_APICallError: Invalid API parameter, please check the documentation. ``` errors suddenly. not sure the cause
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1695