@openclaw/cloudflare-ai-gateway-provider 2026.9.2 → 2026.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/onboard.js +18 -2
- package/openclaw.plugin.json +1 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF } from "./models.js";
|
|
2
2
|
import { buildCloudflareAiGatewayCatalogProvider } from "./catalog-provider.js";
|
|
3
|
-
import {
|
|
3
|
+
import { applyCloudflareAiGatewayConnectionConfig, applyCloudflareAiGatewayProviderConnectionConfig } from "./onboard.js";
|
|
4
4
|
import { wrapCloudflareAiGatewayProviderStream } from "./stream-wrappers.js";
|
|
5
5
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
6
6
|
import { applyAuthProfileConfig, buildApiKeyCredential, ensureApiKeyFromOptionEnvOrPrompt, ensureAuthProfileStore, listProfilesForProvider, normalizeApiKeyInput, normalizeOptionalSecretInput, validateApiKeyInput } from "openclaw/plugin-sdk/provider-auth";
|
|
@@ -93,7 +93,7 @@ var cloudflare_ai_gateway_default = definePluginEntry({
|
|
|
93
93
|
gatewayId: metadata.gatewayId
|
|
94
94
|
}, capturedMode ? { secretInputMode: capturedMode } : void 0)
|
|
95
95
|
}],
|
|
96
|
-
configPatch:
|
|
96
|
+
configPatch: applyCloudflareAiGatewayProviderConnectionConfig(ctx.config, metadata),
|
|
97
97
|
defaultModel: CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF
|
|
98
98
|
};
|
|
99
99
|
},
|
|
@@ -138,7 +138,7 @@ var cloudflare_ai_gateway_default = definePluginEntry({
|
|
|
138
138
|
provider: PROVIDER_ID,
|
|
139
139
|
mode: "api_key"
|
|
140
140
|
});
|
|
141
|
-
return
|
|
141
|
+
return applyCloudflareAiGatewayConnectionConfig(next, {
|
|
142
142
|
accountId,
|
|
143
143
|
gatewayId
|
|
144
144
|
});
|
package/dist/onboard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF, buildCloudflareAiGatewayModelDefinition, resolveCloudflareAiGatewayBaseUrl } from "./models.js";
|
|
2
|
-
import { applyAgentDefaultModelPrimary, applyProviderConfigWithDefaultModel } from "openclaw/plugin-sdk/provider-onboard";
|
|
2
|
+
import { applyAgentDefaultModelPrimary, applyProviderConfigWithDefaultModel, applyProviderConnectionConfig } from "openclaw/plugin-sdk/provider-onboard";
|
|
3
3
|
//#region extensions/cloudflare-ai-gateway/onboard.ts
|
|
4
4
|
/**
|
|
5
5
|
* Config patch helpers used by Cloudflare AI Gateway interactive and
|
|
@@ -56,5 +56,21 @@ function applyCloudflareAiGatewayProviderConfig(cfg, params) {
|
|
|
56
56
|
function applyCloudflareAiGatewayConfig(cfg, params) {
|
|
57
57
|
return applyAgentDefaultModelPrimary(applyCloudflareAiGatewayProviderConfig(cfg, params), CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF);
|
|
58
58
|
}
|
|
59
|
+
/** Registered setup keeps authored rows and seeds the default only in replace mode. */
|
|
60
|
+
function applyCloudflareAiGatewayProviderConnectionConfig(cfg, params) {
|
|
61
|
+
return applyProviderConnectionConfig(cfg, {
|
|
62
|
+
providerId: "cloudflare-ai-gateway",
|
|
63
|
+
api: "anthropic-messages",
|
|
64
|
+
baseUrl: resolveCloudflareAiGatewayBaseUrl(params),
|
|
65
|
+
catalogModels: () => [buildCloudflareAiGatewayModelDefinition()],
|
|
66
|
+
aliases: [{
|
|
67
|
+
modelRef: CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF,
|
|
68
|
+
alias: "Cloudflare AI Gateway"
|
|
69
|
+
}]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function applyCloudflareAiGatewayConnectionConfig(cfg, params) {
|
|
73
|
+
return applyAgentDefaultModelPrimary(applyCloudflareAiGatewayProviderConnectionConfig(cfg, params), CLOUDFLARE_AI_GATEWAY_DEFAULT_MODEL_REF);
|
|
74
|
+
}
|
|
59
75
|
//#endregion
|
|
60
|
-
export { applyCloudflareAiGatewayConfig, applyCloudflareAiGatewayProviderConfig, buildCloudflareAiGatewayConfigPatch };
|
|
76
|
+
export { applyCloudflareAiGatewayConfig, applyCloudflareAiGatewayConnectionConfig, applyCloudflareAiGatewayProviderConfig, applyCloudflareAiGatewayProviderConnectionConfig, buildCloudflareAiGatewayConfigPatch };
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/cloudflare-ai-gateway-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.4",
|
|
4
4
|
"description": "OpenClaw Cloudflare AI Gateway provider plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.6.8"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.9.
|
|
21
|
+
"pluginApi": ">=2026.9.4"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.9.
|
|
24
|
+
"openclawVersion": "2026.9.4",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"openclaw": ">=2026.9.
|
|
41
|
+
"openclaw": ">=2026.9.4"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|