Skip to content

Add Command Code GOAT provider - #4943

Draft
Astro-Han wants to merge 2 commits into
mainfrom
feat/providers-commandcode-goat
Draft

Add Command Code GOAT provider#4943
Astro-Han wants to merge 2 commits into
mainfrom
feat/providers-commandcode-goat

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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) renders the new card via the registry-driven catalog path (DOM-checked headlessly: [data-provider="commandcode"] present only with this change)

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
  • 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

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — the add-connection catalog now offers Command Code; described under Summary above
  • No

Command Code (commandcode.ai) exposes every plan model through an
OpenAI-compatible provider API at https://api.commandcode.ai/provider/v1
auth'd with a bearer API key from Studio. GOAT and above include API
access; models list is served at /provider/v1/models, which this entry
uses as its discovery path once a key is saved.

Command Code is not on models.dev, so the shipped GOAT catalog from
commandcode.ai/models is the offline baseline. The runtime adapter is the
standard openai-compatible 'provider' profile (chat-completions wire),
same shape as zenmux/opencode; no per-model overrides or migration
impact — stored connections are unaffected.

Generated-by: Maka
Bilingual (zh-CN/zh-TW/en) catalog card for the new Command Code
provider. The compile-time Record<ProviderType, ...> in
provider-display-copy.ts requires an entry for every registered provider,
so this ships with the registry change.

Generated-by: Maka
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant