feat: add GLM and Kimi document seats - #50
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1757eed76
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case "$model" in gpt-*|codex*|kimi-*) model=""; effort="" ;; esac | ||
| GLM_MODEL="$(resolve_claude_model_alias "${model:-$GLM_MODEL_BASE}")" |
There was a problem hiding this comment.
Filter Claude aliases out of GLM overrides
When a GLM role receives a Claude-shaped override such as --composer-model opus, best, or claude-*, this guard accepts it and the next line resolves aliases such as opus to claude-opus-4-8. invoke_glm then sends that model ID to the Z.AI endpoint, causing the pass to fail instead of falling back to GLM_MODEL_BASE; this is especially likely with a mixed glm,claude pair where the composer override is intended for the Claude seat. Include the Claude-only patterns in the GLM mismatch guard, as the Codex and Kimi arms already do.
Useful? React with 👍 / 👎.
Drop Claude-only model and effort pairs before GLM dispatch so Z.AI always receives a valid GLM model id. Cover aliases in both seat metadata and invocation paths. Co-Authored-By: Codex <noreply@openai.com>
Summary
Adds GLM-5.3-Flash and Kimi K3 as first-class document-pipeline seats, giving co-evolution two free cross-vendor reviewers without changing the Codex/Opus execution and verification path.
The new adapters fail closed around the trust boundaries that matter:
glmreuses the Claude CLI in safe mode with no tools, a child-only Z.AI environment, provider-variable scrubbing, and a loud WSL rejection.kimiuses the official Kimi Code login, runs in a disposable no-tools project, extracts raw Markdown fromstream-jsonwithjq, rejects partial/error output, and guards native Windows command-line limits.flowchart TB Entry[co-evolve CLI or MCP] --> Guard[Typed seat prerequisites] Guard --> GLM[glm seat] Guard --> Kimi[kimi seat] GLM --> SafeClaude[Claude safe mode / no tools] SafeClaude --> ZAI[Z.AI Anthropic-compatible endpoint] Kimi --> Temp[Disposable no-tools project] Temp --> Stream[Kimi Code stream-json] Stream --> Markdown[jq final-assistant extraction]What changed
glmandkimi.CLAUDE_CONFIG_DIRhandling.Verification
tests/run-all.sh: 36/36 suites passed under native Git Bash.git diff --check, and frozen-fixture checks passed.Manual follow-up
Live smoke tests remain intentionally staged until the human-owned credentials exist: take in
ZAI_API_KEY, complete Kimi Code login on each machine, and run the Mac launcher/1Password setup fromdocs/agent-seats.md.