@openclaw/chutes-provider 2026.9.1-beta.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 +1 -1
- package/dist/{models-CuOVDO2U.js → models-DvzDAkE0.js} +19 -17
- package/dist/models.js +1 -1
- package/dist/oauth.js +2 -2
- package/dist/onboard.js +3 -3
- package/dist/pricing-api.js +22 -0
- package/dist/provider-catalog.js +2 -3
- package/openclaw.plugin.json +15 -7
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./models-
|
|
1
|
+
import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./models-DvzDAkE0.js";
|
|
2
2
|
import { CHUTES_DEFAULT_MODEL_ID, CHUTES_DEFAULT_MODEL_REF, applyChutesApiKeyConfig, applyChutesConfig, applyChutesProviderConfig } from "./onboard.js";
|
|
3
3
|
import { buildChutesProvider } from "./provider-catalog.js";
|
|
4
4
|
export { CHUTES_BASE_URL, CHUTES_DEFAULT_MODEL_ID, CHUTES_DEFAULT_MODEL_REF, CHUTES_MODEL_CATALOG, applyChutesApiKeyConfig, applyChutesConfig, applyChutesProviderConfig, buildChutesProvider, discoverChutesModels };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { normalizeChutesModelPricing } from "./pricing-api.js";
|
|
1
2
|
import { asPositiveSafeInteger, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
import {
|
|
3
|
+
import { buildManifestModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
3
4
|
import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime";
|
|
4
5
|
import { buildLiveModelProviderConfig } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
5
6
|
import { fetchWithSsrFGuard, ssrfPolicyFromHttpBaseUrlAllowedHostname } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
@@ -9,6 +10,7 @@ var openclaw_plugin_default = {
|
|
|
9
10
|
activation: { "onStartup": false },
|
|
10
11
|
enabledByDefault: true,
|
|
11
12
|
providers: ["chutes"],
|
|
13
|
+
modelPricing: { "providers": { "chutes": { "chutes": { "provider": "chutes" } } } },
|
|
12
14
|
providerEndpoints: [{
|
|
13
15
|
"endpointClass": "chutes-native",
|
|
14
16
|
"hosts": ["llm.chutes.ai"]
|
|
@@ -49,6 +51,7 @@ var openclaw_plugin_default = {
|
|
|
49
51
|
"properties": {}
|
|
50
52
|
},
|
|
51
53
|
modelCatalog: {
|
|
54
|
+
"modelsDev": { "chutes": "chutes" },
|
|
52
55
|
"providers": { "chutes": {
|
|
53
56
|
"baseUrl": "https://llm.chutes.ai/v1",
|
|
54
57
|
"api": "openai-completions",
|
|
@@ -64,7 +67,7 @@ var openclaw_plugin_default = {
|
|
|
64
67
|
"cost": {
|
|
65
68
|
"input": 1,
|
|
66
69
|
"output": 1,
|
|
67
|
-
"cacheRead": .
|
|
70
|
+
"cacheRead": .09999999999999998,
|
|
68
71
|
"cacheWrite": 0
|
|
69
72
|
}
|
|
70
73
|
},
|
|
@@ -76,9 +79,9 @@ var openclaw_plugin_default = {
|
|
|
76
79
|
"contextWindow": 262144,
|
|
77
80
|
"maxTokens": 65535,
|
|
78
81
|
"cost": {
|
|
79
|
-
"input": .
|
|
80
|
-
"output": 3.
|
|
81
|
-
"cacheRead": .
|
|
82
|
+
"input": .58,
|
|
83
|
+
"output": 3.4,
|
|
84
|
+
"cacheRead": .05799999999999998,
|
|
82
85
|
"cacheWrite": 0
|
|
83
86
|
}
|
|
84
87
|
},
|
|
@@ -108,7 +111,7 @@ var openclaw_plugin_default = {
|
|
|
108
111
|
"cost": {
|
|
109
112
|
"input": 1.25,
|
|
110
113
|
"output": 3.95,
|
|
111
|
-
"cacheRead": .
|
|
114
|
+
"cacheRead": .12499999999999997,
|
|
112
115
|
"cacheWrite": 0
|
|
113
116
|
}
|
|
114
117
|
},
|
|
@@ -136,7 +139,7 @@ var openclaw_plugin_default = {
|
|
|
136
139
|
"cost": {
|
|
137
140
|
"input": .3,
|
|
138
141
|
"output": 2,
|
|
139
|
-
"cacheRead": .
|
|
142
|
+
"cacheRead": .029999999999999992,
|
|
140
143
|
"cacheWrite": 0
|
|
141
144
|
}
|
|
142
145
|
},
|
|
@@ -150,7 +153,7 @@ var openclaw_plugin_default = {
|
|
|
150
153
|
"cost": {
|
|
151
154
|
"input": .45,
|
|
152
155
|
"output": 3,
|
|
153
|
-
"cacheRead": .
|
|
156
|
+
"cacheRead": .04499999999999999,
|
|
154
157
|
"cacheWrite": 0
|
|
155
158
|
},
|
|
156
159
|
"status": "deprecated",
|
|
@@ -181,12 +184,11 @@ function decorateChutesModelDefinition(model) {
|
|
|
181
184
|
};
|
|
182
185
|
}
|
|
183
186
|
/** Bundled fallback Chutes model catalog, normalized from the plugin manifest. */
|
|
184
|
-
const CHUTES_MODEL_CATALOG =
|
|
187
|
+
const CHUTES_MODEL_CATALOG = buildManifestModelProviderConfig({
|
|
185
188
|
providerId: "chutes",
|
|
186
|
-
catalog: CHUTES_MANIFEST_CATALOG
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
const CACHE_TTL = 300 * 1e3;
|
|
189
|
+
catalog: CHUTES_MANIFEST_CATALOG
|
|
190
|
+
}).models.map(decorateChutesModelDefinition);
|
|
191
|
+
const CACHE_TTL = 3e5;
|
|
190
192
|
function projectChutesModels(rows) {
|
|
191
193
|
const seen = /* @__PURE__ */ new Set();
|
|
192
194
|
const models = [];
|
|
@@ -202,10 +204,10 @@ function projectChutesModels(rows) {
|
|
|
202
204
|
name: id,
|
|
203
205
|
reasoning: entry.supported_features?.includes("reasoning") || lowerId.includes("r1") || lowerId.includes("thinking") || lowerId.includes("reason") || lowerId.includes("tee"),
|
|
204
206
|
input: (entry.input_modalities || ["text"]).filter((item) => item === "text" || item === "image"),
|
|
205
|
-
cost: {
|
|
206
|
-
input:
|
|
207
|
-
output:
|
|
208
|
-
cacheRead:
|
|
207
|
+
cost: normalizeChutesModelPricing(entry.pricing) ?? {
|
|
208
|
+
input: 0,
|
|
209
|
+
output: 0,
|
|
210
|
+
cacheRead: 0,
|
|
209
211
|
cacheWrite: 0
|
|
210
212
|
},
|
|
211
213
|
contextWindow: asPositiveSafeInteger(entry.context_length) ?? asPositiveSafeInteger(entry.max_model_len) ?? CHUTES_DEFAULT_CONTEXT_WINDOW,
|
package/dist/models.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./models-
|
|
1
|
+
import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./models-DvzDAkE0.js";
|
|
2
2
|
export { CHUTES_BASE_URL, CHUTES_MODEL_CATALOG, discoverChutesModels };
|
package/dist/oauth.js
CHANGED
|
@@ -48,7 +48,7 @@ function buildAuthorizeUrl(params) {
|
|
|
48
48
|
function resolveChutesExpiresAt(value, now) {
|
|
49
49
|
return resolveExpiresAtMsFromDurationSeconds(value, {
|
|
50
50
|
nowMs: now,
|
|
51
|
-
bufferMs:
|
|
51
|
+
bufferMs: 3e5,
|
|
52
52
|
minRemainingMs: 3e4
|
|
53
53
|
});
|
|
54
54
|
}
|
|
@@ -158,7 +158,7 @@ async function refreshChutesOAuthCredential(credential, options = {}) {
|
|
|
158
158
|
async function loginChutes(params) {
|
|
159
159
|
const { verifier, challenge } = generatePkceVerifierChallenge();
|
|
160
160
|
const state = params.createState?.() ?? randomBytes(16).toString("hex");
|
|
161
|
-
const timeoutMs = params.timeoutMs ??
|
|
161
|
+
const timeoutMs = params.timeoutMs ?? 18e4;
|
|
162
162
|
const url = buildAuthorizeUrl({
|
|
163
163
|
clientId: params.app.clientId,
|
|
164
164
|
redirectUri: params.app.redirectUri,
|
package/dist/onboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as openclaw_plugin_default, n as CHUTES_MODEL_CATALOG, t as CHUTES_BASE_URL } from "./models-
|
|
1
|
+
import { i as openclaw_plugin_default, n as CHUTES_MODEL_CATALOG, t as CHUTES_BASE_URL } from "./models-DvzDAkE0.js";
|
|
2
2
|
import { readManifestProviderDefaultModelRef } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
3
3
|
import { applyAgentDefaultModelPrimary, createModelCatalogPresetAppliers } from "openclaw/plugin-sdk/provider-onboard";
|
|
4
4
|
//#region extensions/chutes/onboard.ts
|
|
@@ -6,11 +6,11 @@ const CHUTES_DEFAULT_MODEL_ID = openclaw_plugin_default.modelCatalog.providers.c
|
|
|
6
6
|
const CHUTES_DEFAULT_MODEL_REF = readManifestProviderDefaultModelRef(openclaw_plugin_default, "chutes");
|
|
7
7
|
const chutesPresetAppliers = createModelCatalogPresetAppliers({
|
|
8
8
|
primaryModelRef: CHUTES_DEFAULT_MODEL_REF,
|
|
9
|
-
resolveParams: (
|
|
9
|
+
resolveParams: (cfg) => ({
|
|
10
10
|
providerId: "chutes",
|
|
11
11
|
api: "openai-completions",
|
|
12
12
|
baseUrl: CHUTES_BASE_URL,
|
|
13
|
-
catalogModels: structuredClone(CHUTES_MODEL_CATALOG),
|
|
13
|
+
catalogModels: cfg.models?.mode === "replace" ? structuredClone(CHUTES_MODEL_CATALOG) : [],
|
|
14
14
|
aliases: [
|
|
15
15
|
...CHUTES_MODEL_CATALOG.map((model) => `chutes/${model.id}`),
|
|
16
16
|
{
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { asFiniteNumberInRange, asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
import { normalizeModelPricingCatalog } from "openclaw/plugin-sdk/model-catalog-pricing";
|
|
3
|
+
//#region extensions/chutes/pricing-api.ts
|
|
4
|
+
/** Chutes publishes numeric USD-per-million rates, not OpenRouter's per-token strings. */
|
|
5
|
+
function normalizeChutesModelPricing(value) {
|
|
6
|
+
const pricing = asOptionalRecord(value);
|
|
7
|
+
const input = asFiniteNumberInRange(pricing?.prompt, { min: 0 });
|
|
8
|
+
const output = asFiniteNumberInRange(pricing?.completion, { min: 0 });
|
|
9
|
+
const cacheRead = pricing?.input_cache_read === void 0 ? 0 : asFiniteNumberInRange(pricing.input_cache_read, { min: 0 });
|
|
10
|
+
if (input === void 0 || output === void 0 || cacheRead === void 0) return;
|
|
11
|
+
return {
|
|
12
|
+
input,
|
|
13
|
+
output,
|
|
14
|
+
cacheRead,
|
|
15
|
+
cacheWrite: 0
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function parseChutesPricingCatalog(payload) {
|
|
19
|
+
return normalizeModelPricingCatalog(asOptionalRecord(payload)?.data, normalizeChutesModelPricing);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { normalizeChutesModelPricing, parseChutesPricingCatalog };
|
package/dist/provider-catalog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./models-
|
|
1
|
+
import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./models-DvzDAkE0.js";
|
|
2
2
|
//#region extensions/chutes/provider-catalog.ts
|
|
3
3
|
/** Builds the static Chutes provider catalog from bundled model metadata. */
|
|
4
4
|
function buildStaticChutesProvider() {
|
|
@@ -14,11 +14,10 @@ function buildStaticChutesProvider() {
|
|
|
14
14
|
* Accepts an optional access token (API key or OAuth access token) for authenticated discovery.
|
|
15
15
|
*/
|
|
16
16
|
async function buildChutesProvider(accessToken) {
|
|
17
|
-
const models = await discoverChutesModels(accessToken);
|
|
18
17
|
return {
|
|
19
18
|
baseUrl: CHUTES_BASE_URL,
|
|
20
19
|
api: "openai-completions",
|
|
21
|
-
models:
|
|
20
|
+
models: await discoverChutesModels(accessToken)
|
|
22
21
|
};
|
|
23
22
|
}
|
|
24
23
|
//#endregion
|
package/openclaw.plugin.json
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
},
|
|
6
6
|
"enabledByDefault": true,
|
|
7
7
|
"providers": ["chutes"],
|
|
8
|
+
"modelPricing": {
|
|
9
|
+
"providers": {
|
|
10
|
+
"chutes": { "chutes": { "provider": "chutes" } }
|
|
11
|
+
}
|
|
12
|
+
},
|
|
8
13
|
"providerEndpoints": [
|
|
9
14
|
{
|
|
10
15
|
"endpointClass": "chutes-native",
|
|
@@ -60,6 +65,9 @@
|
|
|
60
65
|
"properties": {}
|
|
61
66
|
},
|
|
62
67
|
"modelCatalog": {
|
|
68
|
+
"modelsDev": {
|
|
69
|
+
"chutes": "chutes"
|
|
70
|
+
},
|
|
63
71
|
"providers": {
|
|
64
72
|
"chutes": {
|
|
65
73
|
"baseUrl": "https://llm.chutes.ai/v1",
|
|
@@ -76,7 +84,7 @@
|
|
|
76
84
|
"cost": {
|
|
77
85
|
"input": 1,
|
|
78
86
|
"output": 1,
|
|
79
|
-
"cacheRead": 0.
|
|
87
|
+
"cacheRead": 0.09999999999999998,
|
|
80
88
|
"cacheWrite": 0
|
|
81
89
|
}
|
|
82
90
|
},
|
|
@@ -88,9 +96,9 @@
|
|
|
88
96
|
"contextWindow": 262144,
|
|
89
97
|
"maxTokens": 65535,
|
|
90
98
|
"cost": {
|
|
91
|
-
"input": 0.
|
|
92
|
-
"output": 3.
|
|
93
|
-
"cacheRead": 0.
|
|
99
|
+
"input": 0.58,
|
|
100
|
+
"output": 3.4,
|
|
101
|
+
"cacheRead": 0.05799999999999998,
|
|
94
102
|
"cacheWrite": 0
|
|
95
103
|
}
|
|
96
104
|
},
|
|
@@ -120,7 +128,7 @@
|
|
|
120
128
|
"cost": {
|
|
121
129
|
"input": 1.25,
|
|
122
130
|
"output": 3.95,
|
|
123
|
-
"cacheRead": 0.
|
|
131
|
+
"cacheRead": 0.12499999999999997,
|
|
124
132
|
"cacheWrite": 0
|
|
125
133
|
}
|
|
126
134
|
},
|
|
@@ -148,7 +156,7 @@
|
|
|
148
156
|
"cost": {
|
|
149
157
|
"input": 0.3,
|
|
150
158
|
"output": 2,
|
|
151
|
-
"cacheRead": 0.
|
|
159
|
+
"cacheRead": 0.029999999999999992,
|
|
152
160
|
"cacheWrite": 0
|
|
153
161
|
}
|
|
154
162
|
},
|
|
@@ -162,7 +170,7 @@
|
|
|
162
170
|
"cost": {
|
|
163
171
|
"input": 0.45,
|
|
164
172
|
"output": 3,
|
|
165
|
-
"cacheRead": 0.
|
|
173
|
+
"cacheRead": 0.04499999999999999,
|
|
166
174
|
"cacheWrite": 0
|
|
167
175
|
},
|
|
168
176
|
"status": "deprecated",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/chutes-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.2",
|
|
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.9.
|
|
21
|
+
"pluginApi": ">=2026.9.2"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.9.
|
|
24
|
+
"openclawVersion": "2026.9.2",
|
|
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.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|