fix: restore API Key input visibility when creating new Claude providers

The hasApiKeyField() gate added for Bedrock AKSK/API Key distinction
was incorrectly hiding the API Key input for all new providers with
empty env config. Scope the gate to cloud_provider category only.
This commit is contained in:
Jason
2026-02-26 21:19:49 +08:00
parent 99e392518a
commit 3348b39089
@@ -1231,7 +1231,8 @@ export function ProviderForm({
<ClaudeFormFields
providerId={providerId}
shouldShowApiKey={
hasApiKeyField(form.getValues("settingsConfig"), "claude") &&
(category !== "cloud_provider" ||
hasApiKeyField(form.getValues("settingsConfig"), "claude")) &&
shouldShowApiKey(form.getValues("settingsConfig"), isEditMode)
}
apiKey={apiKey}