@openclaw/llama-cpp-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.
Files changed (2) hide show
  1. package/dist/index.js +16 -14
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -3,10 +3,11 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
3
  import path from "node:path";
4
4
  import { getEmbeddingProvider } from "openclaw/plugin-sdk/embedding-providers";
5
5
  import os from "node:os";
6
- import { asBoolean, asOptionalRecord, asPositiveSafeInteger, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
6
+ import { asOptionalRecord, asPositiveSafeInteger, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { createHash, randomUUID } from "node:crypto";
8
8
  import fs from "node:fs/promises";
9
9
  import net from "node:net";
10
+ import { createAsyncLock } from "openclaw/plugin-sdk/async-lock-runtime";
10
11
  import { readProviderJsonResponse, readProviderTextResponse } from "openclaw/plugin-sdk/provider-http";
11
12
  import { fetchWithSsrFGuard, ssrfPolicyFromHttpBaseUrlAllowedOrigin } from "openclaw/plugin-sdk/ssrf-runtime";
12
13
  import { fetchConfiguredLocalOriginWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime-internal";
@@ -1114,9 +1115,9 @@ const modelPromises = /* @__PURE__ */ new Map();
1114
1115
  const resolvedModelArtifacts = /* @__PURE__ */ new Map();
1115
1116
  const presetState = {
1116
1117
  appliedRevisions: /* @__PURE__ */ new Map(),
1117
- desiredRevisions: /* @__PURE__ */ new Map(),
1118
- transition: Promise.resolve()
1118
+ desiredRevisions: /* @__PURE__ */ new Map()
1119
1119
  };
1120
+ const runPresetTransition = createAsyncLock();
1120
1121
  const LLAMA_CPP_PRESET_RELOAD_TIMEOUT_MS = 15e3;
1121
1122
  function parseHuggingFaceSource(source) {
1122
1123
  const [pathPart, revisionPart] = source.replace(/^(?:hf|huggingface):(?:\/\/)?/iu, "").split("#", 2);
@@ -1287,11 +1288,6 @@ async function writePreset(presetPath, contents) {
1287
1288
  await fs.rm(temporary, { force: true });
1288
1289
  }
1289
1290
  }
1290
- async function runPresetTransition(run) {
1291
- const pending = presetState.transition.catch(() => void 0).then(run);
1292
- presetState.transition = pending;
1293
- await pending;
1294
- }
1295
1291
  async function updatePreset(presetPath, params) {
1296
1292
  await runPresetTransition(async () => {
1297
1293
  const existing = await fs.readFile(presetPath, "utf8").catch((error) => {
@@ -1723,18 +1719,16 @@ function resolveInput(row, props) {
1723
1719
  }
1724
1720
  function buildCompat(props) {
1725
1721
  const caps = props?.chat_template_caps;
1726
- const supportsTools = asBoolean(caps?.supports_tool_calls) === true;
1727
- const supportsTypedContent = asBoolean(caps?.supports_typed_content) === true;
1728
1722
  return {
1729
1723
  supportsStore: false,
1730
1724
  supportsDeveloperRole: false,
1731
- supportsReasoningEffort: asBoolean(caps?.supports_reasoning_effort) === true,
1725
+ supportsReasoningEffort: caps?.supports_reasoning_effort === true,
1732
1726
  supportsTemperature: true,
1733
1727
  supportsUsageInStreaming: true,
1734
- supportsTools,
1728
+ supportsTools: caps?.supports_tool_calls === true,
1735
1729
  supportsStrictMode: false,
1736
1730
  supportsJsonSchemaResponseFormat: true,
1737
- requiresStringContent: !supportsTypedContent,
1731
+ requiresStringContent: caps?.supports_typed_content !== true,
1738
1732
  maxTokensField: "max_tokens"
1739
1733
  };
1740
1734
  }
@@ -2054,7 +2048,15 @@ async function runLlamaServerSetup(ctx) {
2054
2048
  message: `${LLAMA_CPP_PROVIDER_LABEL} URL`,
2055
2049
  initialValue: defaultOrigin,
2056
2050
  placeholder: LLAMA_SERVER_DEFAULT_ORIGIN,
2057
- validate: (value) => value?.trim() ? void 0 : "Required"
2051
+ validate: (value) => {
2052
+ if (!value?.trim()) return "Required";
2053
+ try {
2054
+ resolveLlamaServerEndpoint(value);
2055
+ return;
2056
+ } catch {
2057
+ return "Enter a valid HTTP or HTTPS URL without embedded credentials (e.g. http://localhost:8080).";
2058
+ }
2059
+ }
2058
2060
  }));
2059
2061
  const endpointChanged = Boolean(existing?.localService) || hasEndpointChanged(existing, endpoint.inferenceBaseUrl);
2060
2062
  const resolvedHeaders = endpointChanged ? void 0 : await resolveLlamaServerProviderHeaders({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/llama-cpp-provider",
3
- "version": "2026.9.8",
3
+ "version": "2026.10.1-beta.2",
4
4
  "description": "OpenClaw provider for managed and external llama.cpp servers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,10 +21,10 @@
21
21
  "minHostVersion": ">=2026.6.2"
22
22
  },
23
23
  "compat": {
24
- "pluginApi": ">=2026.9.8"
24
+ "pluginApi": ">=2026.10.1-beta.2"
25
25
  },
26
26
  "build": {
27
- "openclawVersion": "2026.9.8"
27
+ "openclawVersion": "2026.10.1-beta.2"
28
28
  },
29
29
  "release": {
30
30
  "bundleRuntimeDependencies": false,
@@ -36,7 +36,7 @@
36
36
  ]
37
37
  },
38
38
  "dependencies": {
39
- "@openclaw/fs-safe": "0.21.1"
39
+ "@openclaw/fs-safe": "0.23.0"
40
40
  },
41
41
  "files": [
42
42
  "dist/**",
@@ -46,7 +46,7 @@
46
46
  "assets/activity.svg"
47
47
  ],
48
48
  "peerDependencies": {
49
- "openclaw": ">=2026.9.8"
49
+ "openclaw": ">=2026.10.1-beta.2"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "openclaw": {