mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-23 07:01:40 +00:00
refactor: move legacy auth choice aliases into plugin manifests
This commit is contained in:
@@ -192,6 +192,7 @@ export const GENERATED_BUNDLED_PLUGIN_METADATA = [
|
||||
provider: "anthropic",
|
||||
method: "cli",
|
||||
choiceId: "anthropic-cli",
|
||||
deprecatedChoiceIds: ["claude-cli"],
|
||||
choiceLabel: "Anthropic Claude CLI",
|
||||
choiceHint: "Reuse a local Claude CLI login on this host",
|
||||
groupId: "anthropic",
|
||||
@@ -11374,6 +11375,7 @@ export const GENERATED_BUNDLED_PLUGIN_METADATA = [
|
||||
provider: "openai-codex",
|
||||
method: "oauth",
|
||||
choiceId: "openai-codex",
|
||||
deprecatedChoiceIds: ["codex-cli"],
|
||||
choiceLabel: "OpenAI Codex (ChatGPT OAuth)",
|
||||
choiceHint: "Browser sign-in",
|
||||
groupId: "openai",
|
||||
|
||||
@@ -3,11 +3,12 @@ import type { OpenClawConfig } from "../config/config.js";
|
||||
import { resolveManifestProviderAuthChoice } from "./provider-auth-choices.js";
|
||||
|
||||
const PREFERRED_PROVIDER_BY_AUTH_CHOICE: Partial<Record<string, string>> = {
|
||||
chutes: "chutes",
|
||||
"custom-api-key": "custom",
|
||||
};
|
||||
|
||||
function normalizeLegacyAuthChoice(choice: string): string {
|
||||
return normalizeLegacyOnboardAuthChoice(choice) ?? choice;
|
||||
return normalizeLegacyOnboardAuthChoice(choice, { env: process.env }) ?? choice;
|
||||
}
|
||||
|
||||
export async function resolvePreferredProviderForAuthChoice(params: {
|
||||
|
||||
Reference in New Issue
Block a user