Repository navigation
fix(settings): show one ChatGPT subscription login after Pi 0.99 #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,13 +47,14 @@ import { useUpdateStatus } from "@/entities/update/use-update-status"; | |
| import { isModelVisible } from "@/entities/model/model-selector/model-selector-logic"; | ||
| import { invoke, revealProjectInFinder } from "@/shared/runtime"; | ||
| import type { UpdateStatus } from "@/shared/update-protocol"; | ||
| import type { | ||
| ProviderAuthId, | ||
| ProviderAuthStatusItem, | ||
| ProviderAuthStatusReport, | ||
| ProviderConnectionTestResult, | ||
| ProviderFailureKind, | ||
| RuntimeModelCapability, | ||
| import { | ||
| showsSubscriptionCard, | ||
| type ProviderAuthId, | ||
| type ProviderAuthStatusItem, | ||
| type ProviderAuthStatusReport, | ||
| type ProviderConnectionTestResult, | ||
| type ProviderFailureKind, | ||
| type RuntimeModelCapability, | ||
| } from "@pace/core"; | ||
|
|
||
| type AuthTab = "subscription" | "api_key"; | ||
|
|
@@ -942,7 +943,7 @@ function SettingsContent({ | |
|
|
||
| const providers = statusQuery.data?.providers ?? []; | ||
| const subscriptionProviders = useMemo( | ||
| () => providers.filter((provider) => provider.supportsOAuth), | ||
| () => providers.filter((provider) => showsSubscriptionCard(provider)), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 ChatGPT model mislabeled as API When both ChatGPT providers expose the same model, Learn moreThe model selector adds channel labels when two providers expose the same model. The channel label map says Example: A user keeps an existing Recommended fix: Derive the channel label from the active auth mode as well as provider ID, or remove billing-specific labels when the mode cannot be determined. Test the duplicate-model case with Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| [providers], | ||
| ); | ||
| const visibleApiKeyProviders = useMemo(() => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 ChatGPT login offers unavailable models
After ChatGPT signs in through
openai, the model list falls back to Pi's unfiltered catalog. Account model sources filter ChatGPT plans only underopenai-codexand recognizeopenaiAPI keys only. Users can select models their subscription rejects.Learn more
Pace filters model catalogs per provider to the signed-in account's allowed models. The new Subscription entry signs users in under
openai, but the account-model sources use ChatGPT's account model endpoint only foropenai-codex. Theopenaisource identifies only API-key credentials, so its refresh skips filtering an OpenAI OAuth login. The OpenAI catalog remains available and can contain models outside the ChatGPT subscription; choosing one fails when the session calls the provider.Example: A user signs into ChatGPT under
openaiand sees a catalog model unavailable on their plan. They select it in the composer, and the model request fails instead of the unavailable model being omitted.Recommended fix: Extend the
openaiaccount-model source to detect OAuth versus API-key credentials, use the ChatGPT account endpoint for OAuth, and retain the existing API-key model-list behavior. Cover both credential types with account-model runtime tests.Was this helpful? React with 👍 or 👎 to provide feedback.