From a66a04daab69b07baa4cc6b28772249e4b25ea19 Mon Sep 17 00:00:00 2001
From: kundeng
Date: Mon, 20 Apr 2026 01:15:53 -0400
Subject: [PATCH] fix: add Azure config fields to Add API Key modal
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The Add modal was missing the Azure-specific fields (endpoint, deployment,
API version, organization) — only the Edit modal had them.
Co-Authored-By: Claude Opus 4.6
---
.../providers/[id]/AddApiKeyModal.js | 49 ++++++++++++++++++-
1 file changed, 47 insertions(+), 2 deletions(-)
diff --git a/src/app/(dashboard)/dashboard/providers/[id]/AddApiKeyModal.js b/src/app/(dashboard)/dashboard/providers/[id]/AddApiKeyModal.js
index ef461db0..6904f49d 100644
--- a/src/app/(dashboard)/dashboard/providers/[id]/AddApiKeyModal.js
+++ b/src/app/(dashboard)/dashboard/providers/[id]/AddApiKeyModal.js
@@ -7,12 +7,20 @@ import { Button, Badge, Input, Modal, Select } from "@/shared/components";
export default function AddApiKeyModal({ isOpen, provider, providerName, isCompatible, isAnthropic, proxyPools, onSave, onClose }) {
const NONE_PROXY_POOL_VALUE = "__none__";
+ const isAzure = provider === "azure";
+
const [formData, setFormData] = useState({
name: "",
apiKey: "",
priority: 1,
proxyPoolId: NONE_PROXY_POOL_VALUE,
});
+ const [azureData, setAzureData] = useState({
+ azureEndpoint: "",
+ apiVersion: "2024-10-01-preview",
+ deployment: "",
+ organization: "",
+ });
const [validating, setValidating] = useState(false);
const [validationResult, setValidationResult] = useState(null);
const [saving, setSaving] = useState(false);
@@ -63,7 +71,12 @@ export default function AddApiKeyModal({ isOpen, provider, providerName, isCompa
priority: formData.priority,
proxyPoolId: formData.proxyPoolId === NONE_PROXY_POOL_VALUE ? null : formData.proxyPoolId,
testStatus: isValid ? "active" : "unknown",
- providerSpecificData: undefined
+ providerSpecificData: isAzure ? {
+ azureEndpoint: azureData.azureEndpoint,
+ apiVersion: azureData.apiVersion,
+ deployment: azureData.deployment,
+ organization: azureData.organization,
+ } : undefined
});
} finally {
setSaving(false);
@@ -108,6 +121,38 @@ export default function AddApiKeyModal({ isOpen, provider, providerName, isCompa
}
)}
+ {isAzure && (
+
+ )}
+
-