mirror of
https://github.com/decolua/9router.git
synced 2026-05-08 12:01:28 +00:00
Squashed commit of the following:
commit8b2ab7c9e0Author: kundeng <kundeng@live.com> Date: Mon Apr 20 11:26:58 2026 -0400 fix: send providerSpecificData in Edit modal validate calls The Check button in the Edit modal was sending only apiKey without the Azure endpoint/deployment/org, causing validation to fail. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> commitc894fa838dAuthor: kundeng <kundeng@live.com> Date: Mon Apr 20 01:45:13 2026 -0400 fix: persist Azure providerSpecificData and add connection test - Read body.providerSpecificData in POST /api/providers so Azure fields (endpoint, deployment, apiVersion, organization) are actually stored - Add azure case to testApiKeyConnection so the Test button works correctly instead of falling through to "not supported" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> commit00bd1a4151Author: kundeng <kundeng@live.com> Date: Mon Apr 20 01:24:39 2026 -0400 fix: add Azure validation and make Organization required - Add Azure case to /api/providers/validate that sends a test chat completion with api-key header and organization - Pass Azure-specific data (endpoint, deployment, apiVersion, org) from Add modal to validate endpoint - Make Organization field required (needed for billing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> commita66a04daabAuthor: kundeng <kundeng@live.com> Date: Mon Apr 20 01:15:53 2026 -0400 fix: add Azure config fields to Add API Key modal 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 <noreply@anthropic.com> commit6ac3f4a97aAuthor: kundeng <kundeng@live.com> Date: Mon Apr 20 01:06:45 2026 -0400 feat: add Azure OpenAI as a dedicated provider Azure OpenAI uses a different URL scheme (deployments-based) and api-key header auth instead of Bearer tokens. This adds a dedicated AzureExecutor that constructs the correct URL and headers, plus dashboard UI fields for endpoint, deployment, API version, and organization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -261,7 +261,6 @@ export default function AddApiKeyModal({ isOpen, provider, providerName, isCompa
|
||||
|
||||
<div className="flex gap-2">
|
||||
<Button onClick={handleSubmit} fullWidth disabled={saving || (!isOllamaLocal && (!formData.name || !formData.apiKey)) || (isAzure && (!azureData.azureEndpoint || !azureData.deployment || !azureData.organization)) || (isCloudflareAi && !cloudflareData.accountId)}>
|
||||
|
||||
{saving ? "Saving..." : "Save"}
|
||||
</Button>
|
||||
<Button onClick={onClose} variant="ghost" fullWidth>
|
||||
|
||||
@@ -207,19 +207,6 @@ export default function EditConnectionModal({ isOpen, connection, proxyPools, on
|
||||
</>
|
||||
)}
|
||||
|
||||
{isCloudflareAi && (
|
||||
<div className="bg-sidebar/50 p-4 rounded-lg border border-accent/20">
|
||||
<h3 className="font-semibold mb-3 text-sm">Cloudflare Workers AI</h3>
|
||||
<Input
|
||||
label="Account ID"
|
||||
value={cloudflareData.accountId}
|
||||
onChange={(e) => setCloudflareData({ ...cloudflareData, accountId: e.target.value })}
|
||||
placeholder="abc123def456..."
|
||||
hint="Find in right sidebar of dash.cloudflare.com"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isAzure && (
|
||||
<div className="bg-sidebar/50 p-4 rounded-lg border border-accent/20">
|
||||
<h3 className="font-semibold mb-3 text-sm">Azure OpenAI Configuration</h3>
|
||||
|
||||
Reference in New Issue
Block a user