@openclaw/llama-cpp-provider 2026.9.8 → 2026.9.33
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/index.js +13 -11
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -15,13 +15,14 @@ import fs$1, { constants } from "node:fs";
|
|
|
15
15
|
import { sha256File } from "@openclaw/fs-safe/durability";
|
|
16
16
|
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
17
17
|
import { ARCHIVE_LIMIT_ERROR_CODE, ArchiveLimitError, extractArchive } from "openclaw/plugin-sdk/archive";
|
|
18
|
-
import { CUSTOM_LOCAL_AUTH_MARKER, applyAuthProfileConfig, buildApiKeyCredential, ensureApiKeyFromEnvOrPrompt, hasConfiguredSecretInput, isNonSecretApiKeyMarker, normalizeOptionalSecretInput
|
|
18
|
+
import { CUSTOM_LOCAL_AUTH_MARKER, applyAuthProfileConfig, buildApiKeyCredential, ensureApiKeyFromEnvOrPrompt, hasConfiguredSecretInput, isNonSecretApiKeyMarker, normalizeOptionalSecretInput } from "openclaw/plugin-sdk/provider-auth";
|
|
19
19
|
import { buildProviderToolCompatFamilyHooks } from "openclaw/plugin-sdk/provider-tools";
|
|
20
20
|
import { removeAuthProfileConfig, removeProviderAuthProfilesWithLock, resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime";
|
|
21
21
|
import { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime";
|
|
22
22
|
import { LiveModelCatalogHttpError, runLiveProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
|
|
23
23
|
import { getCachedLiveCatalogValue } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
24
24
|
import { SELF_HOSTED_DEFAULT_CONTEXT_WINDOW, SELF_HOSTED_DEFAULT_COST, SELF_HOSTED_DEFAULT_MAX_TOKENS, applyProviderDefaultModel, discoverOpenAICompatibleLocalModels } from "openclaw/plugin-sdk/provider-setup";
|
|
25
|
+
import { upsertAuthProfileWithLockOrThrow } from "openclaw/plugin-sdk/provider-auth-api-key";
|
|
25
26
|
import { selectPreferredLocalModelId } from "openclaw/plugin-sdk/provider-model-shared";
|
|
26
27
|
import { streamSimple } from "openclaw/plugin-sdk/llm";
|
|
27
28
|
import { setQwenChatTemplateThinking } from "openclaw/plugin-sdk/provider-stream-shared";
|
|
@@ -2219,7 +2220,7 @@ async function configureLlamaServerNonInteractive(ctx) {
|
|
|
2219
2220
|
resolved: validated.persistence.credential
|
|
2220
2221
|
});
|
|
2221
2222
|
if (!credential) return null;
|
|
2222
|
-
await
|
|
2223
|
+
await upsertAuthProfileWithLockOrThrow({
|
|
2223
2224
|
profileId: LLAMA_CPP_DEFAULT_PROFILE_ID,
|
|
2224
2225
|
credential,
|
|
2225
2226
|
agentDir: ctx.agentDir
|
|
@@ -2279,19 +2280,20 @@ function formatDownloadProgress(label, params) {
|
|
|
2279
2280
|
function describeEmbeddingDownload(isDefault) {
|
|
2280
2281
|
return isDefault ? "the local embedding model (about 0.3 GB)" : "your configured local embedding model";
|
|
2281
2282
|
}
|
|
2282
|
-
function
|
|
2283
|
-
const model = config.agents?.defaults?.model;
|
|
2284
|
-
return typeof model === "string" ? model : model?.primary;
|
|
2285
|
-
}
|
|
2286
|
-
function configuredCandidates(config, scope) {
|
|
2283
|
+
async function configuredCandidates(config, scope) {
|
|
2287
2284
|
const existing = config.models?.providers?.[LLAMA_CPP_PROVIDER_ID];
|
|
2288
2285
|
const managedExisting = existing?.localService ? existing : void 0;
|
|
2289
2286
|
const provider = buildLlamaCppProviderConfig({
|
|
2290
2287
|
existing: managedExisting,
|
|
2291
2288
|
...managedExisting && scope === "detection" ? { modelInventory: managedExisting.models } : {}
|
|
2292
2289
|
});
|
|
2293
|
-
const
|
|
2294
|
-
const
|
|
2290
|
+
const { resolveDefaultModelForAgent } = await import("openclaw/plugin-sdk/agent-runtime");
|
|
2291
|
+
const primary = resolveDefaultModelForAgent({
|
|
2292
|
+
cfg: config,
|
|
2293
|
+
allowManifestNormalization: false,
|
|
2294
|
+
allowPluginNormalization: false
|
|
2295
|
+
});
|
|
2296
|
+
const primaryId = primary.provider === "llama-cpp" ? primary.model : void 0;
|
|
2295
2297
|
return provider.models.map((model) => ({
|
|
2296
2298
|
model,
|
|
2297
2299
|
provider
|
|
@@ -2344,7 +2346,7 @@ async function detectLlamaCppSetup(ctx) {
|
|
|
2344
2346
|
const command = existing?.localService?.command;
|
|
2345
2347
|
const presetPath = existing?.localService?.args?.find((_, index, args) => args[index - 1] === "--models-preset");
|
|
2346
2348
|
if (!command || !path.isAbsolute(command) || !await isFile(command) || !presetPath || !await isFile(presetPath)) return null;
|
|
2347
|
-
for (const candidate of configuredCandidates(ctx.config, "detection")) if (await resolveCachedCandidate(candidate, ctx.signal)) return {
|
|
2349
|
+
for (const candidate of await configuredCandidates(ctx.config, "detection")) if (await resolveCachedCandidate(candidate, ctx.signal)) return {
|
|
2348
2350
|
modelRef: `${LLAMA_CPP_PROVIDER_ID}/${candidate.model.id}`,
|
|
2349
2351
|
detail: "Managed llama.cpp server ready"
|
|
2350
2352
|
};
|
|
@@ -2479,7 +2481,7 @@ async function runLlamaCppSetup(ctx) {
|
|
|
2479
2481
|
asset = selectLlamaServerAsset(hardware.platform, hardware.arch, { kind: "cpu" });
|
|
2480
2482
|
runtimeNote = `${error instanceof Error ? error.message : String(error)} This recommendation uses CPU execution.`;
|
|
2481
2483
|
}
|
|
2482
|
-
const plan = await resolveSetupPlan(ctx, configuredCandidates(ctx.config, "setup"), embeddingModel.isDefault, embeddingSetup.localMemoryIntent, hardware, asset, runtimeNote);
|
|
2484
|
+
const plan = await resolveSetupPlan(ctx, await configuredCandidates(ctx.config, "setup"), embeddingModel.isDefault, embeddingSetup.localMemoryIntent, hardware, asset, runtimeNote);
|
|
2483
2485
|
if (!plan) return { profiles: [] };
|
|
2484
2486
|
const progress = ctx.prompter.progress("Preparing managed llama.cpp server…");
|
|
2485
2487
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/llama-cpp-provider",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.33",
|
|
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.
|
|
24
|
+
"pluginApi": ">=2026.9.33"
|
|
25
25
|
},
|
|
26
26
|
"build": {
|
|
27
|
-
"openclawVersion": "2026.9.
|
|
27
|
+
"openclawVersion": "2026.9.33"
|
|
28
28
|
},
|
|
29
29
|
"release": {
|
|
30
30
|
"bundleRuntimeDependencies": false,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"assets/activity.svg"
|
|
47
47
|
],
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"openclaw": ">=2026.9.
|
|
49
|
+
"openclaw": ">=2026.9.33"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"openclaw": {
|