mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:31:23 +00:00
feat: add cloudflare ai gateway provider
This commit is contained in:
@@ -169,7 +169,11 @@ export async function resolveApiKeyForProfile(params: {
|
||||
}
|
||||
|
||||
if (cred.type === "api_key") {
|
||||
return { apiKey: cred.key, provider: cred.provider, email: cred.email };
|
||||
const key = cred.key?.trim();
|
||||
if (!key) {
|
||||
return null;
|
||||
}
|
||||
return { apiKey: key, provider: cred.provider, email: cred.email };
|
||||
}
|
||||
if (cred.type === "token") {
|
||||
const token = cred.token?.trim();
|
||||
|
||||
@@ -4,8 +4,10 @@ import type { OpenClawConfig } from "../../config/config.js";
|
||||
export type ApiKeyCredential = {
|
||||
type: "api_key";
|
||||
provider: string;
|
||||
key: string;
|
||||
key?: string;
|
||||
email?: string;
|
||||
/** Optional provider-specific metadata (e.g., account IDs, gateway IDs). */
|
||||
metadata?: Record<string, string>;
|
||||
};
|
||||
|
||||
export type TokenCredential = {
|
||||
|
||||
Reference in New Issue
Block a user