Repository navigation
Description
Is your feature request related to a problem?
Yes. Command Code (the cmd CLI from commandcode.ai, Node-based harness, npm package @commandcode/harness) is not in the client support matrix, and today its official catalog/gateway models are silently never compressed: per docs/clients.md #1290, the gateway posts to a custom wire (/alpha/generate), which bili relays byte-for-byte as an unrecognized path. Only the Provider-plan endpoint (/provider/v1/chat/completions, a standard wire) is compressed. Users on the catalog models get no signal that compression never engages.
What already works today (no bili changes needed)
Command Code has a BYOK system (~/.commandcode/providers.json) with a per-provider baseURL and three declared wires (openai-completions / openai-responses / anthropic-messages). That fits the #2340 "adopting unlisted clients" route exactly: prepend http://127.0.0.1:8787/bili/ to a provider's baseURL, run bili start, and any BYOK model rides compression. Request: add Command Code to the #2340 verified-entry-points table (column: baseURL in ~/.commandcode/providers.json).
What a native lane could look like (seam inventory)
Command Code ships enough declarative surface for a zcode-style posture:
- Provider store rewrite —
providers.jsonis plain JSON with per-provider (and per-model)baseURL; same shape as the zcode provider-store rewrite (loopback targets skipped,"direct"exemptions,.bili-baksnapshot). SessionStarthook — fires on startup/resume/clear, injects context only (non-blocking); good fit for the attach-or-spawn bootstrap MCP child, same as zcode'shooks.enabled+SessionStarthook.- stdio MCP servers — natively supported; the four ACP tools (
compress/decompress/search_context/acp_status) register like any other MCP server. - Mods (ModApi) — a TypeScript plugin API (
cmd.addProvider, event observers, lifecycle hooks, input interception). It is the same internal API Command Code's own built-in providers are written against, so an in-process seam (pi/dsh/opencode-style fetch patch or provider-transport override) may exist — worth an evaluation; I could not confirm request-level HTTP interception from the public docs alone.
Describe the solution you'd like
- Short term: document the BYOK
/bili/prefix path (one row in 客户端收养:剩余低成本可接入客户端(Crush / Zed / Continue / Cline 家族等) #2340's table), and/or abili plugin install commandcodethat does the providers.json rewrite + SessionStart hook + MCP entry (zcode posture). - Open question: is recognizing the
/alpha/generategateway wire feasible/desirable, or does that need cooperation from Command Code itself? (If their Provider plan/provider/v1/chat/completionsis the recommended BYOK-adjacent endpoint, maybe a docs note pointing catalog users there suffices.)
Context
- Verified against bili master docs (README "Which do I need", docs/clients.md dsh使用插件dsh-commandcode-provider反代go套餐的话,不进billion-context压缩 #1290 / 客户端收养:剩余低成本可接入客户端(Crush / Zed / Continue / Cline 家族等) #2340) and Command Code's own docs (BYOK provider schema, hooks reference, ModApi surface) as of 2026-11-09.
- bili is pure JS (
mysql2+zoddeps,node:sqlitebuilt-in) — installs and runs fine on loong64/LoongArch (no native-addon problem), unlike most agent CLIs.
Environment
- OS: UOS 20 (deb-based), Arch: loongarch64
- Node: v24.22.2
- Command Code CLI: installed at
~/.local/opt/command-code
Activity
ranxianglei commentedon Nov 9, 2026
(ai: vllm-qwen/qwen3.8-27b)
Duplicate screening: no exact duplicate; however, item 3 of this issue (compressing the
/alpha/generategateway wire) overlaps open #1295 — same mechanism (custom-wire model endpoints never enter compression). Per one-issue-per-mechanism policy I linked them instead of splitting anything; see also my note under #1295.Labels:
command-code(new) ·scope/wiring·p3(+needs-decision) — client-integration feature request, wiring scope, no availability impact (a working path exists today).What I verified
1. BYOK path (your "what already works") — confirmed. Cross-checked against Command Code's public BYOK docs:
~/.commandcode/providers.jsoncarries per-provider (and per-model)baseURLwith the three declared wires (openai-completions/openai-responses/anthropic-messages); keys live separately inauth.json, so the file being edited never holds secrets. All three wires end in paths bili already recognizes (/chat/completions,/responses,/v1/messages), so prependinghttp://127.0.0.1:8787/bili/to a provider'sbaseURLrides compression — exactly as you reported. Shipped as the doc row you asked for: PR #5997 (table row in en+zh, plus one note disambiguating BYOK vs catalog models; labeled documentation/scope/docs/p3).2. Your open question (gateway wire) — already answered by work in flight; no Command Code cooperation needed. This exact wall is what #1290 reported (Command Code plan traffic →
/alpha/generate→ zero compression); #1291 made it loud; and #1295 got owner approval (2026-09-26) and is implemented in PR #1444 — still open, awaiting merge (verified live just now; the symbols are absent from current master). It adds a declarable custom-wire config plus a first new wire familycommandcode, built from the endpoint's real envelope+JSONL contract. Once merged and released, one config line compresses catalog models:So: feasible, already built, waiting only on the owner merging #1444. Nothing new to file — #1295 owns it.
3. Native-lane seams — assessed; decision requested in my next comment. The providers.json rewrite is feasible (plain JSON, same pattern as the zcode store rewrite: loopback targets skipped,
.bili-baksnapshot). SessionStart hook + stdio MCP are documented surfaces that fit the zcode bootstrap posture. One useful observation: the zcode posture does not require ModApi-level interception — it works entirely through declarative seams, so the lane design stays open even though request-level HTTP interception from ModApi remains unconfirmed. Cost class ≈ the zcode module (four source files) plus ongoing maintenance across their releases (their BYOK is explicitly Beta — the schema can move). Options with costs are in the decision comment below.Status: duplicate screening done · labels applied · doc row shipped (PR #5997, CI pending) · wire question routed to #1295/#1444 · native lane parked as needs-decision.
ranxianglei commentedon Nov 9, 2026
🔶 需要决策
Background (one line): Command Code's BYOK path is now documented (PR #5997) and its catalog-model compression gap is already fixed but unmerged (#1295 → PR #1444); what remains is whether to build a native lane for this client.
Pending decision: build a
bili plugin install commandcodelane (zcode-style: providers.json rewrite + SessionStart hook + stdio MCP entry)?Options (each with cost):
baseURLprefix) for BYOK compression. Cost: ~0. Remaining gap: hand-edit once per provider; catalog models still need [PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444 merged regardless of this choice.src/commandcode/module at zcode scale (~4 files: store rewrite with loopback-skip +.bili-baksnapshot, SessionStart bootstrap hook, stdio MCP entry exposing the four ACP tools, watchdog), plus route-policy config knobs (a Configuration-Surface report would be required before building them), plus ongoing maintenance across their releases — their BYOK is explicitly Beta upstream, so the schema can move under us (the zcode lane alone has absorbed signing-block regressions across releases). It cannot be e2e-tested in CI (external CLI); pre-work = installcmdin a disposable workspace and capture real provider/hook/MCP traffic to pin the exact contracts. Value: zero-config BYOK compression + session-bound native ACP tools; makes it the 10th maintained client lane in a fleet that already carries nine.My recommendation: A now; revisit B only after #1444 merges (a lane would have to declare
modelEndpointPatternsanyway to help catalog models) and against real-CLI verification, ideally driven by continued demand from actual users. Rationale: the highest-value gap (catalog models) is solved by #1444 regardless of lane shape; BYOK compression works today with one documented edit; building a maintained lane on a beta upstream schema risks rework; and the reporter themselves frames the lane as "worth an evaluation" with the ModApi seam unconfirmed.Default behavior if undecided: stay at A — PR #5997 ships the doc row, no lane code starts, thread stays labeled needs-decision.
结构化八问(供评审):
cmd,抓真实流量钉死 providers.json/hook/MCP 契约,再按 zcode 规模实现(fixture JSON 单测,CI 跑不了外部 CLI)。Merge pull request #5997 from ranxianglei/2026-11-09_command-code-byo…
docs(clients): add Command Code BYOK entry point to verified-entry-po…