You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/09/07 01:13:46 UTC
[PR] Add Command Code GOAT provider [maka]
Astro-Han opened a new pull request, #4943:
URL: https://github.com/apache/maka/pull/4943
## Summary
Adds Command Code (commandcode.ai) as a first-class provider, covering its **GOAT** plan.
Command Code exposes every plan model through an OpenAI-compatible provider API:
- base URL `https://api.commandcode.ai/provider/v1`, auth via a bearer API key from Studio (GOAT and above include API access; only the free Go plan does not)
- `POST /chat/completions` on the OpenAI wire and `GET /models` for model discovery, with streaming and end-of-stream usage
`packages/core/src/provider-registry.ts` registers `commandcode` with the standard `openai-compatible` "provider" runtime adapter (same shape as zenmux/opencode), `kind: 'protocol'` model discovery — the live `/models` catalog becomes authoritative once a key is saved — and a GOAT model baseline transcribed from commandcode.ai/models. Command Code is not on models.dev, so there is no generated metadata for it; the shipped list is the offline offer.
`apps/desktop/src/renderer/settings/provider-display-copy.ts` gains the bilingual (zh-CN / zh-TW / en) catalog card; the compile-time `Record<ProviderType, …>` contract requires an entry for every registered provider.
No change to existing connections; no migration.
## Verification
- `@maka/core`: build + full suite — 816 pass (includes provider catalog contract invariants over the new entry)
- `@maka/runtime`: provider-conformance 26 pass; provider-contract-matrix / model-fetcher / model-adapter / provider-error-classification / model-factory — 247 pass (the conformance matrix derives rows from the registry, so `commandcode` is exercised generically)
- renderer `tsc --noEmit` clean; biome format + lint clean
- Provider catalog story (Add Connection Catalog), same story and viewport, container expanded past its scroll overflow so the full list is in frame, light + dark:


Remaining end-to-end check: wiring a GOAT API key and sending one request. No key was available in this environment; if a keyed run surfaces a model id mismatch, the `/models` discovery refreshes the baseline and `brokenModelIds` can quarantine the id.
## AI use
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Maka authored the registry entry, model baseline, catalog copy, storybook evidence, and this PR text. Both commits carry `Generated-by: Maka` trailers.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — the add-connection catalog now offers Command Code; described under Summary above
- [ ] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] Add Command Code GOAT provider [maka]
Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #4943:
URL: https://github.com/apache/maka/pull/4943#discussion_r3946371499
##########
packages/core/src/provider-registry.ts:
##########
@@ -1464,6 +1464,19 @@ const providerRegistry = {
signupUrl: 'https://modelstudio.console.alibabacloud.com/',
catalogOrder: 41.4,
},
+ commandcode: {
+ label: 'Command Code',
+ baseUrl: 'https://api.commandcode.ai/provider/v1',
+ authKind: 'api_key',
+ fallbackModels: [],
+ status: 'ready',
+ runtimeAdapter: { kind: 'openai-compatible', name: 'provider' },
Review Comment:
**[P2] With discovery as the only source of models, the picker will offer Claude, and every Claude request from this adapter is documented to fail.**
Three settings on this entry combine into a reachable failure:
- `runtimeAdapter: { kind: 'openai-compatible', name: 'provider' }` — all traffic goes to `/chat/completions`;
- `modelDiscovery: { kind: 'protocol' }` with `fallbackModels: []` — **the picker is populated entirely from the remote catalog**, with nothing shipped to shield it;
- `status: 'ready'`.
The vendor's own Provider API documentation is explicit on both halves. It exposes `/chat/completions`, `/messages` and `/models`; it advertises the catalog as *"The best open & closed models on one API: Claude, GPT, Gemini, & top open-models"*; and it names this exact mistake as a 400: *"Wrong endpoint for the model (Claude on `/chat/completions` or non-Anthropic on `/messages`)"*.
So a user who saves a valid plan credential gets a model list that includes Claude, and selecting one produces a hard failure on every request. **That is ordinary use, not an edge case** — Claude is the first name in the vendor's own list of what the plan buys. This PR's own verification already observed it: *"Claude on Chat Completions returned HTTP 400."*
**I am raising it even though the Remaining-work section discloses it and #4948 tracks it.** The disclosure is accurate and the draft state is honest, and I am not asking for the per-model routing work to happen here. What the tracker does not do is make the state safe if this entry ships as it stands: a tracked follow-up is a plan, not a guard. Two shapes would close the gap without waiting for #4948 — **filter Anthropic ids out of the discovered list** so the picker only offers what this adapter can actually send, or **hold `status` below `ready`** until routing exists. Either keeps a user from choosing a model that cannot work.
<details><summary>简体中文</summary>
**[P2] 当模型来源只有远端发现时,选择器会提供 Claude,而这个适配器发出的每一次 Claude 请求,按厂商文档都必然失败。**
这个条目上的三项设置合起来构成一条可达的失败路径:
- `runtimeAdapter: { kind: 'openai-compatible', name: 'provider' }` —— 所有流量都走 `/chat/completions`;
- `modelDiscovery: { kind: 'protocol' }` 且 `fallbackModels: []` —— **选择器完全由远端目录填充**,没有任何随包内容为它兜底;
- `status: 'ready'`。
**厂商自己的 Provider API 文档对这两半都写得很直接。** 它暴露 `/chat/completions`、`/messages` 与 `/models`;把目录宣传为 *"The best open & closed models on one API: Claude, GPT, Gemini, & top open-models"*;并且**把这个错误原样列为 400**:*"Wrong endpoint for the model (Claude on `/chat/completions` or non-Anthropic on `/messages`)"*。
于是:**一个保存了有效套餐凭据的用户,会拿到一份包含 Claude 的模型列表,而选中其中任意一个,都会让每一次请求硬失败。** **这是普通使用,不是边缘情形** —— Claude 正是厂商自己列举「这个套餐买到什么」时的第一个名字。**本 PR 自己的验证其实已经观察到了**:*"Claude on Chat Completions returned HTTP 400."*
**我仍然提出它,尽管 Remaining work 已披露、且 #4948 在跟踪。** 那份披露是准确的,draft 状态也是诚实的,**我也不要求把按模型路由的工作放到这一单来做。** 但 tracker 做不到的一件事是:**如果这个条目就以现状发布,它并不会因此变安全 —— 一个被跟踪的后续是一份计划,不是一道守卫。** 有两种形状可以在不等 #4948 的前提下补上:**把 Anthropic 的 id 从发现结果中过滤掉**,使选择器只提供这个适配器真能发送的模型;或者**在路由能力存在之前,不要把 `status` 置为 `ready`**。两者都能防止用户选到一个根本无法工作的模型。
</details>
---
> **Automated review notice:** This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] Add Command Code GOAT provider [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed pull request #4943: Add Command Code GOAT provider
URL: https://github.com/apache/maka/pull/4943
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] Add Command Code GOAT provider [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #4943:
URL: https://github.com/apache/maka/pull/4943#issuecomment-5571176566
I closed this PR because #4957 already merged the Command Code provider registration, dynamic model discovery, catalog copy, and generic Cpu icon from this PR, together with the per-model protocol routing needed for Claude support.
The Command Code / GOAT integration is now on main; it has not been dropped. No separate merge of this PR is needed. Sorry for not explaining the closure here sooner.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org