Skip to content

Commit 79c8251

Browse files
authored
perf(onboarding): avoid broad provider-auth runtime imports (#127680)
1 parent 7dca0a0 commit 79c8251

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/commands/auth-choice.apply.api-providers.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Token-provider normalization hooks for provider-backed auth choices.
2+
import { normalizeOptionalLowercaseString } from "@openclaw/normalization-core/string-coerce";
23
import { resolveProviderMatch } from "../plugins/provider-auth-choice-helpers.js";
34
import { resolvePluginProviders } from "../plugins/provider-auth-choice.runtime.js";
4-
import { normalizeTokenProviderInput } from "../plugins/provider-auth-input.js";
55
import type { ProviderAuthKind } from "../plugins/types.js";
66
import type { ApplyAuthChoiceParams } from "./auth-choice.apply.types.js";
77
import type { AuthChoice } from "./onboard-types.js";
@@ -37,7 +37,7 @@ export function normalizeApiKeyTokenProviderAuthChoice(params: {
3737
if (!params.tokenProvider) {
3838
return params.authChoice;
3939
}
40-
const normalizedTokenProvider = normalizeTokenProviderInput(params.tokenProvider);
40+
const normalizedTokenProvider = normalizeOptionalLowercaseString(params.tokenProvider);
4141
if (!normalizedTokenProvider) {
4242
return params.authChoice;
4343
}

‎src/plugins/provider-auth-choice-helpers.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Normalizes provider auth choice metadata from plugin setup surfaces.
2+
import { normalizeProviderId } from "@openclaw/model-catalog-core/provider-id";
23
import { isRecord as isPlainRecord } from "@openclaw/normalization-core/record-coerce";
34
import {
45
normalizeLowercaseStringOrEmpty,
@@ -11,7 +12,6 @@ import {
1112
toAgentEntriesRecord,
1213
} from "../agents/agent-scope-config.js";
1314
import { normalizeConfiguredProviderCatalogModelId } from "../agents/model-ref-shared.js";
14-
import { normalizeProviderId } from "../agents/model-selection.js";
1515
import {
1616
normalizeAgentModelMapForConfig,
1717
normalizeAgentModelRefForConfig,

0 commit comments

Comments
 (0)