Skip to content

[2/2] Preload Z.AI GLM support in Docker image - #116

Closed
IceCodeNew wants to merge 2 commits into
masterfrom
codex/docker-glm-support
Closed

[2/2] Preload Z.AI GLM support in Docker image#116
IceCodeNew wants to merge 2 commits into
masterfrom
codex/docker-glm-support

Conversation

@IceCodeNew

@IceCodeNew IceCodeNew commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • include the any-llm zai extra in the Docker dependency group and lock metadata
  • document zai as the Z.AI GLM provider ID in all supported README languages and the design contract

Verification

  • prek run --all-files
  • uv run --frozen --with pytest --with pytest-cov -- pytest --cov --cov-branch --cov-report=xml (1144 passed; 99% coverage, unchanged from master)
  • built the linux/arm64 image and ran its CLI help smoke test
  • verified the final image resolves the completion-capable zai provider with ZAI_API_KEY

Summary by CodeRabbit

  • New Features

    • Added support for the Z.AI GLM provider (zai) in the official image.
    • Z.AI GLM is now available alongside DeepSeek, OpenAI, and OpenRouter.
  • Documentation

    • Updated English, Japanese, and Simplified Chinese documentation with Z.AI GLM configuration details.
    • Clarified the provider identifier and official image contents in the design documentation.

@IceCodeNew

Copy link
Copy Markdown
Owner Author

/agentic_review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e666d93-da6a-4765-96b0-87627ce27ec6

📥 Commits

Reviewing files that changed from the base of the PR and between 1e033ae and 1493336.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • README.md
  • README_ja.md
  • README_zh-Hans.md
  • docs/design.md
  • pyproject.toml

📝 Walkthrough

Walkthrough

The Docker dependency group now installs the any-llm zai extra. Design documentation and English, Japanese, and Simplified Chinese README sections now identify Z.AI GLM as an included provider.

Changes

Z.AI GLM Provider Support

Layer / File(s) Summary
Add the zai Docker extra
pyproject.toml, docs/design.md
The Docker dependency group adds the zai extra to any-llm-sdk, and the design documentation describes the updated runtime and official image dependencies.
Update localized provider lists
README.md, README_ja.md, README_zh-Hans.md
The provider lists for the official image now include Z.AI GLM with the any-llm provider ID zai.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: preloading Z.AI GLM support in the Docker image.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/docker-glm-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

qodo-code-review Bot commented Jul 24, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 46 rules

Grey Divider


Remediation recommended

1. Dev install in design.md ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
docs/design.md now includes development-environment installation guidance (any-llm-sdk[all]),
which is contributor workflow information rather than part of the current technical contract. This
should be moved to a dedicated contribution/development doc or removed from the design contract to
keep the contract focused and stable.
Code

docs/design.md[176]

+开发环境安装 `any-llm-sdk[all]`,用于验证所有 completion provider 的装载边界。基础运行依赖只包含 SDK 核心包。官方镜像额外安装 DeepSeek、OpenAI、OpenRouter 和 Z.AI GLM 所需组件;GLM 使用 any-llm 的 `zai` provider ID。
Relevance

⭐⭐⭐ High

Team previously accepted trimming design.md to the stable technical contract, removing
internal/workflow-style narrative.

PR-#102
PR-#92

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 2141667 requires docs/design.md to stay limited to the current technical contract
and avoid contributor/workflow content. The modified line explicitly documents a dev-environment
installation choice, which is not part of the runtime/system contract.

Rule 2141667: Keep docs/design.md limited to the current technical contract
docs/design.md[176-176]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`docs/design.md` contains development setup guidance (`any-llm-sdk[all]` installation) in the technical contract section.

## Issue Context
The design contract should describe current system behavior/interfaces/invariants; contributor/dev workflow instructions should live in dedicated docs (e.g., `CONTRIBUTING.md` or a dev setup page) or be referenced via a link.

## Fix Focus Areas
- docs/design.md[176-176]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit 1493336 ⚖️ Balanced

Results up to commit fe89895 ⚖️ Balanced


No changes from previous review

Qodo Logo

Comment thread docs/design.md Outdated
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.85%. Comparing base (1e033ae) to head (1493336).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #116   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files         109      109           
  Lines       11647    11647           
  Branches      708      708           
