ChatGPT Sign-In
Connect your personal ChatGPT account for eligible subscription chat in llms.py
The built-in OpenAI Subscription card connects your personal ChatGPT account for eligible text chat through OpenAI's public Sign in with ChatGPT flow. It is separate from signing into llms.py and from configuring an OpenAI API key.
Account eligibility, model access, and usage limits are controlled by OpenAI. This integration follows OpenAI's public registration protocol, which requires permission to use the plan in addition to signing in.
Connect your account
- Open Settings → OpenAI Subscription.
- Select Continue with ChatGPT. If the browser cannot open, use Copy link and open it in your preferred browser.
- Sign into your account and authorize ChatGPT plan usage.
- Sign-in completes automatically and the settings card updates. Select an available OpenAI model.
Once connected, the card shows the signed-in account, confirms the OpenAI API key is disabled for your user, and offers Disconnect:
Local sign-in starts a callback listener before opening the browser. It uses port 1455 when available, or selects another port when occupied. The browser and llms.py must run on the same computer. A sign-in attempt expires after ten minutes; start a fresh attempt if it expires.
For a remote browser, the host can explicitly enable manual completion with
Options(automatic_callback=False). In that mode, paste the complete callback URL into the card;
keep all query parameters, including state and the issued client ID.
If you signed in without granting plan usage, the verified identity is retained but subscription chat stays disabled. Sign in again and authorize it. Model choices come from your connected account rather than assuming every OpenAI model is available.
Subscription usage and API keys
Eligible text requests use the account's authorized ChatGPT plan through the public Responses API. This is not unlimited usage: OpenAI applies account and app limits. Review and manage access in ChatGPT Settings → Usage; see OpenAI's accounts and sessions guide.
Connecting a ChatGPT subscription disables OpenAI API-key access for that user, including image/audio generation. Expired, invalid, or failed grants never fall back to API-key billing. Disconnect the subscription to restore the configured API key and its model catalog; other users are unaffected.
The subscription model list comes from OpenAI's public /v1/models endpoint using your OAuth token.
Only entries marked visibility: "list" appear in the picker, in OpenAI's order; the list is cached for
five minutes. See OpenAI's model catalog guide.
Responses stream with store=false; incomplete streams and provider failures are shown as failures,
not successful answers. No uncertain inference is automatically restarted through a different provider.
OpenAI's preview limitations
and account-specific catalog determine what is supported.
Disconnect and reconnect
Disconnect immediately stops local use and removes the tokens. llms.py attempts remote revocation and retains only the registration mapping so a later sign-in can reuse it. If revocation cannot be confirmed, the UI asks you to remove app access in ChatGPT Settings.
A saved connection from the older private Codex flow requires a fresh public sign-in. Existing CLI
credentials are not silently converted or imported. The extension does not read the operator's
~/.codex/auth.json, and ordinary installations do not expose a local credential-import action.
Privacy and deployment
Each llms.py user has a separate server-side grant at:
$LLMS_HOME/user/<user>/credentials/openai_subscription.jsonUnix credential writes use owner-only permissions and atomic replacement. Tokens stay off browser storage and are never shared between users. State, PKCE, a nonce, and signed identity verification bind a callback to its originating account and sign-in attempt.
Run one server process per data root; token-refresh coordination does not support multiple processes sharing the same rotating credentials. Only one selected ChatGPT registration is supported per local user. On Windows, protect the data directory through the host filesystem's access controls.
Troubleshooting
| Situation | Action |
|---|---|
| Callback page will not load | Restart llms.py and start a fresh sign-in on the same computer as the server |
| Callback rejected or expired | Start a fresh sign-in in the same llms.py account |
| Signed in but cannot chat | Authorize plan usage and check OpenAI account eligibility and available models |
| Requires reconnect | Complete a new public sign-in; old private grants cannot be reused automatically |
| Subscription stream fails | Review the error and account limits; llms.py does not switch billing providers automatically |
| OpenAI choices disappear | Restore a valid connection; other providers and Settings remain usable |
See Credentials for API-key configuration and GitHub Authentication for llms.py application login.