feat: add cloudflare ai gateway provider

This commit is contained in:
Peter Steinberger
2026-02-04 04:10:13 -08:00
parent 19ecdce275
commit 5b0851ebd8
28 changed files with 663 additions and 9 deletions

View File

@@ -80,7 +80,7 @@ function resolveModelAuthLabel(
const snippet = formatApiKeySnippet(profile.token);
return `token ${snippet}${label ? ` (${label})` : ""}`;
}
const snippet = formatApiKeySnippet(profile.key);
const snippet = formatApiKeySnippet(profile.key ?? "");
return `api-key ${snippet}${label ? ` (${label})` : ""}`;
}

View File

@@ -93,7 +93,7 @@ export const resolveAuthLabel = async (
if (profile.type === "api_key") {
return {
label: `${profileId} api-key ${maskApiKey(profile.key)}${more}`,
label: `${profileId} api-key ${maskApiKey(profile.key ?? "")}${more}`,
source: "",
};
}
@@ -154,7 +154,7 @@ export const resolveAuthLabel = async (
}
if (profile.type === "api_key") {
const suffix = flags.length > 0 ? ` (${flags.join(", ")})` : "";
return `${profileId}=${maskApiKey(profile.key)}${suffix}`;
return `${profileId}=${maskApiKey(profile.key ?? "")}${suffix}`;
}
if (profile.type === "token") {
if (