Skip to main content

llm-zai-glm

LLM CLI plugin for Z.AI / GLM models, including the GLM Coding Plan endpoint.

Installation

llm install llm-zai-glm

Set your API key:

export ZAI_API_KEY="your-zai-api-key"

Or use:

llm keys set zai

Usage

# Basic model invocation
llm -m glm-5.1 "hello"
llm -m glm-5.2 "welcome message"
llm -m glm-5 "generic response"

# Use the Coding Plan endpoint with any GLM model (e.g., --coding flag)
llm -m glm-5.1 --coding "implement a binary search in rust"
llm -m glm-5.2-coding "review this repo"

# Vision models
llm -m glm-5v-turbo "describe this image" -a image.png

# Long‑context / agent models
llm -m autoglm-phone-multilingual "converse about my project"

Options

You can configure the chat behavior via options:

  • --thinking-type: enabled or disabled (controls whether reasoning is kept)
  • --effort: max or high effort for supported models (e.g., glm-5.2, glm-5.1-coding)
  • --coding: use the GLM Coding Plan endpoint (--coding true or --coding false)
  • --clear-thinking: preserve reasoning history across turns (true) or clear it (false)

Models

The plugin registers the following GLM models on Z.AI's OpenAI-compatible endpoints:

Chat models

  • glm-5.2
  • glm-5.1
  • glm-5
  • glm-5-turbo
  • glm-ocr
  • glm-5v-turbo

Coding plan variants (use --coding flag)

  • glm-5.2-codingglm-5.2
  • glm-5.1-codingglm-5.1

Long‑context / agent models

  • autoglm-phone-multilingual
  • glm-4-32b-0414-128k

Vision models

  • glm-5v-turbo
  • glm-ocr

Listing registered models

llm zai-glm models

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_zai_glm-0.2.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_zai_glm-0.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file llm_zai_glm-0.2.0.tar.gz.

File metadata

  • Download URL: llm_zai_glm-0.2.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for llm_zai_glm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 40d448e32cc604aecc4eb8510ca708e8a3df0d0d06d93c1dc0add73994f0238f
MD5 a31aae02ffd9de390c65cf5b4553b11a
BLAKE2b-256 d600d21bc5792d265cb24ca33b6656ed6dd0bda3101fc456eec84a102075f487

See more details on using hashes here.

File details

Details for the file llm_zai_glm-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: llm_zai_glm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for llm_zai_glm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1eb6cd5a72d3c9884fd35bcb5d9384f97c35cc0527922ea272cc51669dc75371
MD5 3b847d8d92bdb423517c3f10d5de8bf5
BLAKE2b-256 e395bba3c69bb99f64967a3094a36cfd5ec51bbbfe667d6dc8f8f8ffb7ebde25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page