@openclaw/cloudflare-ai-gateway-provider 2026.9.3 → 2026.9.5

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.
@@ -0,0 +1,32 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
+ <!--
3
+ Adapted from OpenClaw ui/public/provider-icons/ProviderIcon-cloudflare.svg.
4
+ Source: @lobehub/icons-static-svg@1.94.0, cloudflare.svg
5
+ https://www.npmjs.com/package/@lobehub/icons-static-svg/v/1.94.0
6
+ https://github.com/lobehub/lobe-icons
7
+
8
+ MIT License
9
+ Copyright (c) 2023 LobeHub
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ Names and marks remain the property of their respective owners.
30
+ -->
31
+ <path fill="currentColor" fill-rule="evenodd" stroke="none" d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437 M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777" />
32
+ </svg>
Binary file
@@ -1,6 +1,6 @@
1
1
  import { buildCloudflareAiGatewayModelDefinition, resolveCloudflareAiGatewayBaseUrl } from "./models.js";
2
- import { coerceSecretRef, resolveNonEnvSecretRefApiKeyMarker } from "openclaw/plugin-sdk/provider-auth";
3
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
+ import { coerceSecretRef, resolveNonEnvSecretRefApiKeyMarker } from "openclaw/plugin-sdk/secret-input";
4
4
  //#region extensions/cloudflare-ai-gateway/catalog-provider.ts
5
5
  /**
6
6
  * Builds runtime model catalog entries from stored Cloudflare AI Gateway auth
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 { applyCloudflareAiGatewayConfig, buildCloudflareAiGatewayConfigPatch } from "./onboard.js";
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: buildCloudflareAiGatewayConfigPatch(metadata),
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 applyCloudflareAiGatewayConfig(next, {
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 };
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "id": "cloudflare-ai-gateway",
3
+ "categories": ["models"],
3
4
  "activation": {
4
5
  "onStartup": false
5
6
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/cloudflare-ai-gateway-provider",
3
- "version": "2026.9.3",
3
+ "version": "2026.9.5",
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.3"
21
+ "pluginApi": ">=2026.9.5"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.9.3",
24
+ "openclawVersion": "2026.9.5",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -35,10 +35,12 @@
35
35
  "files": [
36
36
  "dist/**",
37
37
  "openclaw.plugin.json",
38
- "README.md"
38
+ "README.md",
39
+ "assets/icon.png",
40
+ "assets/activity.svg"
39
41
  ],
40
42
  "peerDependencies": {
41
- "openclaw": ">=2026.9.3"
43
+ "openclaw": ">=2026.9.5"
42
44
  },
43
45
  "peerDependenciesMeta": {
44
46
  "openclaw": {