fix(cloudflare-ai): declare API key authentication

Cloudflare AI registry entry was missing authType/authModes, causing
the dashboard to report "No connections" despite an active API-key
connection. Closes #2969
This commit is contained in:
Sutarto Jordan Chrisfivo
2026-08-05 13:13:16 +07:00
committed by decolua
parent baebc9a06e
commit 646b3b9ba3
2 changed files with 8 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ export default {
},
},
category: "freeTier",
authType: "apikey",
authModes: ["apikey"],
hasProviderSpecificData: true,
transport: {
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1/chat/completions",

View File

@@ -31,4 +31,10 @@ describe("provider display split (E1)", () => {
expect(m.ALIAS_TO_ID.kr).toBe("kiro");
expect(m.getProvidersByKind("tts").length).toBeGreaterThan(0);
});
it("Cloudflare exposes API-key authentication on its free-tier card", async () => {
const { FREE_TIER_PROVIDERS } = await import("../../src/shared/constants/providers.js");
expect(FREE_TIER_PROVIDERS["cloudflare-ai"].authType).toBe("apikey");
expect(FREE_TIER_PROVIDERS["cloudflare-ai"].authModes).toEqual(["apikey"]);
});
});