@openclaw/tencent-provider 2026.9.1 → 2026.9.2

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/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID, t as TOKENHUB_BASE_URL } from "./models-B2pfwcxZ.js";
1
+ import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID, t as TOKENHUB_BASE_URL } from "./models-AXHEg1mT.js";
2
2
  import { buildTokenHubProvider, buildTokenPlanProvider } from "./provider-catalog.js";
3
3
  export { TOKENHUB_BASE_URL, TOKENHUB_MODEL_CATALOG, TOKENHUB_PROVIDER_ID, TOKENPLAN_BASE_URL, TOKENPLAN_MODEL_CATALOG, TOKENPLAN_PROVIDER_ID, buildTokenHubProvider, buildTokenPlanProvider };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as TOKENPLAN_MODEL_CATALOG, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID } from "./models-B2pfwcxZ.js";
1
+ import { a as TOKENPLAN_MODEL_CATALOG, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID } from "./models-AXHEg1mT.js";
2
2
  import { TOKENHUB_DEFAULT_MODEL_REF, TOKENPLAN_DEFAULT_MODEL_REF, applyTokenHubConfig, applyTokenPlanConfig } from "./onboard.js";
3
3
  import { buildTokenHubProvider, buildTokenPlanProvider } from "./provider-catalog.js";
4
4
  import { wrapTencentProviderStream } from "./stream.js";
@@ -6,102 +6,79 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
6
6
  import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
