AI Engineer Guide

How to use GLM 4.6 in Droid CLI

Droid CLI by Factory.ai is an agentic CLI similar to Claude Code but the good thing is that it has support for using custom model (bring your own key).

Let’s see how to use GLM 4.6 with Droid CLI. GLM 4.6 by Z.AI is an open source coding model that is performing almost as well as Anthropic Sonnet 4.

The usage cost is pretty cheap but if you’ve already have GLM Coding Plan subscription, you don’t even need to pay for that as well. Instead you’ll be paying a standard monthly subscription.

How to use GLM 4.6 in Droid CLI?

Just add the custom_models in the ~/.factory/config.json

In our case, the custom_models should look like this

{
  "custom_models": [
    {
      "model_display_name": "GLM 4.6 Coding Plan",
      "model": "glm-4.6",
      "base_url": "https://api.z.ai/api/anthropic",
      "api_key": "YOUR_ZAI_API_KEY",
      "provider": "zai"
    }
  ]
}

Once you’ve added the config, you can now use the /model command in the droid CLI to select that model. image.png

That’s pretty much it.

Credits

Happy AI-assisted coding!

#Z-Ai #Glm-4-6 #Droid-Cli

Stay Updated

Get the latest AI engineering insights delivered to your inbox.

No spam. Unsubscribe at any time.