Skip to main content

llm-zai

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

Installation

llm install llm-zai

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-coding → glm-5.2
  • glm-5.1-coding → glm-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 models

License

Apache-2.0

Metadata

Release files for llm-zai 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-zai 0.2.1
File Size Uploaded Provenance
llm_zai-0.2.1.tar.gz 14.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-zai 0.2.1
File Interpreter ABI Platform
llm_zai-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / llm_zai-0.2.1.tar.gz

Download URL llm_zai-0.2.1.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d85f769a88e9fd3a6b59d6ec71b5f2e524fc2cf610cb181f3ce64cd026fec150
BLAKE2b-256 checksum
How to use checksums
6d4b57e526278de5f1d0d3507b9b29e405d1a59e257ce68ebd9f6d3852d8961e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / llm_zai-0.2.1-py3-none-any.whl

Download URL llm_zai-0.2.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc8476394d7a979f68d792e99574258733c3b586c2ef914e53ea1aa339b5e12c
BLAKE2b-256 checksum
How to use checksums
23d96831fea755fdec7b335d4170ad4effb8b3455b54806b1101830abbaa606c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for llm-zai 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page