feat(ai): add CommandCode provider (51 models, OpenAI/Anthropic API routes) - #722
Closed
wingwogus wants to merge 2 commits into
Closed
feat(ai): add CommandCode provider (51 models, OpenAI/Anthropic API routes)#722wingwogus wants to merge 2 commits into
wingwogus wants to merge 2 commits into
Conversation
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.
Author
|
Superseded: switching to a CLI-backed integration that works with the Go plan; no Provider API access required. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 providercommandcode(e.g.commandcode/deepseek/deepseek-v4-flash,commandcode/gpt-5.6-sol) and supports/loginwith an API key like other API-key providers.Changes
packages/ai— provider registrationsrc/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/modelsendpoint; Command Code rates)data/commandcode.json,commandcode.models.ts,models.generated.ts, regenerated.manifest.jsonsrc/env-api-keys.ts—COMMANDCODE_API_KEY;src/types.ts—KnownProviderunionpackages/coding-agent— login supportprovider-display-names.ts— display name so/loginand the headlessget_auth_providersRPC offer API-key login (built-in providers need a display name to be API-key eligible)model-resolver.ts— default modeldeepseek/deepseek-v4-flash(Command Code's own default)test/suite/auth-providers-commandcode.test.tsVerification
npm run check(biome, pinned deps, shrinkwrap,tsgo --noEmit, browser/web-ui smoke) — passescheck:model-data— generated model data valid/login→ Sign in with an API key → CommandCode → API key prompt, verified in the built TUI