Skip to content

feat(models): sign in with a ChatGPT plan in one click, beside Use a server - #2259

Merged
AnishSarkar22 merged 2 commits into
MODSetter:devfrom
AnishSarkar22:feat/chatgpt-connect-entry
Oct 14, 2026
Merged

AnishSarkar22 merged 2 commits into
MODSetter:devfrom
AnishSarkar22:feat/chatgpt-connect-entry

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Use your ChatGPT plan is a row of its own, below Use a server, on Settings › Text gen › Add model and on onboarding's text step. It shows only where the backend's sign-in serves includes the slot, so only for text generation.
    • Sign in with ChatGPT starts the sign-in in one click and opens the browser. Before, it took 4 to 5 clicks through the server dialog's provider list.
    • While signing in, the row shows the dialog's progress ("Finish signing in in your browser", Open the sign-in page again), with Cancel in place of the button. A declined host or a failed sign-in reads as it does in the dialog, and can be tried again.
    • Once signed in, it opens the new connection's models, as connecting a server does.
    • With a plan already connected, the row reads "Connected as {email}" and offers Show models.
    • It uses the ChatGPT icon, added to the app's icon set.
  • The server dialog's provider list no longer offers ChatGPT for a new connection. It still shows it while editing a ChatGPT connection, so rename, Sign out and Sign in again keep working. The form no longer needs the slot it was opened for, so that prop is gone from the form, the dialog and the server card.
  • Onboarding spacing: the last row keeps clear of the scroll edge, the two rows sit 20px apart like the rest, and the ChatGPT button is centred as the server row's is.
  • The sign-in progress moved into its own component, shared by the dialog and the row.
  • 7 new interface strings, translated into all 9 languages. The provider list's "Chat only" hint is retired from all 10 catalogs.
  • Docs: chatgpt-subscription.md and the Add model passage in local-models/catalog.md.

Why

A ChatGPT plan is the quickest way to a chat model for many users, but it was hidden as the second option in a provider dropdown inside the "Connect a server" dialog. Onboarding never mentioned it.

Fixes #

How to test

  • cd surfsense_local/frontend && pnpm vitest run --environment jsdom src/features/settings src/features/onboarding src/features/models: 185 passed.
    • chatgpt-option.test.tsx: hidden where a plan can't fill the slot; one-click sign-in hands over the new connection; Cancel during sign-in; a failure can be retried; an account already connected offers Show models.
    • Settings and onboarding: the row sits below Use a server.
    • The provider list never offers ChatGPT for a new connection; signing an existing ChatGPT connection in again still works.
  • pnpm tsc -b, eslint, pnpm translations:verify and node scripts/check_translations.mjs pass.
  • By hand: Settings › Text gen › Add model, and onboarding's text step. Sign in with ChatGPT, then check the row shows Connected as your email with Show models.

High-level PR Summary

This PR makes signing in with a ChatGPT Plus/Pro subscription more discoverable by adding a dedicated Use your ChatGPT plan option directly beside Use a server on the Add model page and during onboarding. Previously, users had to navigate through 4-5 clicks within the server connection dialog to find this option. The new one-click flow opens the browser for authentication and automatically displays the connected account's models upon success. The ChatGPT provider has been removed from the server dialog's provider list for new connections (though it remains visible when editing existing ChatGPT connections). All changes include comprehensive test coverage and translations for 9 languages.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 docs/architecture/chatgpt-subscription.md
2 docs/architecture/local-models/catalog.md
3 surfsense_local/frontend/src/components/ui/icons.tsx
4 surfsense_local/frontend/src/features/models/remote/connections/chatgpt/sign-in-progress.tsx
5 surfsense_local/frontend/src/features/models/remote/connections/chatgpt/chatgpt-option.tsx
6 surfsense_local/frontend/src/features/models/remote/connections/chatgpt/chatgpt-option.test.tsx
7 surfsense_local/frontend/src/features/models/remote/connections/chatgpt/chatgpt-sign-in.tsx
8 surfsense_local/frontend/src/features/models/remote/connections/connection-form.tsx
9 surfsense_local/frontend/src/features/models/remote/connections/connection-form.test.tsx
10 surfsense_local/frontend/src/features/models/add-model/add-model-options.tsx
11 surfsense_local/frontend/src/features/models/add-model/server-card.tsx
12 surfsense_local/frontend/src/features/models/remote/connections/connection-dialog.tsx
13 surfsense_local/frontend/src/features/onboarding/model-step/server/server-option.tsx
14 surfsense_local/frontend/src/features/onboarding/model-step/server/server-path.tsx
15 surfsense_local/frontend/src/features/onboarding/model-step/model-step.tsx
16 surfsense_local/frontend/src/features/settings/models/model-slot-settings.tsx
17 surfsense_local/frontend/src/features/settings/models/chat-models-settings.test.tsx
18 surfsense_local/frontend/src/features/onboarding/onboarding-page.test.tsx
19 surfsense_local/frontend/src/features/models/remote/connections/chatgpt/chatgpt-sign-in.test.tsx
20 surfsense_local/frontend/translations/en.json
21 surfsense_local/frontend/translations/de.json
22 surfsense_local/frontend/translations/es.json
23 surfsense_local/frontend/translations/fr.json
24 surfsense_local/frontend/translations/hi.json
25 surfsense_local/frontend/translations/ja.json
26 surfsense_local/frontend/translations/ko.json
27 surfsense_local/frontend/translations/pt-BR.json
28 surfsense_local/frontend/translations/ru.json
29 surfsense_local/frontend/translations/zh-CN.json

