fix(configure): unify OpenAI auth provider picker (#82324)

This commit is contained in:
Peter Steinberger
2026-05-16 01:02:33 +01:00
committed by GitHub
parent 8d3b5c2d19
commit 49e9382cc0
20 changed files with 187 additions and 60 deletions
+4
View File
@@ -101,6 +101,7 @@ describe("normalizeRegisteredProvider", () => {
kind: "custom",
wizard: {
choiceId: " demo-primary ",
onboardingFeatured: true,
modelAllowlist: {
allowedKeys: [" demo/model ", "demo/model"],
initialSelections: [" demo/model "],
@@ -121,6 +122,7 @@ describe("normalizeRegisteredProvider", () => {
wizard: {
setup: {
choiceId: " demo-choice ",
onboardingFeatured: true,
methodId: " missing ",
},
modelPicker: {
@@ -142,6 +144,7 @@ describe("normalizeRegisteredProvider", () => {
kind: "custom",
wizard: {
choiceId: "demo-primary",
onboardingFeatured: true,
modelAllowlist: {
allowedKeys: ["demo/model"],
initialSelections: ["demo/model"],
@@ -155,6 +158,7 @@ describe("normalizeRegisteredProvider", () => {
wizard: {
setup: {
choiceId: "demo-choice",
onboardingFeatured: true,
},
modelPicker: {
label: "Demo models",
+1
View File
@@ -121,6 +121,7 @@ function buildNormalizedWizardSetup(params: {
params.setup.assistantVisibility === "visible"
? { assistantVisibility: params.setup.assistantVisibility }
: {}),
...(params.setup.onboardingFeatured === true ? { onboardingFeatured: true } : {}),
...(groupId ? { groupId } : {}),
...(groupLabel ? { groupLabel } : {}),
...(groupHint ? { groupHint } : {}),
+2
View File
@@ -27,6 +27,7 @@ export type ProviderWizardOption = {
onboardingScopes?: Array<"text-inference" | "image-generation">;
assistantPriority?: number;
assistantVisibility?: "visible" | "manual-only";
onboardingFeatured?: boolean;
};
export type ProviderModelPickerEntry = {
@@ -119,6 +120,7 @@ function buildSetupOptionForMethod(params: {
...(params.wizard.assistantVisibility
? { assistantVisibility: params.wizard.assistantVisibility }
: {}),
...(params.wizard.onboardingFeatured ? { onboardingFeatured: true } : {}),
};
}
+1
View File
@@ -1120,6 +1120,7 @@ export type ProviderPluginWizardSetup = {
choiceHint?: string;
assistantPriority?: number;
assistantVisibility?: "visible" | "manual-only";
onboardingFeatured?: boolean;
groupId?: string;
groupLabel?: string;
groupHint?: string;