Uh oh!
There was an error while loading. Please reload this page.
feat(llm): re-add ChatGPT and Copilot on their sanctioned surfaces - #173
feat(llm): re-add ChatGPT and Copilot on their sanctioned surfaces#173EtienneLescot wants to merge 4 commits into
Conversation
Tracking commit — no changes yet. See the PR description.
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Tracking PR — no changes yet. Opened to hold the design and the checklist for putting the ChatGPT and GitHub Copilot providers back, on the surfaces their vendors actually sanction.
What was removed, and why
release/1.8.0ships withoutopenai-oauth(ChatGPT) andcopilot-proxy(GitHub Copilot). Removed infix/release-1-8-0-review.Both reached a user's subscription by presenting the vendor's own OAuth client ID and an editor User-Agent against endpoints reserved for first-party clients:
app_EMoamEEZ73f0CkXaXp7hrann(Codex CLI)chatgpt.com/backend-apichatgpt-account-idIv1.b507a08c87ecfe98(Copilot editor plugin)api.github.com/copilot_internal/v2/token→api.individual.githubcopilot.comUser-Agent: GitHubCopilotChat/0.26.7,Editor-Version: vscode/1.96.2That was in a signed installer distributed via the Microsoft Store and winget, so the exposure landed on our users' GitHub and OpenAI accounts, not just on us. GitHub states plainly that
copilot_internalis for its officially supported clients and that using it as a generic model provider violates the Copilot license agreement (community#178117).Hiding the UI would not have been enough — the constants had to leave the binary.
The sanctioned replacements
GitHub Copilot → Copilot SDK
@github/copilot-sdk, public preview since April 2026. Setup docs.gho_/ghu_token (fine-grained PATs also work) in the existingsafeStorageblob.copilot_internal— that endpoint only accepts VS Code's, which is precisely why every third-party tool on that path borrows it (hermes-agent#16551, opencode#19338). The SDK is the whole point.ChatGPT →
codex app-servercodex-rs/app-server— the JSON-RPC 2.0 surface behind OpenAI's own VS Code extension.initialize, thenthread/start/turn/start/turn/interrupt.codex login, so their ChatGPT plan is consumed by Codex itself.clientInfo.nameidentifies us to OpenAI's Compliance Logs Platform — set it honestly toopenscreen. This is the opposite of the header spoofing we just deleted.Work
Neither is a header swap: both are agent runtimes (threads/turns/items), while the current provider path is OpenAI-shaped
/chat/completionsvia LangChain. Expect a real adapter for each, and prefer two PRs over one.@github/copilot-sdk, with token storage/refresh inLlmConfigStorecodex app-serverover stdio, withclientInfo.name = "openscreen"ProviderDefinition["authKind"](narrowed to"api-key"in the removal) and restore the corresponding provider-card pillspillOAuth,startLogin,openLoginPage, … — 14 keys × 13 locales)electron/ai-edition/provider-registry.test.ts, which currently asserts these two providers are absent and that no provider points at a first-party-only host. It should keep failing forcopilot_internal/chatgpt.com/backend-api— only the "api-key only" assertion should relaxOpen questions
Not blocked on this
The eight API-key providers (Claude, OpenAI, Gemini, Mistral, OpenRouter, MiniMax ×2, OpenAI-compatible) are untouched and cover the same use case for anyone with a key. This is about supporting subscriptions people already pay for — worth doing properly, not worth rushing.