auth: avoid plugin setup scans during common auth resolution

This commit is contained in:
Peter Steinberger
2026-04-09 01:57:40 +01:00
parent 5f710bac35
commit e890db76bc
2 changed files with 5 additions and 5 deletions

View File

@@ -35,6 +35,7 @@ export function resolveEnvApiKey(
return resolved;
}
}
return null;
}
if (normalized === "google-vertex") {

View File

@@ -407,6 +407,10 @@ export async function resolveApiKeyForProvider(params: {
};
}
}
const normalized = normalizeProviderId(provider);
if (authOverride === undefined && normalized === "amazon-bedrock") {
return resolveAwsSdkAuthInfo();
}
if (params.credentialPrecedence === "env-first") {
const envResolved = resolveEnvApiKey(provider);
@@ -494,11 +498,6 @@ export async function resolveApiKeyForProvider(params: {
return syntheticLocalAuth;
}
const normalized = normalizeProviderId(provider);
if (authOverride === undefined && normalized === "amazon-bedrock") {
return resolveAwsSdkAuthInfo();
}
const hasInlineConfiguredModels =
Array.isArray(providerConfig?.models) && providerConfig.models.length > 0;
const owningPluginIds = !hasInlineConfiguredModels