mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-11 22:35:14 +08:00
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user