7
7
  import { buildOpenAICompatibleProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
8
8
  //#region extensions/tencent/index.ts
9
- function buildStaticCatalogEntries(providerId, catalog) {
10
- return catalog.map((entry) => ({
11
- provider: providerId,
12
- id: entry.id,
13
- name: entry.name,
14
- reasoning: entry.reasoning,
15
- input: [...entry.input],
16
- contextWindow: entry.contextWindow
17
- }));
18
- }
19
- function createTokenHubApiKeyAuthMethod() {
20
- return createProviderApiKeyAuthMethod({
21
- providerId: TOKENHUB_PROVIDER_ID,
22
- methodId: "api-key",
23
- label: "Tencent TokenHub",
24
- hint: "Hy via Tencent TokenHub Gateway",
25
- optionKey: "tokenhubApiKey",
26
- flagName: "--tokenhub-api-key",
27
- envVar: "TOKENHUB_API_KEY",
28
- promptMessage: "Enter Tencent TokenHub API key",
29
- defaultModel: TOKENHUB_DEFAULT_MODEL_REF,
30
- expectedProviders: [TOKENHUB_PROVIDER_ID],
31
- applyConfig: applyTokenHubConfig,
32
- wizard: {
33
- choiceId: "tokenhub-api-key",
34
- choiceLabel: "Tencent TokenHub",
35
- groupId: "tencent",
36
- groupLabel: "Tencent Cloud",
37
- groupHint: "Tencent TokenHub"
38
- }
39
- });
40
- }
9
+ const TENCENT_PROVIDERS = [{
10
+ providerId: TOKENHUB_PROVIDER_ID,
11
+ label: "Tencent TokenHub",
12
+ optionKey: "tokenhubApiKey",
13
+ flagName: "--tokenhub-api-key",
14
+ envVar: "TOKENHUB_API_KEY",
15
+ defaultModel: TOKENHUB_DEFAULT_MODEL_REF,
16
+ applyConfig: applyTokenHubConfig,
17
+ choiceId: "tokenhub-api-key",
18
+ buildProvider: buildTokenHubProvider,
19
+ modelCatalog: TOKENHUB_MODEL_CATALOG
20
+ }, {
21
+ providerId: TOKENPLAN_PROVIDER_ID,
22
+ label: "Tencent TokenPlan",
23
+ optionKey: "tokenplanApiKey",
24
+ flagName: "--tokenplan-api-key",
25
+ envVar: "TOKENPLAN_API_KEY",
26
+ defaultModel: TOKENPLAN_DEFAULT_MODEL_REF,
27
+ applyConfig: applyTokenPlanConfig,
28
+ choiceId: "tokenplan-api-key",
29
+ buildProvider: buildTokenPlanProvider,
30
+ modelCatalog: TOKENPLAN_MODEL_CATALOG
31
+ }];
41
32
  var tencent_default = definePluginEntry({
42
33
  id: "tencent",
43
34
  name: "Tencent Cloud Provider",
44
35
  description: "Bundled Tencent Cloud provider plugin (TokenHub, TokenPlan)",
45
36
  register(api) {
46
- api.registerProvider({
47
- id: TOKENHUB_PROVIDER_ID,
48
- label: "Tencent TokenHub",
37
+ for (const provider of TENCENT_PROVIDERS) api.registerProvider({
38
+ id: provider.providerId,
39
+ label: provider.label,
49
40
  docsPath: "/providers/tencent",
50
- envVars: ["TOKENHUB_API_KEY"],
51
- auth: [createTokenHubApiKeyAuthMethod()],
52
- catalog: {
53
- order: "simple",
54
- run: (ctx) => buildOpenAICompatibleProviderCatalog({
55
- ctx,
56
- providerId: TOKENHUB_PROVIDER_ID,
57
- buildProvider: buildTokenHubProvider
58
- })
59
- },
60
- staticCatalog: {
61
- order: "simple",
62
- run: async () => ({ provider: buildTokenHubProvider() })
63
- },
64
- augmentModelCatalog: () => buildStaticCatalogEntries(TOKENHUB_PROVIDER_ID, TOKENHUB_MODEL_CATALOG),
65
- wrapStreamFn: wrapTencentProviderStream
66
- });
67
- api.registerProvider({
68
- id: TOKENPLAN_PROVIDER_ID,
69
- label: "Tencent TokenPlan",
70
- docsPath: "/providers/tencent",
71
- envVars: ["TOKENPLAN_API_KEY"],
41
+ envVars: [provider.envVar],
72
42
  auth: [createProviderApiKeyAuthMethod({
73
- providerId: TOKENPLAN_PROVIDER_ID,
43
+ providerId: provider.providerId,
74
44
  methodId: "api-key",
75
- label: "Tencent TokenPlan",
76
- hint: "Hy via Tencent TokenPlan Gateway",
77
- optionKey: "tokenplanApiKey",
78
- flagName: "--tokenplan-api-key",
79
- envVar: "TOKENPLAN_API_KEY",
80
- promptMessage: "Enter Tencent TokenPlan API key",
81
- defaultModel: TOKENPLAN_DEFAULT_MODEL_REF,
82
- expectedProviders: [TOKENPLAN_PROVIDER_ID],
83
- applyConfig: applyTokenPlanConfig,
45
+ label: provider.label,
46
+ hint: `Hy via ${provider.label} Gateway`,
47
+ optionKey: provider.optionKey,
48
+ flagName: provider.flagName,
49
+ envVar: provider.envVar,
50
+ promptMessage: `Enter ${provider.label} API key`,
51
+ defaultModel: provider.defaultModel,
52
+ expectedProviders: [provider.providerId],
53
+ applyConfig: provider.applyConfig,
84
54
  wizard: {
85
- choiceId: "tokenplan-api-key",
86
- choiceLabel: "Tencent TokenPlan",
55
+ choiceId: provider.choiceId,
56
+ choiceLabel: provider.label,
87
57
  groupId: "tencent",
88
58
  groupLabel: "Tencent Cloud",
89
- groupHint: "Tencent TokenPlan"
59
+ groupHint: provider.label
90
60
  }
91
61
  })],
92
62
  catalog: {
93
63
  order: "simple",
94
64
  run: (ctx) => buildOpenAICompatibleProviderCatalog({
95
65
  ctx,
96
- providerId: TOKENPLAN_PROVIDER_ID,
97
- buildProvider: buildTokenPlanProvider
66
+ providerId: provider.providerId,
67
+ buildProvider: provider.buildProvider
98
68
  })
99
69
  },
100
70
  staticCatalog: {
101
71
  order: "simple",
102
- run: async () => ({ provider: buildTokenPlanProvider() })
72
+ run: async () => ({ provider: provider.buildProvider() })
103
73
  },
104
- augmentModelCatalog: () => buildStaticCatalogEntries(TOKENPLAN_PROVIDER_ID, TOKENPLAN_MODEL_CATALOG),
74
+ augmentModelCatalog: () => provider.modelCatalog.map((entry) => ({
75
+ provider: provider.providerId,
76
+ id: entry.id,
77
+ name: entry.name,
78
+ reasoning: entry.reasoning,
79
+ input: [...entry.input],
80
+ contextWindow: entry.contextWindow
81
+ })),
105
82
  wrapStreamFn: wrapTencentProviderStream
106
83
  });
107
84
  }
@@ -7,6 +7,10 @@ var openclaw_plugin_default = {
7
7
  providerCatalogEntry: "./provider-discovery.ts",
8
8
  providers: ["tencent-tokenhub", "tencent-tokenplan"],
9
9
  modelCatalog: {
10
+ "modelsDev": {
11
+ "tencent-tokenhub": "tencent-tokenhub",
12
+ "tencent-tokenplan": "tencent-token-plan"
13
+ },
10
14
  "providers": {
11
15
  "tencent-tokenhub": {
12
16
  "baseUrl": "https://tokenhub.tencentmaas.com/v1",
package/dist/models.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID, t as TOKENHUB_BASE_URL } from "./models-B2pfwcxZ.js";
1
+ import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID, t as TOKENHUB_BASE_URL } from "./models-AXHEg1mT.js";
2
2
  export { TOKENHUB_BASE_URL, TOKENHUB_MODEL_CATALOG, TOKENHUB_PROVIDER_ID, TOKENPLAN_BASE_URL, TOKENPLAN_MODEL_CATALOG, TOKENPLAN_PROVIDER_ID };
package/dist/onboard.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID, s as openclaw_plugin_default, t as TOKENHUB_BASE_URL } from "./models-B2pfwcxZ.js";
1
+ import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID, s as openclaw_plugin_default, t as TOKENHUB_BASE_URL } from "./models-AXHEg1mT.js";
2
2
  import { readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
3
3
  import { createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
4
4
  //#region extensions/tencent/onboard.ts
@@ -1,4 +1,4 @@
1
- import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, t as TOKENHUB_BASE_URL } from "./models-B2pfwcxZ.js";
1
+ import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, t as TOKENHUB_BASE_URL } from "./models-AXHEg1mT.js";
2
2
  //#region extensions/tencent/provider-catalog.ts
3
3
  function buildTokenHubProvider() {
4
4
  return {
package/dist/stream.js CHANGED
@@ -1,4 +1,4 @@
1
- import { o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID } from "./models-B2pfwcxZ.js";
1
+ import { o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID } from "./models-AXHEg1mT.js";
2
2
  import { createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
3
3
  //#region extensions/tencent/stream.ts
4
4
  const TENCENT_PROVIDER_IDS = /* @__PURE__ */ new Set([TOKENHUB_PROVIDER_ID, TOKENPLAN_PROVIDER_ID]);
@@ -4,9 +4,16 @@
4
4
  "onStartup": false
5
5
  },
6
6
  "enabledByDefault": true,
7
- "providerCatalogEntry": "./provider-discovery.ts",
8
- "providers": ["tencent-tokenhub", "tencent-tokenplan"],
7
+ "providerCatalogEntry": "./dist/provider-discovery.js",
8
+ "providers": [
9
+ "tencent-tokenhub",
10
+ "tencent-tokenplan"
11
+ ],
9
12
  "modelCatalog": {
13
+ "modelsDev": {
14
+ "tencent-tokenhub": "tencent-tokenhub",
15
+ "tencent-tokenplan": "tencent-token-plan"
16
+ },
10
17
  "providers": {
11
18
  "tencent-tokenhub": {
12
19
  "baseUrl": "https://tokenhub.tencentmaas.com/v1",
@@ -19,7 +26,9 @@
19
26
  "status": "deprecated",
20
27
  "replacedBy": "hy3",
21
28
  "reasoning": true,
22
- "input": ["text"],
29
+ "input": [
30
+ "text"
31
+ ],
23
32
  "contextWindow": 256000,
24
33
  "maxTokens": 128000,
25
34
  "cost": {
@@ -33,35 +42,49 @@
33
42
  "output": 0.587,
34
43
  "cacheRead": 0.059,
35
44
  "cacheWrite": 0,
36
- "range": [0, 16000]
45
+ "range": [
46
+ 0,
47
+ 16000
48
+ ]
37
49
  },
38
50
  {
39
51
  "input": 0.235,
40
52
  "output": 0.939,
41
53
  "cacheRead": 0.088,
42
54
  "cacheWrite": 0,
43
- "range": [16000, 32000]
55
+ "range": [
56
+ 16000,
57
+ 32000
58
+ ]
44
59
  },
45
60
  {
46
61
  "input": 0.293,
47
62
  "output": 1.173,
48
63
  "cacheRead": 0.117,
49
64
  "cacheWrite": 0,
50
- "range": [32000]
65
+ "range": [
66
+ 32000
67
+ ]
51
68
  }
52
69
  ]
53
70
  },
54
71
  "compat": {
55
72
  "supportsUsageInStreaming": true,
56
73
  "supportsReasoningEffort": true,
57
- "supportedReasoningEfforts": ["none", "low", "high"]
74
+ "supportedReasoningEfforts": [
75
+ "none",
76
+ "low",
77
+ "high"
78
+ ]
58
79
  }
59
80
  },
60
81
  {
61
82
  "id": "hy3",
62
83
  "name": "Hy3 (TokenHub)",
63
84
  "reasoning": true,
64
- "input": ["text"],
85
+ "input": [
86
+ "text"
87
+ ],
65
88
  "contextWindow": 256000,
66
89
  "maxTokens": 128000,
67
90
  "cost": {
@@ -73,7 +96,11 @@
73
96
  "compat": {
74
97
  "supportsUsageInStreaming": true,
75
98
  "supportsReasoningEffort": true,
76
- "supportedReasoningEfforts": ["none", "low", "high"]
99
+ "supportedReasoningEfforts": [
100
+ "none",
101
+ "low",
102
+ "high"
103
+ ]
77
104
  }
78
105
  }
79
106
  ]
@@ -87,13 +114,19 @@
87
114
  "id": "hy3",
88
115
  "name": "Hy3 (TokenPlan)",
89
116
  "reasoning": true,
90
- "input": ["text"],
117
+ "input": [
118
+ "text"
119
+ ],
91
120
  "contextWindow": 256000,
92
121
  "maxTokens": 128000,
93
122
  "compat": {
94
123
  "supportsUsageInStreaming": true,
95
124
  "supportsReasoningEffort": true,
96
- "supportedReasoningEfforts": ["none", "low", "high"]
125
+ "supportedReasoningEfforts": [
126
+ "none",
127
+ "low",
128
+ "high"
129
+ ]
97
130
  }
98
131
  }
99
132
  ]
@@ -108,11 +141,15 @@
108
141
  "providers": [
109
142
  {
110
143
  "id": "tencent-tokenhub",
111
- "envVars": ["TOKENHUB_API_KEY"]
144
+ "envVars": [
145
+ "TOKENHUB_API_KEY"
146
+ ]
112
147
  },
113
148
  {
114
149
  "id": "tencent-tokenplan",
115
- "envVars": ["TOKENPLAN_API_KEY"]
150
+ "envVars": [
151
+ "TOKENPLAN_API_KEY"
152
+ ]
116
153
  }
117
154
  ]
118
155
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/tencent-provider",
3
- "version": "2026.9.1",
3
+ "version": "2026.9.2",
4
4
  "description": "OpenClaw Tencent Cloud provider plugin (TokenHub + Token Plan)",
5
5
  "type": "module",
6
6
  "openclaw": {
@@ -15,10 +15,10 @@
15
15
  "minHostVersion": ">=2026.6.9"
16
16
  },
17
17
  "compat": {
18
- "pluginApi": ">=2026.9.1"
18
+ "pluginApi": ">=2026.9.2"
19
19
  },
20
20
  "build": {
21
- "openclawVersion": "2026.9.1",
21
+ "openclawVersion": "2026.9.2",
22
22
  "bundledDist": false
23
23
  },
24
24
  "release": {
@@ -40,7 +40,7 @@
40
40
  "README.md"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.9.1"
43
+ "openclaw": ">=2026.9.2"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {