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
In latest version v0.11.3 How to config and use GLM-4.5 model if there isn't in the list? #2760
We have a valid GLM-4.5 API key and want to use it on our Debian 12 server through OpenCode CLI. We’ve already installed the latest version of OpenCode (v0.11.3). However, when we check the /models list inside the CLI, GLM-4.5 is not available.
How can we configure or install OpenCode so that it recognizes and allows us to use the GLM-4.5 model via our API key
Configuring OpenCode CLI for GLM-4.5
It sounds like you need to configure OpenCode CLI to recognize your GLM-4.5 model. Here's how to approach this:
Check OpenCode Configuration
First, locate the OpenCode configuration directory. It's typically in:
bash
~/.opencode/
Add GLM-4.5 to ConfigurationYou'll likely need to edit the configuration file to add your GLM-4.5 model. The process usually involves:
Create or edit the config.yaml or config.json file in the OpenCode directory
Add your GLM-4.5 API key and endpoint information
Example configuration might look like:
Verify Configuration
After making changes, restart the OpenCode CLI and check the model list again:
bash
/models list
Check Documentation
Since OpenCode CLI might have changed in version 0.11.3, I recommend checking their official documentation for the most accurate configuration instructions. You can typically find this at:
The project's GitHub repository
The official OpenCode documentation website
If you continue to have issues, providing the exact output of the /models list command and any error messages would help in troubleshooting further.
Activity
github-actions commentedon Sep 24, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
OpeOginni commentedon Sep 24, 2025
Hey @coopeu follow this guide as I guess you are making use of the Z.ai model provider? https://opencode.ai/docs/providers/#zai
Then put in the key as prompted, then you will have access to the model
coopeu commentedon Sep 24, 2025
Configuring OpenCode CLI for GLM-4.5
It sounds like you need to configure OpenCode CLI to recognize your GLM-4.5 model. Here's how to approach this:
First, locate the OpenCode configuration directory. It's typically in:
bash
~/.opencode/
Create or edit the config.yaml or config.json file in the OpenCode directory
Add your GLM-4.5 API key and endpoint information
Example configuration might look like:
models:
glm-4.5:
api_key: "your_api_key_here"
endpoint: "https://open.bigmodel.cn/api/paas/v4"
model: "glm-4.5"
You might also be able to set the configuration through environment variables:
bash
export OPENCODE_GLM45_API_KEY="your_api_key_here"
export OPENCODE_GLM45_ENDPOINT="https://open.bigmodel.cn/api/paas/v4"
After making changes, restart the OpenCode CLI and check the model list again:
bash
/models list
Since OpenCode CLI might have changed in version 0.11.3, I recommend checking their official documentation for the most accurate configuration instructions. You can typically find this at:
The project's GitHub repository
The official OpenCode documentation website
If you continue to have issues, providing the exact output of the /models list command and any error messages would help in troubleshooting further.
rekram1-node commentedon Sep 24, 2025
@coopeu did you get this figured out?
rekram1-node commentedon Sep 30, 2025
closing since @OpeOginni gave correct guidelines, if this is still an issue lmk