Use official Command Code Provider API#6
Draft
patlux wants to merge 5 commits into
Draft
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
this will make it impossible to use with go plan right? |
Owner
Author
No. This implements the use of the official API which only works with the Pro Plan. The current authentication works with the Go plan. |
|
@patlux Hello :-) Are you still planning implementing this ? Many thanks |
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.
Why
Refs #5. Command Code asked integrations to stop using internal/reverse-engineered API paths and use the documented Provider API instead. This moves the provider to the official API surface and keeps both authentication paths available.
What
/alpha/generatestreaming implementation with pi's built-in OpenAI-compatible and Anthropic provider support.GET /provider/v1/modelsfor model discoveryPOST /provider/v1/chat/completionsfor non-Claude modelsPOST /provider/v1/messagesfor Claude models/loginflow./loginpath where users can paste a Command Code Studio API key directly.COMMANDCODE_API_KEY,~/.commandcode/auth.json, and pi auth storage.How
/modelsendpoint at startup.claude-*models asanthropic-messages; all other models useopenai-completions.COMMANDCODE_API_BASEfor the Provider API base andCOMMANDCODE_MODELS_URLfor model-list mocks/tests./v1.Testing
Local checks pass:
npm run typechecknpm run format:checknpm testnpm pack --dry-runpi --no-extensions -e ./index.ts --list-modelsLive Provider API completion calls are untested because I do not have the required Command Code Pro plan. I also do not use Command Code anymore because
chatgpt-5.5 >>> any-other-model ;).If someone with a Command Code Pro plan can test this against the live Provider API, please let us know whether both
/chat/completionsand/messageswork as expected.