@openclaw/tencent-provider 2026.9.3 → 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/api.js +1 -1
- package/dist/config-compat.js +28 -19
- package/dist/index.js +1 -1
- package/dist/{models-AXHEg1mT.js → models-CeL6cmHz.js} +108 -74
- package/dist/models.js +1 -1
- package/dist/onboard.js +24 -10
- package/dist/provider-catalog.js +1 -1
- package/dist/stream.js +5 -12
- package/openclaw.plugin.json +56 -6
- package/package.json +4 -4
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-
|
|
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-CeL6cmHz.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/config-compat.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
//#region extensions/tencent/config-compat.ts
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
2
|
+
const TENCENT_TOKENHUB_HY3_MODEL_REF = "tencent-tokenhub/hy3";
|
|
3
|
+
const TENCENT_TOKENHUB_HY3_PREVIEW_MODEL_REF = "tencent-tokenhub/hy3-preview";
|
|
4
|
+
const TENCENT_TOKENHUB_HY4_PREVIEW_MODEL_REF = "tencent-tokenhub/hy4-preview";
|
|
5
|
+
const TENCENT_TOKENHUB_MIGRATION_TARGET_MODEL_REF = TENCENT_TOKENHUB_HY3_MODEL_REF;
|
|
6
|
+
const TENCENT_TOKENHUB_MANAGED_MODEL_REFS = [
|
|
7
|
+
TENCENT_TOKENHUB_HY4_PREVIEW_MODEL_REF,
|
|
8
|
+
TENCENT_TOKENHUB_HY3_MODEL_REF,
|
|
9
|
+
TENCENT_TOKENHUB_HY3_PREVIEW_MODEL_REF
|
|
10
|
+
];
|
|
11
|
+
const TENCENT_TOKENHUB_MODEL_ALIASES = {
|
|
12
|
+
[TENCENT_TOKENHUB_HY4_PREVIEW_MODEL_REF]: "Hy4 preview (TokenHub)",
|
|
13
|
+
[TENCENT_TOKENHUB_HY3_MODEL_REF]: "Hy3 (TokenHub)",
|
|
14
|
+
[TENCENT_TOKENHUB_HY3_PREVIEW_MODEL_REF]: "Hy3 preview (TokenHub)"
|
|
15
|
+
};
|
|
6
16
|
function isTokenHubModelMapConfigured(models) {
|
|
7
|
-
return
|
|
17
|
+
return TENCENT_TOKENHUB_MANAGED_MODEL_REFS.some((ref) => Object.hasOwn(models, ref));
|
|
8
18
|
}
|
|
9
19
|
function withDefaultAlias(entry, alias) {
|
|
10
20
|
return {
|
|
@@ -15,15 +25,18 @@ function withDefaultAlias(entry, alias) {
|
|
|
15
25
|
function needsDefaultAlias(entry) {
|
|
16
26
|
return entry?.alias === void 0;
|
|
17
27
|
}
|
|
28
|
+
function needsModelRepair(models, ref) {
|
|
29
|
+
return !Object.hasOwn(models, ref) || needsDefaultAlias(models[ref]);
|
|
30
|
+
}
|
|
18
31
|
function migrateDefaultModel(model) {
|
|
19
|
-
if (model ===
|
|
20
|
-
model: { primary:
|
|
32
|
+
if (model === TENCENT_TOKENHUB_HY3_PREVIEW_MODEL_REF) return {
|
|
33
|
+
model: { primary: TENCENT_TOKENHUB_MIGRATION_TARGET_MODEL_REF },
|
|
21
34
|
changed: true
|
|
22
35
|
};
|
|
23
|
-
if (model && typeof model === "object" && "primary" in model && model.primary ===
|
|
36
|
+
if (model && typeof model === "object" && "primary" in model && model.primary === TENCENT_TOKENHUB_HY3_PREVIEW_MODEL_REF) return {
|
|
24
37
|
model: {
|
|
25
38
|
...model,
|
|
26
|
-
primary:
|
|
39
|
+
primary: TENCENT_TOKENHUB_MIGRATION_TARGET_MODEL_REF
|
|
27
40
|
},
|
|
28
41
|
changed: true
|
|
29
42
|
};
|
|
@@ -38,18 +51,14 @@ function migrateTencentTokenHubModelDefaults(cfg) {
|
|
|
38
51
|
config: cfg,
|
|
39
52
|
changes: []
|
|
40
53
|
};
|
|
41
|
-
const
|
|
42
|
-
const needsPreviewRepair = !Object.hasOwn(existingModels, TENCENT_TOKENHUB_PREVIEW_MODEL_REF) || needsDefaultAlias(existingModels[TENCENT_TOKENHUB_PREVIEW_MODEL_REF]);
|
|
54
|
+
const needsModelMapRepair = TENCENT_TOKENHUB_MANAGED_MODEL_REFS.some((ref) => needsModelRepair(existingModels, ref));
|
|
43
55
|
const migratedModel = migrateDefaultModel(cfg.agents?.defaults?.model);
|
|
44
|
-
if (!
|
|
56
|
+
if (!needsModelMapRepair && !migratedModel.changed) return {
|
|
45
57
|
config: cfg,
|
|
46
58
|
changes: []
|
|
47
59
|
};
|
|
48
|
-
const nextModels = {
|
|
49
|
-
|
|
50
|
-
[TENCENT_TOKENHUB_DEFAULT_MODEL_REF]: withDefaultAlias(existingModels[TENCENT_TOKENHUB_DEFAULT_MODEL_REF], TOKENHUB_DEFAULT_ALIAS),
|
|
51
|
-
[TENCENT_TOKENHUB_PREVIEW_MODEL_REF]: withDefaultAlias(existingModels[TENCENT_TOKENHUB_PREVIEW_MODEL_REF], TOKENHUB_PREVIEW_ALIAS)
|
|
52
|
-
};
|
|
60
|
+
const nextModels = { ...existingModels };
|
|
61
|
+
for (const ref of TENCENT_TOKENHUB_MANAGED_MODEL_REFS) nextModels[ref] = withDefaultAlias(existingModels[ref], TENCENT_TOKENHUB_MODEL_ALIASES[ref]);
|
|
53
62
|
const nextConfig = {
|
|
54
63
|
...cfg,
|
|
55
64
|
agents: {
|
|
@@ -61,8 +70,8 @@ function migrateTencentTokenHubModelDefaults(cfg) {
|
|
|
61
70
|
}
|
|
62
71
|
}
|
|
63
72
|
};
|
|
64
|
-
const changes = [`Updated Tencent TokenHub agent model defaults to include ${
|
|
65
|
-
if (migratedModel.changed) changes.push(`Changed Tencent TokenHub primary default from ${
|
|
73
|
+
const changes = [`Updated Tencent TokenHub agent model defaults to include ${TENCENT_TOKENHUB_MANAGED_MODEL_REFS.join(", ")}.`];
|
|
74
|
+
if (migratedModel.changed) changes.push(`Changed Tencent TokenHub primary default from ${TENCENT_TOKENHUB_HY3_PREVIEW_MODEL_REF} to ${TENCENT_TOKENHUB_MIGRATION_TARGET_MODEL_REF}.`);
|
|
66
75
|
return {
|
|
67
76
|
config: nextConfig,
|
|
68
77
|
changes
|
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-
|
|
1
|
+
import { a as TOKENPLAN_MODEL_CATALOG, n as TOKENHUB_MODEL_CATALOG, o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID } from "./models-CeL6cmHz.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";
|
|
@@ -2,6 +2,7 @@ import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-c
|
|
|
2
2
|
//#region extensions/tencent/openclaw.plugin.json
|
|
3
3
|
var openclaw_plugin_default = {
|
|
4
4
|
id: "tencent",
|
|
5
|
+
categories: ["models"],
|
|
5
6
|
activation: { "onStartup": false },
|
|
6
7
|
enabledByDefault: true,
|
|
7
8
|
providerCatalogEntry: "./provider-discovery.ts",
|
|
@@ -15,97 +16,129 @@ var openclaw_plugin_default = {
|
|
|
15
16
|
"tencent-tokenhub": {
|
|
16
17
|
"baseUrl": "https://tokenhub.tencentmaas.com/v1",
|
|
17
18
|
"api": "openai-completions",
|
|
18
|
-
"defaultModel": "
|
|
19
|
+
"defaultModel": "hy4-preview",
|
|
20
|
+
"models": [
|
|
21
|
+
{
|
|
22
|
+
"id": "hy3-preview",
|
|
23
|
+
"name": "Hy3 preview (TokenHub)",
|
|
24
|
+
"status": "deprecated",
|
|
25
|
+
"replacedBy": "hy4-preview",
|
|
26
|
+
"reasoning": true,
|
|
27
|
+
"input": ["text"],
|
|
28
|
+
"contextWindow": 256e3,
|
|
29
|
+
"maxTokens": 128e3,
|
|
30
|
+
"cost": {
|
|
31
|
+
"input": .176,
|
|
32
|
+
"output": .587,
|
|
33
|
+
"cacheRead": .059,
|
|
34
|
+
"cacheWrite": 0,
|
|
35
|
+
"tieredPricing": [
|
|
36
|
+
{
|
|
37
|
+
"input": .176,
|
|
38
|
+
"output": .587,
|
|
39
|
+
"cacheRead": .059,
|
|
40
|
+
"cacheWrite": 0,
|
|
41
|
+
"range": [0, 16e3]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"input": .235,
|
|
45
|
+
"output": .939,
|
|
46
|
+
"cacheRead": .088,
|
|
47
|
+
"cacheWrite": 0,
|
|
48
|
+
"range": [16e3, 32e3]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"input": .293,
|
|
52
|
+
"output": 1.173,
|
|
53
|
+
"cacheRead": .117,
|
|
54
|
+
"cacheWrite": 0,
|
|
55
|
+
"range": [32e3]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"compat": {
|
|
60
|
+
"supportsUsageInStreaming": true,
|
|
61
|
+
"supportsReasoningEffort": true,
|
|
62
|
+
"supportedReasoningEfforts": [
|
|
63
|
+
"none",
|
|
64
|
+
"low",
|
|
65
|
+
"high"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "hy3",
|
|
71
|
+
"name": "Hy3 (TokenHub)",
|
|
72
|
+
"reasoning": true,
|
|
73
|
+
"input": ["text"],
|
|
74
|
+
"contextWindow": 256e3,
|
|
75
|
+
"maxTokens": 128e3,
|
|
76
|
+
"cost": {
|
|
77
|
+
"input": .147,
|
|
78
|
+
"output": .587,
|
|
79
|
+
"cacheRead": .037,
|
|
80
|
+
"cacheWrite": 0
|
|
81
|
+
},
|
|
82
|
+
"compat": {
|
|
83
|
+
"supportsUsageInStreaming": true,
|
|
84
|
+
"supportsReasoningEffort": true,
|
|
85
|
+
"supportedReasoningEfforts": ["none", "high"]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "hy4-preview",
|
|
90
|
+
"name": "Hy4 preview (TokenHub)",
|
|
91
|
+
"reasoning": true,
|
|
92
|
+
"input": ["text"],
|
|
93
|
+
"contextWindow": 1024e3,
|
|
94
|
+
"maxTokens": 64e3,
|
|
95
|
+
"cost": {
|
|
96
|
+
"input": .834,
|
|
97
|
+
"output": 2.501,
|
|
98
|
+
"cacheRead": .042,
|
|
99
|
+
"cacheWrite": 0
|
|
100
|
+
},
|
|
101
|
+
"compat": {
|
|
102
|
+
"supportsUsageInStreaming": true,
|
|
103
|
+
"supportsReasoningEffort": true,
|
|
104
|
+
"supportedReasoningEfforts": ["none", "high"]
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"tencent-tokenplan": {
|
|
110
|
+
"baseUrl": "https://api.lkeap.cloud.tencent.com/plan/v3",
|
|
111
|
+
"api": "openai-completions",
|
|
112
|
+
"defaultModel": "hy4-preview",
|
|
19
113
|
"models": [{
|
|
20
|
-
"id": "hy3
|
|
21
|
-
"name": "Hy3
|
|
22
|
-
"status": "deprecated",
|
|
23
|
-
"replacedBy": "hy3",
|
|
114
|
+
"id": "hy3",
|
|
115
|
+
"name": "Hy3 (TokenPlan)",
|
|
24
116
|
"reasoning": true,
|
|
25
117
|
"input": ["text"],
|
|
26
118
|
"contextWindow": 256e3,
|
|
27
119
|
"maxTokens": 128e3,
|
|
28
|
-
"cost": {
|
|
29
|
-
"input": .176,
|
|
30
|
-
"output": .587,
|
|
31
|
-
"cacheRead": .059,
|
|
32
|
-
"cacheWrite": 0,
|
|
33
|
-
"tieredPricing": [
|
|
34
|
-
{
|
|
35
|
-
"input": .176,
|
|
36
|
-
"output": .587,
|
|
37
|
-
"cacheRead": .059,
|
|
38
|
-
"cacheWrite": 0,
|
|
39
|
-
"range": [0, 16e3]
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"input": .235,
|
|
43
|
-
"output": .939,
|
|
44
|
-
"cacheRead": .088,
|
|
45
|
-
"cacheWrite": 0,
|
|
46
|
-
"range": [16e3, 32e3]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"input": .293,
|
|
50
|
-
"output": 1.173,
|
|
51
|
-
"cacheRead": .117,
|
|
52
|
-
"cacheWrite": 0,
|
|
53
|
-
"range": [32e3]
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
120
|
"compat": {
|
|
58
121
|
"supportsUsageInStreaming": true,
|
|
59
122
|
"supportsReasoningEffort": true,
|
|
60
|
-
"supportedReasoningEfforts": [
|
|
61
|
-
"none",
|
|
62
|
-
"low",
|
|
63
|
-
"high"
|
|
64
|
-
]
|
|
123
|
+
"supportedReasoningEfforts": ["none", "high"]
|
|
65
124
|
}
|
|
66
125
|
}, {
|
|
67
|
-
"id": "
|
|
68
|
-
"name": "
|
|
126
|
+
"id": "hy4-preview",
|
|
127
|
+
"name": "Hy4 preview (TokenPlan)",
|
|
69
128
|
"reasoning": true,
|
|
70
129
|
"input": ["text"],
|
|
71
|
-
"contextWindow":
|
|
72
|
-
"maxTokens":
|
|
130
|
+
"contextWindow": 1024e3,
|
|
131
|
+
"maxTokens": 64e3,
|
|
73
132
|
"cost": {
|
|
74
|
-
"input": .
|
|
75
|
-
"output": .
|
|
76
|
-
"cacheRead": .
|
|
133
|
+
"input": .834,
|
|
134
|
+
"output": 2.501,
|
|
135
|
+
"cacheRead": .042,
|
|
77
136
|
"cacheWrite": 0
|
|
78
137
|
},
|
|
79
138
|
"compat": {
|
|
80
139
|
"supportsUsageInStreaming": true,
|
|
81
140
|
"supportsReasoningEffort": true,
|
|
82
|
-
"supportedReasoningEfforts": [
|
|
83
|
-
"none",
|
|
84
|
-
"low",
|
|
85
|
-
"high"
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
}]
|
|
89
|
-
},
|
|
90
|
-
"tencent-tokenplan": {
|
|
91
|
-
"baseUrl": "https://api.lkeap.cloud.tencent.com/plan/v3",
|
|
92
|
-
"api": "openai-completions",
|
|
93
|
-
"defaultModel": "hy3",
|
|
94
|
-
"models": [{
|
|
95
|
-
"id": "hy3",
|
|
96
|
-
"name": "Hy3 (TokenPlan)",
|
|
97
|
-
"reasoning": true,
|
|
98
|
-
"input": ["text"],
|
|
99
|
-
"contextWindow": 256e3,
|
|
100
|
-
"maxTokens": 128e3,
|
|
101
|
-
"compat": {
|
|
102
|
-
"supportsUsageInStreaming": true,
|
|
103
|
-
"supportsReasoningEffort": true,
|
|
104
|
-
"supportedReasoningEfforts": [
|
|
105
|
-
"none",
|
|
106
|
-
"low",
|
|
107
|
-
"high"
|
|
108
|
-
]
|
|
141
|
+
"supportedReasoningEfforts": ["none", "high"]
|
|
109
142
|
}
|
|
110
143
|
}]
|
|
111
144
|
}
|
|
@@ -125,7 +158,8 @@ var openclaw_plugin_default = {
|
|
|
125
158
|
configContracts: { "compatibilityMigrationPaths": [
|
|
126
159
|
"models.providers.tencent-tokenhub",
|
|
127
160
|
"agents.defaults.models.tencent-tokenhub/hy3",
|
|
128
|
-
"agents.defaults.models.tencent-tokenhub/hy3-preview"
|
|
161
|
+
"agents.defaults.models.tencent-tokenhub/hy3-preview",
|
|
162
|
+
"agents.defaults.models.tencent-tokenhub/hy4-preview"
|
|
129
163
|
] },
|
|
130
164
|
providerAuthChoices: [{
|
|
131
165
|
"provider": "tencent-tokenhub",
|
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-
|
|
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-CeL6cmHz.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,8 +1,10 @@
|
|
|
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-
|
|
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-CeL6cmHz.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
|
|
5
|
-
const
|
|
5
|
+
const TOKENHUB_HY3_MODEL_REF = `${TOKENHUB_PROVIDER_ID}/hy3`;
|
|
6
|
+
const TOKENHUB_HY3_PREVIEW_MODEL_REF = `${TOKENHUB_PROVIDER_ID}/hy3-preview`;
|
|
7
|
+
const TOKENHUB_HY4_PREVIEW_MODEL_REF = `${TOKENHUB_PROVIDER_ID}/hy4-preview`;
|
|
6
8
|
const TOKENHUB_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, TOKENHUB_PROVIDER_ID);
|
|
7
9
|
const { applyConfig: applyTokenHubConfig } = createModelCatalogPresetAppliers({
|
|
8
10
|
primaryModelRef: TOKENHUB_DEFAULT_MODEL_REF,
|
|
@@ -11,15 +13,24 @@ const { applyConfig: applyTokenHubConfig } = createModelCatalogPresetAppliers({
|
|
|
11
13
|
api: "openai-completions",
|
|
12
14
|
baseUrl: TOKENHUB_BASE_URL,
|
|
13
15
|
catalogModels: cfg.models?.mode === "replace" ? structuredClone(TOKENHUB_MODEL_CATALOG) : [],
|
|
14
|
-
aliases: [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
aliases: [
|
|
17
|
+
{
|
|
18
|
+
modelRef: TOKENHUB_HY4_PREVIEW_MODEL_REF,
|
|
19
|
+
alias: "Hy4 preview (TokenHub)"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
modelRef: TOKENHUB_HY3_MODEL_REF,
|
|
23
|
+
alias: "Hy3 (TokenHub)"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
modelRef: TOKENHUB_HY3_PREVIEW_MODEL_REF,
|
|
27
|
+
alias: "Hy3 preview (TokenHub)"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
21
30
|
})
|
|
22
31
|
});
|
|
32
|
+
const TOKENPLAN_HY3_MODEL_REF = `${TOKENPLAN_PROVIDER_ID}/hy3`;
|
|
33
|
+
const TOKENPLAN_HY4_PREVIEW_MODEL_REF = `${TOKENPLAN_PROVIDER_ID}/hy4-preview`;
|
|
23
34
|
const TOKENPLAN_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, TOKENPLAN_PROVIDER_ID);
|
|
24
35
|
const { applyConfig: applyTokenPlanConfig } = createModelCatalogPresetAppliers({
|
|
25
36
|
primaryModelRef: TOKENPLAN_DEFAULT_MODEL_REF,
|
|
@@ -29,7 +40,10 @@ const { applyConfig: applyTokenPlanConfig } = createModelCatalogPresetAppliers({
|
|
|
29
40
|
baseUrl: TOKENPLAN_BASE_URL,
|
|
30
41
|
catalogModels: cfg.models?.mode === "replace" ? structuredClone(TOKENPLAN_MODEL_CATALOG) : [],
|
|
31
42
|
aliases: [{
|
|
32
|
-
modelRef:
|
|
43
|
+
modelRef: TOKENPLAN_HY4_PREVIEW_MODEL_REF,
|
|
44
|
+
alias: "Hy4 preview (TokenPlan)"
|
|
45
|
+
}, {
|
|
46
|
+
modelRef: TOKENPLAN_HY3_MODEL_REF,
|
|
33
47
|
alias: "Hy3 (TokenPlan)"
|
|
34
48
|
}]
|
|
35
49
|
})
|
package/dist/provider-catalog.js
CHANGED
|
@@ -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-
|
|
1
|
+
import { a as TOKENPLAN_MODEL_CATALOG, i as TOKENPLAN_BASE_URL, n as TOKENHUB_MODEL_CATALOG, t as TOKENHUB_BASE_URL } from "./models-CeL6cmHz.js";
|
|
2
2
|
//#region extensions/tencent/provider-catalog.ts
|
|
3
3
|
function buildTokenHubProvider() {
|
|
4
4
|
return {
|
package/dist/stream.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID } from "./models-
|
|
1
|
+
import { o as TOKENPLAN_PROVIDER_ID, r as TOKENHUB_PROVIDER_ID } from "./models-CeL6cmHz.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]);
|
|
5
|
-
const
|
|
5
|
+
const TENCENT_TWO_RUNG_EFFORT_MAP = Object.freeze({
|
|
6
6
|
off: "none",
|
|
7
7
|
none: "none",
|
|
8
8
|
minimal: "high",
|
|
@@ -11,11 +11,7 @@ const TENCENT_REASONING_EFFORT_MAP = Object.freeze({
|
|
|
11
11
|
high: "high",
|
|
12
12
|
xhigh: "high"
|
|
13
13
|
});
|
|
14
|
-
const
|
|
15
|
-
"none",
|
|
16
|
-
"low",
|
|
17
|
-
"high"
|
|
18
|
-
]);
|
|
14
|
+
const TENCENT_TWO_RUNG_MODEL_IDS = /* @__PURE__ */ new Set(["hy3"]);
|
|
19
15
|
function resolveRequestedEffort(thinkingLevel, options) {
|
|
20
16
|
const withEffort = options ?? {};
|
|
21
17
|
const raw = typeof withEffort.reasoningEffort === "string" && withEffort.reasoningEffort || typeof withEffort.reasoning === "string" && withEffort.reasoning || typeof thinkingLevel === "string" && thinkingLevel || void 0;
|
|
@@ -23,11 +19,8 @@ function resolveRequestedEffort(thinkingLevel, options) {
|
|
|
23
19
|
}
|
|
24
20
|
function mapEffortForTencent(model, effort) {
|
|
25
21
|
if (!effort) return;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return TOKENHUB_HY3_PREVIEW_REASONING_EFFORTS.has(effort) ? effort : void 0;
|
|
29
|
-
}
|
|
30
|
-
return TENCENT_REASONING_EFFORT_MAP[effort];
|
|
22
|
+
const modelId = model.id;
|
|
23
|
+
if (typeof modelId === "string" && TENCENT_TWO_RUNG_MODEL_IDS.has(modelId)) return TENCENT_TWO_RUNG_EFFORT_MAP[effort];
|
|
31
24
|
}
|
|
32
25
|
function isTencentCompletionsCall(model) {
|
|
33
26
|
const provider = model.provider;
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "tencent",
|
|
3
|
+
"categories": [
|
|
4
|
+
"models"
|
|
5
|
+
],
|
|
3
6
|
"activation": {
|
|
4
7
|
"onStartup": false
|
|
5
8
|
},
|
|
@@ -18,13 +21,13 @@
|
|
|
18
21
|
"tencent-tokenhub": {
|
|
19
22
|
"baseUrl": "https://tokenhub.tencentmaas.com/v1",
|
|
20
23
|
"api": "openai-completions",
|
|
21
|
-
"defaultModel": "
|
|
24
|
+
"defaultModel": "hy4-preview",
|
|
22
25
|
"models": [
|
|
23
26
|
{
|
|
24
27
|
"id": "hy3-preview",
|
|
25
28
|
"name": "Hy3 preview (TokenHub)",
|
|
26
29
|
"status": "deprecated",
|
|
27
|
-
"replacedBy": "
|
|
30
|
+
"replacedBy": "hy4-preview",
|
|
28
31
|
"reasoning": true,
|
|
29
32
|
"input": [
|
|
30
33
|
"text"
|
|
@@ -98,7 +101,30 @@
|
|
|
98
101
|
"supportsReasoningEffort": true,
|
|
99
102
|
"supportedReasoningEfforts": [
|
|
100
103
|
"none",
|
|
101
|
-
"
|
|
104
|
+
"high"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "hy4-preview",
|
|
110
|
+
"name": "Hy4 preview (TokenHub)",
|
|
111
|
+
"reasoning": true,
|
|
112
|
+
"input": [
|
|
113
|
+
"text"
|
|
114
|
+
],
|
|
115
|
+
"contextWindow": 1024000,
|
|
116
|
+
"maxTokens": 64000,
|
|
117
|
+
"cost": {
|
|
118
|
+
"input": 0.834,
|
|
119
|
+
"output": 2.501,
|
|
120
|
+
"cacheRead": 0.042,
|
|
121
|
+
"cacheWrite": 0
|
|
122
|
+
},
|
|
123
|
+
"compat": {
|
|
124
|
+
"supportsUsageInStreaming": true,
|
|
125
|
+
"supportsReasoningEffort": true,
|
|
126
|
+
"supportedReasoningEfforts": [
|
|
127
|
+
"none",
|
|
102
128
|
"high"
|
|
103
129
|
]
|
|
104
130
|
}
|
|
@@ -108,7 +134,7 @@
|
|
|
108
134
|
"tencent-tokenplan": {
|
|
109
135
|
"baseUrl": "https://api.lkeap.cloud.tencent.com/plan/v3",
|
|
110
136
|
"api": "openai-completions",
|
|
111
|
-
"defaultModel": "
|
|
137
|
+
"defaultModel": "hy4-preview",
|
|
112
138
|
"models": [
|
|
113
139
|
{
|
|
114
140
|
"id": "hy3",
|
|
@@ -124,7 +150,30 @@
|
|
|
124
150
|
"supportsReasoningEffort": true,
|
|
125
151
|
"supportedReasoningEfforts": [
|
|
126
152
|
"none",
|
|
127
|
-
"
|
|
153
|
+
"high"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"id": "hy4-preview",
|
|
159
|
+
"name": "Hy4 preview (TokenPlan)",
|
|
160
|
+
"reasoning": true,
|
|
161
|
+
"input": [
|
|
162
|
+
"text"
|
|
163
|
+
],
|
|
164
|
+
"contextWindow": 1024000,
|
|
165
|
+
"maxTokens": 64000,
|
|
166
|
+
"cost": {
|
|
167
|
+
"input": 0.834,
|
|
168
|
+
"output": 2.501,
|
|
169
|
+
"cacheRead": 0.042,
|
|
170
|
+
"cacheWrite": 0
|
|
171
|
+
},
|
|
172
|
+
"compat": {
|
|
173
|
+
"supportsUsageInStreaming": true,
|
|
174
|
+
"supportsReasoningEffort": true,
|
|
175
|
+
"supportedReasoningEfforts": [
|
|
176
|
+
"none",
|
|
128
177
|
"high"
|
|
129
178
|
]
|
|
130
179
|
}
|
|
@@ -157,7 +206,8 @@
|
|
|
157
206
|
"compatibilityMigrationPaths": [
|
|
158
207
|
"models.providers.tencent-tokenhub",
|
|
159
208
|
"agents.defaults.models.tencent-tokenhub/hy3",
|
|
160
|
-
"agents.defaults.models.tencent-tokenhub/hy3-preview"
|
|
209
|
+
"agents.defaults.models.tencent-tokenhub/hy3-preview",
|
|
210
|
+
"agents.defaults.models.tencent-tokenhub/hy4-preview"
|
|
161
211
|
]
|
|
162
212
|
},
|
|
163
213
|
"providerAuthChoices": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/tencent-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.4",
|
|
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.
|
|
18
|
+
"pluginApi": ">=2026.9.4"
|
|
19
19
|
},
|
|
20
20
|
"build": {
|
|
21
|
-
"openclawVersion": "2026.9.
|
|
21
|
+
"openclawVersion": "2026.9.4",
|
|
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.
|
|
43
|
+
"openclaw": ">=2026.9.4"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"openclaw": {
|