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:
parent
baebc9a06e
commit
646b3b9ba3
2 changed files with 8 additions and 0 deletions
|
|
@ -19,6 +19,8 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
category: "freeTier",
|
category: "freeTier",
|
||||||
|
authType: "apikey",
|
||||||
|
authModes: ["apikey"],
|
||||||
hasProviderSpecificData: true,
|
hasProviderSpecificData: true,
|
||||||
transport: {
|
transport: {
|
||||||
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1/chat/completions",
|
baseUrl: "https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1/chat/completions",
|
||||||
|
|
|
||||||
|
|
@ -31,4 +31,10 @@ describe("provider display split (E1)", () => {
|
||||||
expect(m.ALIAS_TO_ID.kr).toBe("kiro");
|
expect(m.ALIAS_TO_ID.kr).toBe("kiro");
|
||||||
expect(m.getProvidersByKind("tts").length).toBeGreaterThan(0);
|
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"]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue