@openclaw/chutes-provider 2026.9.8 → 2026.10.1-beta.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.
@@ -168,11 +168,7 @@ var openclaw_plugin_default = {
168
168
  };
169
169
  //#endregion
170
170
  //#region extensions/chutes/models.ts
171
- /**
172
- * Chutes model catalog, static model definitions, and dynamic model discovery.
173
- */
174
171
  const CHUTES_MANIFEST_CATALOG = openclaw_plugin_default.modelCatalog.providers.chutes;
175
- /** Base URL for Chutes OpenAI-compatible inference. */
176
172
  const CHUTES_BASE_URL = CHUTES_MANIFEST_CATALOG.baseUrl;
177
173
  const CHUTES_DEFAULT_CONTEXT_WINDOW = 128e3;
178
174
  const CHUTES_DEFAULT_MAX_TOKENS = 4096;
@@ -185,7 +181,6 @@ function decorateChutesModelDefinition(model) {
185
181
  }
186
182
  };
187
183
  }
188
- /** Bundled fallback Chutes model catalog, normalized from the plugin manifest. */
189
184
  const CHUTES_MODEL_CATALOG = buildManifestModelProviderConfig({
190
185
  providerId: "chutes",
191
186
  catalog: CHUTES_MANIFEST_CATALOG
@@ -232,10 +227,6 @@ async function discoverChutesModels(accessToken, options = {}) {
232
227
  discoveryApiKey: normalizeOptionalString(accessToken),
233
228
  timeoutMs: 1e4,
234
229
  ttlMs: CACHE_TTL,
235
- buildRequestHeaders: ({ discoveryApiKey }) => ({
236
- Accept: "application/json",
237
- ...discoveryApiKey ? { Authorization: `Bearer ${discoveryApiKey}` } : {}
238
- }),
239
230
  policy: ssrfPolicyFromHttpBaseUrlAllowedHostname(CHUTES_BASE_URL),
240
231
  auditContext: "chutes-model-discovery",
241
232
  fetchGuard: (params) => fetchWithSsrFGuard(withTrustedEnvProxyGuardedFetchMode(params)),
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 "./.setup/models-mjZNwTpp.mjs";
1
+ import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./.setup/models-DUGqZYGQ.mjs";
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 };
package/dist/index.js CHANGED
@@ -7,9 +7,6 @@ import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-aut
7
7
  import { runLiveProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
8
8
  import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  //#region extensions/chutes/index.ts
10
- /**
11
- * Chutes provider plugin entrypoint with OAuth and API-key auth methods.
12
- */
13
10
  const PROVIDER_ID = "chutes";
14
11
  async function runChutesOAuth(ctx) {
15
12
  const isRemote = ctx.isRemote;
@@ -105,7 +102,7 @@ var chutes_default = definePluginEntry({
105
102
  groupLabel: "Chutes",
106
103
  groupHint: "OAuth + API key"
107
104
  },
108
- run: async (ctx) => await runChutesOAuth(ctx)
105
+ run: runChutesOAuth
109
106
  }, createProviderApiKeyAuthMethod({
110
107
  providerId: PROVIDER_ID,
111
108
  methodId: "api-key",
@@ -119,7 +116,7 @@ var chutes_default = definePluginEntry({
119
116
  noteMessage: ["Chutes provides access to leading open-source models including Llama, DeepSeek, and more.", "Get your API key at: https://chutes.ai/settings/api-keys"].join("\n"),
120
117
  defaultModel: CHUTES_DEFAULT_MODEL_REF,
121
118
  expectedProviders: ["chutes"],
122
- applyConfig: (cfg) => applyChutesApiKeyConfig(cfg),
119
+ applyConfig: applyChutesApiKeyConfig,
123
120
  wizard: {
124
121
  choiceId: "chutes-api-key",
125
122
  choiceLabel: "Chutes API key",
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 "./.setup/models-mjZNwTpp.mjs";
1
+ import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./.setup/models-DUGqZYGQ.mjs";
2
2
  export { CHUTES_BASE_URL, CHUTES_MODEL_CATALOG, discoverChutesModels };
package/dist/oauth.js CHANGED
@@ -6,9 +6,6 @@ import { parseOAuthCallbackInput, waitForLocalOAuthCallback } from "openclaw/plu
6
6
  import { assertOkOrThrowProviderError, readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
7
7
  import { buildOAuthRequestSignal } from "openclaw/plugin-sdk/provider-oauth-runtime";
8
8
  //#region extensions/chutes/oauth.ts
9
- /**
10
- * Chutes OAuth PKCE login flow.
11
- */
12
9
  const CHUTES_AUTHORIZE_ENDPOINT = "https://api.chutes.ai/idp/authorize";
13
10
  const CHUTES_TOKEN_ENDPOINT = "https://api.chutes.ai/idp/token";
14
11
  const CHUTES_USERINFO_ENDPOINT = "https://api.chutes.ai/idp/userinfo";
@@ -16,7 +13,7 @@ const CHUTES_OAUTH_REQUEST_TIMEOUT_MS = 3e4;
16
13
  function parseRedirectUri(redirectUri) {
17
14
  const url = new URL(redirectUri);
18
15
  if (url.protocol !== "http:") throw new Error(`Chutes OAuth redirect URI must be http:// (got ${redirectUri})`);
19
- const hostname = url.hostname || "127.0.0.1";
16
+ const hostname = url.hostname === "[::1]" ? "::1" : url.hostname || "127.0.0.1";
20
17
  if (hostname !== "localhost" && hostname !== "127.0.0.1" && hostname !== "::1") throw new Error(`Chutes OAuth redirect hostname must be loopback (got ${hostname}). Use http://127.0.0.1:<port>/...`);
21
18
  return {
22
19
  hostname,
@@ -33,18 +30,6 @@ function parseManualOAuthInput(input, expectedState) {
33
30
  if (parsed.state !== expectedState) throw new Error("OAuth state mismatch - possible CSRF attack. Please retry login.");
34
31
  return parsed;
35
32
  }
36
- function buildAuthorizeUrl(params) {
37
- const qs = new URLSearchParams({
38
- client_id: params.clientId,
39
- redirect_uri: params.redirectUri,
40
- response_type: "code",
41
- scope: params.scopes.join(" "),
42
- state: params.state,
43
- code_challenge: params.challenge,
44
- code_challenge_method: "S256"
45
- });
46
- return `${CHUTES_AUTHORIZE_ENDPOINT}?${qs.toString()}`;
47
- }
48
33
  function resolveChutesExpiresAt(value, now) {
49
34
  return resolveExpiresAtMsFromDurationSeconds(value, {
50
35
  nowMs: now,
@@ -159,13 +144,16 @@ async function loginChutes(params) {
159
144
  const { verifier, challenge } = generatePkceVerifierChallenge();
160
145
  const state = params.createState?.() ?? randomBytes(16).toString("hex");
161
146
  const timeoutMs = params.timeoutMs ?? 18e4;
162
- const url = buildAuthorizeUrl({
163
- clientId: params.app.clientId,
164
- redirectUri: params.app.redirectUri,
165
- scopes: params.app.scopes,
147
+ const query = new URLSearchParams({
148
+ client_id: params.app.clientId,
149
+ redirect_uri: params.app.redirectUri,
150
+ response_type: "code",
151
+ scope: params.app.scopes.join(" "),
166
152
  state,
167
- challenge
153
+ code_challenge: challenge,
154
+ code_challenge_method: "S256"
168
155
  });
156
+ const url = `${CHUTES_AUTHORIZE_ENDPOINT}?${query}`;
169
157
  const promptForCode = async () => parseManualOAuthInput(await params.onPrompt({
170
158
  message: "Paste the redirect URL",
171
159
  placeholder: `${params.app.redirectUri}?code=...&state=...`
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 "./.setup/models-mjZNwTpp.mjs";
1
+ import { i as openclaw_plugin_default, n as CHUTES_MODEL_CATALOG, t as CHUTES_BASE_URL } from "./.setup/models-DUGqZYGQ.mjs";
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
@@ -1,6 +1,5 @@
1
- import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./.setup/models-mjZNwTpp.mjs";
1
+ import { n as CHUTES_MODEL_CATALOG, r as discoverChutesModels, t as CHUTES_BASE_URL } from "./.setup/models-DUGqZYGQ.mjs";
2
2
  //#region extensions/chutes/provider-catalog.ts
3
- /** Builds the static Chutes provider catalog from bundled model metadata. */
4
3
  function buildStaticChutesProvider() {
5
4
  return {
6
5
  baseUrl: CHUTES_BASE_URL,
@@ -8,10 +7,6 @@ function buildStaticChutesProvider() {
8
7
  models: structuredClone(CHUTES_MODEL_CATALOG)
9
8
  };
10
9
  }
11
- /**
12
- * Build the Chutes provider with dynamic model discovery.
13
- * Accepts an optional access token (API key or OAuth access token) for authenticated discovery.
14
- */
15
10
  async function buildChutesProvider(accessToken, options = {}) {
16
11
  return {
17
12
  baseUrl: CHUTES_BASE_URL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/chutes-provider",
3
- "version": "2026.9.8",
3
+ "version": "2026.10.1-beta.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.8"
21
+ "pluginApi": ">=2026.10.1-beta.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.9.8",
24
+ "openclawVersion": "2026.10.1-beta.2",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -40,7 +40,7 @@
40
40
  "assets/activity.svg"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.9.8"
43
+ "openclaw": ">=2026.10.1-beta.2"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {