Skip to content

feat: add GLM and Kimi document seats - #50

Merged
alanshurafa merged 2 commits into
masterfrom
claude/chinese-model-co-evolution-e877ff
Aug 29, 2026
Merged

feat: add GLM and Kimi document seats#50
alanshurafa merged 2 commits into
masterfrom
claude/chinese-model-co-evolution-e877ff

Conversation

@alanshurafa

Copy link
Copy Markdown
Owner

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:

  • glm reuses the Claude CLI in safe mode with no tools, a child-only Z.AI environment, provider-variable scrubbing, and a loud WSL rejection.
  • kimi uses the official Kimi Code login, runs in a disposable no-tools project, extracts raw Markdown from stream-json with jq, rejects partial/error output, and guards native Windows command-line limits.
  • Role resolution, prerequisite checks, model metadata, unknown-agent handling, and the pinned single-process GLM-to-Claude leak regression now cover all four seats.
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]
Loading

What changed

  • Extends the shell dispatcher and MCP schema/runtime with glm and kimi.
  • Records concrete seat models and rejects unsupported Kimi effort assignments honestly.
  • Adds Windows, PowerShell, Git Bash, and macOS launcher/setup guidance with isolated CLAUDE_CONFIG_DIR handling.
  • Adds a roster-independent seat-selection procedure to the existing Model Routing documentation.
  • Adds hermetic coverage for credential scoping, provider scrubbing, no-tools behavior, partial output, WSL routing, launcher isolation, Kimi authentication, and opt-in live GLM validation.

Verification

  • tests/run-all.sh: 36/36 suites passed under native Git Bash.
  • MCP: 9/9 tests passed.
  • GLM launcher isolation: 2/2 scenarios passed.
  • Kimi seat: 8/8 scenarios passed.
  • Document seats: 8/8 scenarios passed, including the single-run GLM-to-Claude leak check.
  • Shell syntax, PowerShell parsing, git diff --check, and frozen-fixture checks passed.
  • Live API tests remained disabled; no credential or model request was used during automated verification.

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 from docs/agent-seats.md.


Compound Engineering
Codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread co-evolve-bouncer.sh Outdated
Comment on lines +687 to +688
case "$model" in gpt-*|codex*|kimi-*) model=""; effort="" ;; esac
GLM_MODEL="$(resolve_claude_model_alias "${model:-$GLM_MODEL_BASE}")"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@alanshurafa
alanshurafa merged commit 40f9fcd into master Aug 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant