Squashed commit of the following:

commit 8b2ab7c9e0
Author: 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>

commit c894fa838d
Author: 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>

commit 00bd1a4151
Author: 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>

commit a66a04daab
Author: 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>

commit 6ac3f4a97a
Author: 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:
decolua
2026-05-03 15:33:25 +07:00
parent 8f2e6685a6
commit f1bb5bd67e
2 changed files with 0 additions and 14 deletions

View File

@@ -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>

View File

@@ -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>