Need help? Join our Discord

Summary by CodeRabbit

  • New Features
    • Added a Use your ChatGPT plan option to model setup in Settings and onboarding when the plan is available for the selected model slot.
    • Sign in directly from the option, cancel while sign-in is in progress, retry after a failed attempt, and open the available models for a connected account.
  • Changes
    • ChatGPT subscriptions are now available only when editing an existing connection in the connection form; new connections are started through the dedicated plan option.
    • Updated translations and setup guidance across supported languages.

…server

Settings' Add model page and onboarding's text step offer Use your ChatGPT
plan above Use a server, wherever a plan can fill the slot, instead of only
inside the server dialog's provider list. One click signs in, the sign-in's
progress shows in the row, and the new connection's models open as a
server's do; a plan already connected offers Show models.
A new ChatGPT connection is made only through Use your ChatGPT plan, now
below Use a server in Settings and onboarding; the server dialog's provider
list offers ChatGPT only while editing one, so signing in again still works.
The form no longer needs the slot it was opened for. In onboarding the last
row keeps clear of the scroll edge, the rows sit 20px apart, and the ChatGPT
button is centred as the server row's is.
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: MODSetter/SurfSense/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 470ec7ca-b339-4bd1-9f95-ccfc4a8492ae
📥 Commits

Reviewing files that changed from the base of the PR and between 06c729a and 87006ca.

📒 Files selected for processing: 29
  • docs/architecture/chatgpt-subscription.md
  • docs/architecture/local-models/catalog.md
  • surfsense_local/frontend/src/components/ui/icons.tsx
  • surfsense_local/frontend/src/features/models/add-model/add-model-options.tsx
  • surfsense_local/frontend/src/features/models/add-model/server-card.tsx
  • surfsense_local/frontend/src/features/models/remote/connections/chatgpt/chatgpt-option.test.tsx
  • surfsense_local/frontend/src/features/models/remote/connections/chatgpt/chatgpt-option.tsx
  • surfsense_local/frontend/src/features/models/remote/connections/chatgpt/chatgpt-sign-in.test.tsx
  • surfsense_local/frontend/src/features/models/remote/connections/chatgpt/chatgpt-sign-in.tsx
  • surfsense_local/frontend/src/features/models/remote/connections/chatgpt/sign-in-progress.tsx
  • surfsense_local/frontend/src/features/models/remote/connections/connection-dialog.tsx
  • surfsense_local/frontend/src/features/models/remote/connections/connection-form.test.tsx
  • surfsense_local/frontend/src/features/models/remote/connections/connection-form.tsx
  • surfsense_local/frontend/src/features/onboarding/model-step/model-step.tsx
  • surfsense_local/frontend/src/features/onboarding/model-step/server/server-option.tsx
  • surfsense_local/frontend/src/features/onboarding/model-step/server/server-path.tsx
  • surfsense_local/frontend/src/features/onboarding/onboarding-page.test.tsx
  • surfsense_local/frontend/src/features/settings/models/chat-models-settings.test.tsx
  • surfsense_local/frontend/src/features/settings/models/model-slot-settings.tsx
  • surfsense_local/frontend/translations/de.json
  • surfsense_local/frontend/translations/en.json
  • surfsense_local/frontend/translations/es.json
  • surfsense_local/frontend/translations/fr.json
  • surfsense_local/frontend/translations/hi.json
  • surfsense_local/frontend/translations/ja.json
  • surfsense_local/frontend/translations/ko.json
  • surfsense_local/frontend/translations/pt-BR.json
  • surfsense_local/frontend/translations/ru.json
  • surfsense_local/frontend/translations/zh-CN.json
 ___________________________________________________________________
< Your commit message says 'quick fix'. That's how folklore starts. >
 -------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AnishSarkar22
AnishSarkar22 merged commit 3ba90ae into MODSetter:dev Oct 14, 2026
26 of 29 checks passed
AnishSarkar22 pushed a commit to AnishSarkar22/SurfSense that referenced this pull request Oct 16, 2026
The 2.2.2 entry for the website's changelog: sources ready in seconds
(MODSetter#2289), speech recognition for recordings and voice input (MODSetter#2264, MODSetter#2273),
plugin search, permissions, licensing and speed (MODSetter#2256, MODSetter#2260, MODSetter#2261,
MODSetter#2262, MODSetter#2270, MODSetter#2291), ChatGPT plan sign-in (MODSetter#2259), MP3 podcasts (MODSetter#2183),
and the fixes, known issues and developer notes since v2.2.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant