Runtime: native Kimi Code CLI alongside Claude (kimi_cli provider, live)
Runtime image now installs Node 22 (nodesource) + both agent CLIs — @anthropic-ai/claude-code and @moonshot-ai/kimi-code — so the zeroclaw daemon can spawn `kimi -p` for the new kimi_cli provider on a Kimi membership, parallel to `claude -p` (claude_cli). Kimi needs Node >=22.19; the image was on Node 18. Documents the kimi_cli worker recipe in agent.config.example.toml (the coding endpoint is User-Agent gated → drive Kimi through its own CLI, not a raw OpenAI-compat client) and keeps GLM via the registry family. Deployed & verified on gw-04: coordinator (claude_cli) answers "Anthropic built me", worker_kimi (kimi_cli) answers "I am Kimi, built by Moonshot AI" — heterogeneous Claude + Kimi on one runtime, over /ws/chat. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c1b1b5a7cb
commit
2e889df35e
@@ -20,14 +20,15 @@ RUN --mount=type=cache,id=cm-cargo-registry,target=/usr/local/cargo/registry,sha
|
|||||||
&& cp target/release/zeroclaw /usr/local/bin/zeroclaw
|
&& cp target/release/zeroclaw /usr/local/bin/zeroclaw
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
# ca-certificates for TLS; nodejs+npm to install the Claude Code CLI, which the
|
# ca-certificates for TLS; Node 22 (Kimi Code needs >=22.19; Claude Code is fine
|
||||||
# zeroclaw `claude_cli` model provider spawns (`claude -p`) to drive turns on a
|
# on it too) to install BOTH agent CLIs that the subprocess providers spawn:
|
||||||
# Claude subscription / CLAUDE_CODE_OAUTH_TOKEN — no per-minute API TPM ceiling.
|
# `claude -p` (claude_cli, Claude subscription) and `kimi -p` (kimi_cli, Kimi
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
# membership) — subscription-backed, no per-minute API TPM ceiling.
|
||||||
ca-certificates curl nodejs npm \
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl gnupg \
|
||||||
&& npm install -g @anthropic-ai/claude-code \
|
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
||||||
|
&& apt-get install -y --no-install-recommends nodejs \
|
||||||
|
&& npm install -g @anthropic-ai/claude-code @moonshot-ai/kimi-code \
|
||||||
&& npm cache clean --force \
|
&& npm cache clean --force \
|
||||||
&& apt-get purge -y npm && apt-get autoremove -y \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /root/.npm
|
&& rm -rf /var/lib/apt/lists/* /root/.npm
|
||||||
COPY --from=build /usr/local/bin/zeroclaw /usr/local/bin/zeroclaw
|
COPY --from=build /usr/local/bin/zeroclaw /usr/local/bin/zeroclaw
|
||||||
ENV HOME=/zeroclaw-data \
|
ENV HOME=/zeroclaw-data \
|
||||||
|
|||||||
@@ -42,23 +42,31 @@ mcp_config = "/zeroclaw-data/clawmates-mcp.json"
|
|||||||
# model_provider = "claude_cli.door"
|
# model_provider = "claude_cli.door"
|
||||||
# risk_profile = "toolfree"
|
# risk_profile = "toolfree"
|
||||||
|
|
||||||
# --- Extra worker LLMs: Kimi Code and GLM (Zhipu) ---
|
# --- Extra worker LLMs: Kimi Code (native CLI) and GLM (Zhipu) ---
|
||||||
# Run a topology WORKER on another model. Kimi Code is subscription-billed and
|
# Run a topology WORKER on another model.
|
||||||
# OpenAI-compatible at https://api.kimi.com/coding/v1 (model "kimi-for-coding")
|
#
|
||||||
# with a Kimi Code Console API key — use the `custom` provider for it. GLM is a
|
# Kimi Code: subscription-billed. Its coding endpoint (api.kimi.com/coding) is
|
||||||
# first-class ZeroClaw family. Set model + key via env (TOML sub-tables parse
|
# coding-AGENT gated (User-Agent enforced) — a raw OpenAI-compat client gets 403,
|
||||||
# empty); point an agent at the alias; the orchestrator's role→alias map
|
# so we drive Kimi through its OWN CLI via the `kimi_cli` provider (mirrors
|
||||||
|
# `claude_cli`): it spawns `kimi -p` headless on the Kimi membership, with Kimi's
|
||||||
|
# own agent loop + sub-agents. Auth is the CLI's own ~/.kimi-code/config.toml
|
||||||
|
# (default_model + [providers."managed:kimi-code"] type="kimi" with the key) or
|
||||||
|
# `kimi login` — no key is passed by ZeroClaw. (HOME=/zeroclaw-data, so the file
|
||||||
|
# lives at /zeroclaw-data/.kimi-code/config.toml in the runtime volume.)
|
||||||
|
# [providers.models.kimi_cli.default]
|
||||||
|
# # binary_path = "kimi" # default; resolved on PATH
|
||||||
|
# # yolo = true # -y: auto-approve tool calls (needed for a door agent
|
||||||
|
# # # that acts via Kimi's own MCP client, mcp.json)
|
||||||
|
# [agents.worker_kimi]
|
||||||
|
# model_provider = "kimi_cli.default"
|
||||||
|
# risk_profile = "toolfree"
|
||||||
|
#
|
||||||
|
# GLM is a first-class ZeroClaw family (OpenAI-compat, separate key). Set model +
|
||||||
|
# key via env (TOML sub-tables parse empty); the orchestrator's role→alias map
|
||||||
# (ZEROCLAW_AGENT_MAP) selects e.g. researcher=worker_kimi, analyst=worker_glm.
|
# (ZEROCLAW_AGENT_MAP) selects e.g. researcher=worker_kimi, analyst=worker_glm.
|
||||||
# ZEROCLAW_providers__models__custom__kimi__model=kimi-for-coding
|
|
||||||
# ZEROCLAW_providers__models__custom__kimi__api_key=<Kimi Code Console key>
|
|
||||||
# ZEROCLAW_providers__models__glm__default__model=glm-4.6
|
# ZEROCLAW_providers__models__glm__default__model=glm-4.6
|
||||||
# ZEROCLAW_providers__models__glm__default__api_key=<GLM key>
|
# ZEROCLAW_providers__models__glm__default__api_key=<GLM key>
|
||||||
# [providers.models.custom.kimi]
|
|
||||||
# uri = "https://api.kimi.com/coding/v1"
|
|
||||||
# [providers.models.glm.default]
|
# [providers.models.glm.default]
|
||||||
# [agents.worker_kimi]
|
|
||||||
# model_provider = "custom.kimi"
|
|
||||||
# risk_profile = "toolfree"
|
|
||||||
# [agents.worker_glm]
|
# [agents.worker_glm]
|
||||||
# model_provider = "glm.default"
|
# model_provider = "glm.default"
|
||||||
# risk_profile = "toolfree"
|
# risk_profile = "toolfree"
|
||||||
|
|||||||
Reference in New Issue
Block a user