feat(chatgpt): add the ChatGPT subscription adapter and login
Rhema had no way to spend a ChatGPT subscription: the models were reachable only through an OpenAI API key, which bills the API account instead. The new adapter signs in through OpenAI's browser OAuth flow with PKCE and a loopback callback, stores the returned token JSON as the instance credential, and sends turns to the Codex Responses backend with the subscription's live model catalog. The flow runs on the existing InteractiveLogin seam, so the wizard, the settings dialog, and the headless frontend all drive it. The TUI shows the link's host with an open button and a copy button: enter opens the default browser, and c copies the full URL, which keeps a long authorization query off the screen and out of a manual selection. The provider registry, config, ACP, claw, and the web settings page gain the new provider kind.
This commit is contained in:
1 parent
05045e4ee5
commit
3e2ff7599d
5 files changed
+16
-5
No files matched your search
@@ -204,7 +204,8 @@ export type AgentImageKind = 'avatar' | 'logo'
|
||||
|
||||
/** The credentials a provider login carries: the instance name (the
|
||||
* kind when omitted), the kind (required on an id's first login), an
|
||||
* API key (a GitHub token for copilot), and a server URL for
|
||||
* API key (a GitHub token for copilot, the sign-in JSON for chatgpt),
|
||||
* and a server URL for
|
||||
* llama.cpp. Empty optionals are omitted, never sent as "" strings. */
|
||||
export interface ProviderCredentials {
|
||||
name?: string
|
||||
|
||||
Reference in new issue
Block a user