=======================================
  Hits        11630    11630           
  Misses         12       12           
  Partials        5        5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@IceCodeNew

Copy link
Copy Markdown
Owner Author

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit fe89895

@IceCodeNew
IceCodeNew marked this pull request as ready for review July 24, 2026 16:54
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Preload Z.AI GLM (zai) provider support in the Docker image

✨ Enhancement 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Add the zai extra to the Docker dependency group for any-llm SDK.
• Update lock metadata so Docker builds include Z.AI GLM dependencies deterministically.
• Document zai as the Z.AI GLM provider ID across all supported READMEs and design docs.
Diagram

graph TD
  Build["Docker image build"] --> Deps["Docker deps (pyproject/uv.lock)"] --> SDK["any-llm-sdk (+zai)"] --> Runtime["App runtime LLM calls"] --> ZAI{{"Z.AI GLM API"}}
  Docs["README + design docs"] --> Runtime
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Install provider extras in Dockerfile (separate from lockfile)
  • ➕ Can keep app dependency groups smaller/cleaner
  • ➕ More explicit in the container build recipe
  • ➖ Risk of dependency drift if not pinned via the lock workflow
  • ➖ Harder to reproduce and audit exact image contents
2. Provide a separate image/tag for GLM support
  • ➕ Avoids increasing base image size for users who don't need GLM
  • ➕ Clear opt-in surface area
  • ➖ More build/publish variants to maintain and document
  • ➖ Potential for feature skew between images
3. Runtime optional install (lazy install on startup)
  • ➕ Keeps the image minimal initially
  • ➕ Users only pay the dependency cost when needed
  • ➖ Unreliable in locked-down environments (no network/package install)
  • ➖ Slower startup and more runtime failure modes

Recommendation: Keep the current approach (pin any-llm-sdk with the zai extra in the Docker dependency group and lockfile). It provides deterministic builds and ensures the official image can resolve zai without runtime installs; a separate tag is only worth considering if image size becomes a demonstrated concern.

Files changed (6) +6 / -6

Documentation (4) +4 / -4
README.mdDocument Z.AI GLM as a preloaded Docker provider ('zai') +1/-1

Document Z.AI GLM as a preloaded Docker provider ('zai')

• Updates the Docker image capability statement to include Z.AI GLM support. Adds the provider ID ('zai') to clarify the any-llm configuration contract.

README.md

README_ja.mdJapanese README: add Z.AI GLM ('zai') to preloaded provider list +1/-1

Japanese README: add Z.AI GLM ('zai') to preloaded provider list

• Aligns the Japanese README with the supported provider set shipped in the official image. Explicitly mentions Z.AI GLM and its provider ID ('zai').

README_ja.md

README_zh-Hans.mdSimplified Chinese README: add Z.AI GLM ('zai') to preloaded providers +1/-1

Simplified Chinese README: add Z.AI GLM ('zai') to preloaded providers

• Updates the Simplified Chinese README to reflect that the official image includes components for Z.AI GLM. Includes the any-llm provider ID ('zai') for configuration clarity.

README_zh-Hans.md

design.mdDesign contract: clarify runtime deps and 'zai' provider ID +1/-1

Design contract: clarify runtime deps and 'zai' provider ID

• Refocuses the design doc on the runtime dependency contract rather than dev-time validation details. States that the official image installs Z.AI GLM support and that GLM uses any-llm provider ID 'zai'.

docs/design.md

Other (2) +2 / -2
pyproject.tomlDocker dependency group: add any-llm 'zai' extra +1/-1

Docker dependency group: add any-llm 'zai' extra

• Extends the 'docker' dependency group to install 'any-llm-sdk' with the 'zai' extra alongside existing provider extras. This ensures the Docker image contains the provider implementation needed for Z.AI GLM.

pyproject.toml

uv.lockLockfile: pin Docker extras to include 'zai' +1/-1

Lockfile: pin Docker extras to include 'zai'

• Updates lock metadata for the 'docker' dependency group so 'any-llm-sdk' extras include 'zai'. Keeps Docker builds reproducible with the expanded provider set.

uv.lock

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 1493336

@IceCodeNew IceCodeNew closed this Jul 24, 2026
@IceCodeNew
IceCodeNew deleted the codex/docker-glm-support branch July 24, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant