Skip to content

feat(ai): add CommandCode provider (51 models, OpenAI/Anthropic API routes) - #722

Closed
wingwogus wants to merge 2 commits into
code-yeongyu:mainfrom
wingwogus:add-commandcode-provider
Closed

feat(ai): add CommandCode provider (51 models, OpenAI/Anthropic API routes)#722
wingwogus wants to merge 2 commits into
code-yeongyu:mainfrom
wingwogus:add-commandcode-provider

Conversation

@wingwogus

@wingwogus wingwogus commented Aug 5, 2026

Copy link
Copy Markdown

Summary

Adds Command Code as a full built-in provider, backed by the Command Code Provider API (https://api.commandcode.ai/provider/v1). It is selectable as provider commandcode (e.g. commandcode/deepseek/deepseek-v4-flash, commandcode/gpt-5.6-sol) and supports /login with an API key like other API-key providers.

Changes

packages/ai — provider registration

  • src/providers/commandcode.ts — provider factory with dual-API dispatch: Claude models → Anthropic Messages route, all other models → OpenAI Chat Completions route (Command Code validates the model→endpoint split server-side and returns 400 on mismatch)
  • scripts/generate-models.ts — static 51-model catalog (ids/context windows from the public /provider/v1/models endpoint; Command Code rates)
  • Generated data: data/commandcode.json, commandcode.models.ts, models.generated.ts, regenerated .manifest.json
  • src/env-api-keys.tsCOMMANDCODE_API_KEY; src/types.tsKnownProvider union
  • README provider/env table

packages/coding-agent — login support

  • provider-display-names.ts — display name so /login and the headless get_auth_providers RPC offer API-key login (built-in providers need a display name to be API-key eligible)
  • model-resolver.ts — default model deepseek/deepseek-v4-flash (Command Code's own default)
  • Regression test: test/suite/auth-providers-commandcode.test.ts

Verification

  • npm run check (biome, pinned deps, shrinkwrap, tsgo --noEmit, browser/web-ui smoke) — passes
  • check:model-data — generated model data valid
  • Provider/model-data/auth tests — pass (providers, model-data, auth-providers-commandcode, oauth-selector, RPC auth)
  • Manual: /login → Sign in with an API key → CommandCode → API key prompt, verified in the built TUI

Registers commandcode as a built-in provider backed by the Command Code Provider API
(https://api.commandcode.ai/provider/v1). Claude models use the Anthropic
Messages route; all other models use the OpenAI Chat Completions route,
matching Command Code's model-to-endpoint validation.

- 51-model catalog generated from the public /provider/v1/models endpoint
- Auth via COMMANDCODE_API_KEY (envApiKeyAuth, /login compatible)
- Generated data: commandcode.json, commandcode.models.ts, manifest update
Adds CommandCode to BUILT_IN_PROVIDER_DISPLAY_NAMES so /login and the
headless get_auth_providers RPC offer API-key login, plus a regression
test pinning the eligibility.
@wingwogus

Copy link
Copy Markdown
Author

Superseded: switching to a CLI-backed integration that works with the Go plan; no Provider API access required.

@wingwogus wingwogus closed this Aug 5, 2026
@wingwogus
wingwogus deleted the add-commandcode-provider branch August 5, 2026 04:09
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