mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +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
|
<ClaudeFormFields
|
||||||
providerId={providerId}
|
providerId={providerId}
|
||||||
shouldShowApiKey={
|
shouldShowApiKey={
|
||||||
hasApiKeyField(form.getValues("settingsConfig"), "claude") &&
|
(category !== "cloud_provider" ||
|
||||||
|
hasApiKeyField(form.getValues("settingsConfig"), "claude")) &&
|
||||||
shouldShowApiKey(form.getValues("settingsConfig"), isEditMode)
|
shouldShowApiKey(form.getValues("settingsConfig"), isEditMode)
|
||||||
}
|
}
|
||||||
apiKey={apiKey}
|
apiKey={apiKey}
|
||||||
|
|||||||
Reference in New Issue
Block a user