Skip to content

In latest version v0.11.3 How to config and use GLM-4.5 model if there isn't in the list? #2760

Closed

Description

@coopeu

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

Activity

  1. github-actions commented on Sep 24, 2025

    @github-actions
    Contributor

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

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

  2. OpeOginni commented on Sep 24, 2025

    @OpeOginni
    Contributor

    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

  3. coopeu commented on Sep 24, 2025

    @coopeu
    Author

    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:

    1. Check OpenCode Configuration
      First, locate the OpenCode configuration directory. It's typically in:

    bash
    ~/.opencode/

    1. 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:

    models:
    glm-4.5:
    api_key: "your_api_key_here"
    endpoint: "https://open.bigmodel.cn/api/paas/v4"
    model: "glm-4.5"

    1. Alternative Method: Environment Variables
      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"

    1. Verify Configuration
      After making changes, restart the OpenCode CLI and check the model list again:

    bash
    /models list

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

  4. rekram1-node commented on Sep 24, 2025

    @rekram1-node
    Contributor

    @coopeu did you get this figured out?

  5. self-assigned this
    on Sep 24, 2025
  6. rekram1-node commented on Sep 30, 2025

    @rekram1-node
    Contributor

    closing since @OpeOginni gave correct guidelines, if this is still an issue lmk

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