mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
fix(configure): unify OpenAI auth provider picker (#82324)
This commit is contained in:
committed by
GitHub
parent
8d3b5c2d19
commit
49e9382cc0
@@ -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",
|
||||
|
||||
@@ -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 } : {}),
|
||||
|
||||
@@ -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 } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1120,6 +1120,7 @@ export type ProviderPluginWizardSetup = {
|
||||
choiceHint?: string;
|
||||
assistantPriority?: number;
|
||||
assistantVisibility?: "visible" | "manual-only";
|
||||
onboardingFeatured?: boolean;
|
||||
groupId?: string;
|
||||
groupLabel?: string;
|
||||
groupHint?: string;
|
||||
|
||||
Reference in New Issue
Block a user