ce-code-review: allow user-configured cross-model peer routes (e.g. GLM via an Anthropic-compatible endpoint)

オープン
#1,504 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
shell, typescript, yaml
領域
security, tooling

調査の方向性

Start with scripts/cross-model-adversarial-review.sh and references/cross-model-review.md, then trace how cross_model_peer: is read from .compound-engineering/config.local.yaml and how route validation, host exclusion, announcements, and receipts work. The issue sketches desired custom-peer settings but leaves security and design choices open. Done means deciding whether custom routes are supported or curated routes remain the policy, then implementing that decision and documenting it.

索引モデルが issue の本文から書いたものです。

説明

What I ran into

I wanted to use GLM-5.3 (served over z.ai's Anthropic-compatible endpoint) as the independent cross-model adversarial peer in ce-code-review. There is no supported way to do that today, even though the mechanism it would need already exists.

Two hard stops in scripts/cross-model-adversarial-review.sh:

  1. CROSS_MODEL_FIXED_ROUTE only accepts codex | claude | grok-cli | grok-cursor | cursor | composer. Anything else fail-closes, which is correct behaviour — but it means the route set is not extensible.
  2. validate_model_override accepts claude:opus|sonnet|haiku|claude-* only, so binding a non-Anthropic model id to the claude route is rejected as a cross-family substitution — also correct, and also a dead end for this case.

The only mechanically working workaround is to export ANTHROPIC_BASE_URL (or shim a claude binary) so the sanctioned claude route silently reaches a different provider. That defeats the entire point of the disclosure and receipt machinery: the pre-egress announcement would name Anthropic while the diff goes somewhere else. I am not doing that, and I don't think anyone should.

Why this seems worth supporting

The design already separates "which provider" from "which model/effort", already has a user-facing preference key (cross_model_peer: in .compound-engineering/config.local.yaml), and already distinguishes receipt-verified from receipt-less routes in the announce wording. A user-defined route would slot into that structure rather than fight it.

Concretely, several strong coding models now ship an Anthropic-compatible endpoint and are driven by the same claude -p adapter you already have. The delta is a base URL, an auth source, and a model id — not a new adapter.

Rough shape of a proposal

Something like a cross_model_custom_peers: block in config.local.yaml:

cross_model_custom_peers:
  - name: glm
    adapter: claude          # reuse the existing claude -p adapter
    base_url: https://api.z.ai/api/anthropic
    model: glm-5.3
    family: glm              # participates in same-family host exclusion
    receipt: false           # announce as 'serving model unverified on this route'

with, I would suggest:

  • a custom peer never being reachable by default — it must be named in cross_model_peer: or CROSS_MODEL_PEERS, so nothing changes for existing users;
  • the announce naming the endpoint host alongside the model, since the recipient is no longer implied by the route name;
  • receipt: false being the default for custom peers, so the existing "requested X at Y; serving model/effort unverified on this route" wording carries the honesty burden;
  • the declared family feeding the same host-exclusion check, with unknown skipping the pass exactly as it does today.

Happy to be told this is out of scope — the curated-route model is a defensible position, and a self-declared family field is weaker evidence than an attested host. But if the answer is "curated only", it would help to say so in references/cross-model-review.md, because the presence of cross_model_peer: reads like an extension point.

Context: I got here from a project that already treats external review egress as an explicitly authorized, provider-named decision in its own conventions file. The thing I most want to avoid is people reaching for the base-URL workaround because the honest path does not exist.

主要言語
TypeScript
スター
25.6k
フォーク
2.1k
平均マージ
3時間 57分
マージ済み PR(30日)
170

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

EveryInc/compound-engineering-plugin のほかの issue

EveryInc/compound-engineering-plugin の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。