@openclaw/chutes-provider 2026.7.2-beta.7 → 2026.7.34
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 +3 -3
- package/dist/index.js +3 -3
- package/dist/models.js +766 -2
- package/dist/oauth.js +18 -38
- package/dist/onboard.js +26 -18
- package/dist/provider-catalog.js +3 -3
- package/openclaw.plugin.json +597 -37
- package/package.json +4 -4
- package/dist/models-BEC8VGou.js +0 -245
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/chutes-provider",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.34",
|
|
4
4
|
"description": "OpenClaw Chutes.ai 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.7.
|
|
21
|
+
"pluginApi": ">=2026.7.34"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.7.
|
|
24
|
+
"openclawVersion": "2026.7.34",
|
|
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.7.
|
|
41
|
+
"openclaw": ">=2026.7.34"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|
package/dist/models-BEC8VGou.js
DELETED
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { isChutesModelDiscoveryTestEnvironment } from "./model-discovery-env.js";
|
|
2
|
-
import { asPositiveSafeInteger, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
import { buildManifestModelDefinition } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
4
|
-
import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime";
|
|
5
|
-
import { buildLiveModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
6
|
-
import { fetchWithSsrFGuard, ssrfPolicyFromHttpBaseUrlAllowedHostname } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
7
|
-
//#region extensions/chutes/openclaw.plugin.json
|
|
8
|
-
var openclaw_plugin_default = {
|
|
9
|
-
id: "chutes",
|
|
10
|
-
activation: { "onStartup": false },
|
|
11
|
-
enabledByDefault: true,
|
|
12
|
-
providers: ["chutes"],
|
|
13
|
-
providerEndpoints: [{
|
|
14
|
-
"endpointClass": "chutes-native",
|
|
15
|
-
"hosts": ["llm.chutes.ai"]
|
|
16
|
-
}],
|
|
17
|
-
providerRequest: { "providers": { "chutes": { "family": "chutes" } } },
|
|
18
|
-
setup: { "providers": [{
|
|
19
|
-
"id": "chutes",
|
|
20
|
-
"envVars": ["CHUTES_API_KEY", "CHUTES_OAUTH_TOKEN"]
|
|
21
|
-
}] },
|
|
22
|
-
providerAuthChoices: [{
|
|
23
|
-
"provider": "chutes",
|
|
24
|
-
"method": "oauth",
|
|
25
|
-
"choiceId": "chutes",
|
|
26
|
-
"appGuidedAuth": "oauth",
|
|
27
|
-
"choiceLabel": "Chutes (OAuth)",
|
|
28
|
-
"choiceHint": "Browser sign-in",
|
|
29
|
-
"groupId": "chutes",
|
|
30
|
-
"groupLabel": "Chutes",
|
|
31
|
-
"groupHint": "OAuth + API key"
|
|
32
|
-
}, {
|
|
33
|
-
"provider": "chutes",
|
|
34
|
-
"method": "api-key",
|
|
35
|
-
"choiceId": "chutes-api-key",
|
|
36
|
-
"appGuidedSecret": true,
|
|
37
|
-
"choiceLabel": "Chutes API key",
|
|
38
|
-
"choiceHint": "Open-source models including Llama, DeepSeek, and more",
|
|
39
|
-
"groupId": "chutes",
|
|
40
|
-
"groupLabel": "Chutes",
|
|
41
|
-
"groupHint": "OAuth + API key",
|
|
42
|
-
"optionKey": "chutesApiKey",
|
|
43
|
-
"cliFlag": "--chutes-api-key",
|
|
44
|
-
"cliOption": "--chutes-api-key <key>",
|
|
45
|
-
"cliDescription": "Chutes API key"
|
|
46
|
-
}],
|
|
47
|
-
configSchema: {
|
|
48
|
-
"type": "object",
|
|
49
|
-
"additionalProperties": false,
|
|
50
|
-
"properties": {}
|
|
51
|
-
},
|
|
52
|
-
modelCatalog: {
|
|
53
|
-
"providers": { "chutes": {
|
|
54
|
-
"baseUrl": "https://llm.chutes.ai/v1",
|
|
55
|
-
"api": "openai-completions",
|
|
56
|
-
"defaultModel": "zai-org/GLM-5.2-TEE",
|
|
57
|
-
"models": [
|
|
58
|
-
{
|
|
59
|
-
"id": "deepseek-ai/DeepSeek-V3.2-TEE",
|
|
60
|
-
"name": "deepseek-ai/DeepSeek-V3.2-TEE",
|
|
61
|
-
"reasoning": true,
|
|
62
|
-
"input": ["text"],
|
|
63
|
-
"contextWindow": 131072,
|
|
64
|
-
"maxTokens": 65536,
|
|
65
|
-
"cost": {
|
|
66
|
-
"input": 1,
|
|
67
|
-
"output": 1,
|
|
68
|
-
"cacheRead": .5,
|
|
69
|
-
"cacheWrite": 0
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"id": "moonshotai/Kimi-K2.6-TEE",
|
|
74
|
-
"name": "moonshotai/Kimi-K2.6-TEE",
|
|
75
|
-
"reasoning": true,
|
|
76
|
-
"input": ["text", "image"],
|
|
77
|
-
"contextWindow": 262144,
|
|
78
|
-
"maxTokens": 65535,
|
|
79
|
-
"cost": {
|
|
80
|
-
"input": .66,
|
|
81
|
-
"output": 3.5,
|
|
82
|
-
"cacheRead": .33,
|
|
83
|
-
"cacheWrite": 0
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"id": "moonshotai/Kimi-K2.5-TEE",
|
|
88
|
-
"name": "moonshotai/Kimi-K2.5-TEE",
|
|
89
|
-
"reasoning": true,
|
|
90
|
-
"input": ["text", "image"],
|
|
91
|
-
"contextWindow": 262144,
|
|
92
|
-
"maxTokens": 65535,
|
|
93
|
-
"cost": {
|
|
94
|
-
"input": .44,
|
|
95
|
-
"output": 2,
|
|
96
|
-
"cacheRead": .22,
|
|
97
|
-
"cacheWrite": 0
|
|
98
|
-
},
|
|
99
|
-
"status": "deprecated",
|
|
100
|
-
"replacedBy": "moonshotai/Kimi-K2.6-TEE"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"id": "zai-org/GLM-5.2-TEE",
|
|
104
|
-
"name": "zai-org/GLM-5.2-TEE",
|
|
105
|
-
"reasoning": true,
|
|
106
|
-
"input": ["text"],
|
|
107
|
-
"contextWindow": 1048576,
|
|
108
|
-
"maxTokens": 65535,
|
|
109
|
-
"cost": {
|
|
110
|
-
"input": 1.25,
|
|
111
|
-
"output": 3.95,
|
|
112
|
-
"cacheRead": .625,
|
|
113
|
-
"cacheWrite": 0
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"id": "MiniMaxAI/MiniMax-M2.5-TEE",
|
|
118
|
-
"name": "MiniMaxAI/MiniMax-M2.5-TEE",
|
|
119
|
-
"reasoning": true,
|
|
120
|
-
"input": ["text"],
|
|
121
|
-
"contextWindow": 196608,
|
|
122
|
-
"maxTokens": 65536,
|
|
123
|
-
"cost": {
|
|
124
|
-
"input": .15,
|
|
125
|
-
"output": 1.2,
|
|
126
|
-
"cacheRead": .075,
|
|
127
|
-
"cacheWrite": 0
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"id": "Qwen/Qwen3.6-27B-TEE",
|
|
132
|
-
"name": "Qwen/Qwen3.6-27B-TEE",
|
|
133
|
-
"reasoning": true,
|
|
134
|
-
"input": ["text", "image"],
|
|
135
|
-
"contextWindow": 262144,
|
|
136
|
-
"maxTokens": 65536,
|
|
137
|
-
"cost": {
|
|
138
|
-
"input": .3,
|
|
139
|
-
"output": 2,
|
|
140
|
-
"cacheRead": .15,
|
|
141
|
-
"cacheWrite": 0
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"id": "Qwen/Qwen3.5-397B-A17B-TEE",
|
|
146
|
-
"name": "Qwen/Qwen3.5-397B-A17B-TEE",
|
|
147
|
-
"reasoning": true,
|
|
148
|
-
"input": ["text", "image"],
|
|
149
|
-
"contextWindow": 262144,
|
|
150
|
-
"maxTokens": 65536,
|
|
151
|
-
"cost": {
|
|
152
|
-
"input": .45,
|
|
153
|
-
"output": 3,
|
|
154
|
-
"cacheRead": .225,
|
|
155
|
-
"cacheWrite": 0
|
|
156
|
-
},
|
|
157
|
-
"status": "deprecated",
|
|
158
|
-
"replacedBy": "Qwen/Qwen3.6-27B-TEE"
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
} },
|
|
162
|
-
"discovery": { "chutes": "refreshable" }
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
//#endregion
|
|
166
|
-
//#region extensions/chutes/models.ts
|
|
167
|
-
/**
|
|
168
|
-
* Chutes model catalog, static model definitions, and dynamic model discovery.
|
|
169
|
-
*/
|
|
170
|
-
const CHUTES_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.chutes;
|
|
171
|
-
/** Base URL for Chutes OpenAI-compatible inference. */
|
|
172
|
-
const CHUTES_BASE_URL = CHUTES_MANIFEST_CATALOG.baseUrl;
|
|
173
|
-
const CHUTES_DEFAULT_CONTEXT_WINDOW = 128e3;
|
|
174
|
-
const CHUTES_DEFAULT_MAX_TOKENS = 4096;
|
|
175
|
-
function decorateChutesModelDefinition(model) {
|
|
176
|
-
return {
|
|
177
|
-
...model,
|
|
178
|
-
compat: {
|
|
179
|
-
...model.compat,
|
|
180
|
-
supportsUsageInStreaming: false
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
/** Bundled fallback Chutes model catalog, normalized from the plugin manifest. */
|
|
185
|
-
const CHUTES_MODEL_CATALOG = CHUTES_MANIFEST_CATALOG.models.map(buildManifestModelDefinition({
|
|
186
|
-
providerId: "chutes",
|
|
187
|
-
catalog: CHUTES_MANIFEST_CATALOG,
|
|
188
|
-
decorate: decorateChutesModelDefinition
|
|
189
|
-
}));
|
|
190
|
-
const CACHE_TTL = 300 * 1e3;
|
|
191
|
-
function projectChutesModels(rows) {
|
|
192
|
-
const seen = /* @__PURE__ */ new Set();
|
|
193
|
-
const models = [];
|
|
194
|
-
for (const row of rows) {
|
|
195
|
-
if (!row || typeof row !== "object" || Array.isArray(row)) continue;
|
|
196
|
-
const entry = row;
|
|
197
|
-
const id = normalizeOptionalString(entry.id) ?? "";
|
|
198
|
-
if (!id || seen.has(id)) continue;
|
|
199
|
-
seen.add(id);
|
|
200
|
-
const lowerId = normalizeLowercaseStringOrEmpty(id);
|
|
201
|
-
models.push({
|
|
202
|
-
id,
|
|
203
|
-
name: id,
|
|
204
|
-
reasoning: entry.supported_features?.includes("reasoning") || lowerId.includes("r1") || lowerId.includes("thinking") || lowerId.includes("reason") || lowerId.includes("tee"),
|
|
205
|
-
input: (entry.input_modalities || ["text"]).filter((item) => item === "text" || item === "image"),
|
|
206
|
-
cost: {
|
|
207
|
-
input: entry.pricing?.prompt || 0,
|
|
208
|
-
output: entry.pricing?.completion || 0,
|
|
209
|
-
cacheRead: entry.pricing?.input_cache_read || 0,
|
|
210
|
-
cacheWrite: 0
|
|
211
|
-
},
|
|
212
|
-
contextWindow: asPositiveSafeInteger(entry.context_length) ?? CHUTES_DEFAULT_CONTEXT_WINDOW,
|
|
213
|
-
maxTokens: asPositiveSafeInteger(entry.max_output_length) ?? CHUTES_DEFAULT_MAX_TOKENS,
|
|
214
|
-
compat: { supportsUsageInStreaming: false }
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
return models;
|
|
218
|
-
}
|
|
219
|
-
/** Discovers Chutes models dynamically, falling back to the bundled static catalog. */
|
|
220
|
-
async function discoverChutesModels(accessToken) {
|
|
221
|
-
if (isChutesModelDiscoveryTestEnvironment()) return structuredClone(CHUTES_MODEL_CATALOG);
|
|
222
|
-
return (await buildLiveModelProviderConfig({
|
|
223
|
-
providerId: "chutes",
|
|
224
|
-
endpoint: `${CHUTES_BASE_URL}/models`,
|
|
225
|
-
providerConfig: {
|
|
226
|
-
baseUrl: CHUTES_BASE_URL,
|
|
227
|
-
api: "openai-completions"
|
|
228
|
-
},
|
|
229
|
-
models: structuredClone(CHUTES_MODEL_CATALOG),
|
|
230
|
-
discoveryApiKey: normalizeOptionalString(accessToken),
|
|
231
|
-
timeoutMs: 1e4,
|
|
232
|
-
ttlMs: CACHE_TTL,
|
|
233
|
-
buildRequestHeaders: ({ discoveryApiKey }) => ({
|
|
234
|
-
Accept: "application/json",
|
|
235
|
-
...discoveryApiKey ? { Authorization: `Bearer ${discoveryApiKey}` } : {}
|
|
236
|
-
}),
|
|
237
|
-
policy: ssrfPolicyFromHttpBaseUrlAllowedHostname(CHUTES_BASE_URL),
|
|
238
|
-
auditContext: "chutes-model-discovery",
|
|
239
|
-
fetchGuard: (params) => fetchWithSsrFGuard(withTrustedEnvProxyGuardedFetchMode(params)),
|
|
240
|
-
fallbackToAnonymousOnUnauthorized: true,
|
|
241
|
-
projectRows: projectChutesModels
|
|
242
|
-
})).models;
|
|
243
|
-
}
|
|
244
|
-
//#endregion
|
|
245
|
-
export { openclaw_plugin_default as i, CHUTES_MODEL_CATALOG as n, discoverChutesModels as r, CHUTES_BASE_URL as t };
|