@openclaw/llama-cpp-provider 2026.10.5-beta.2 → 2026.10.5-beta.3

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 +13 -11
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -18,12 +18,13 @@ import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
18
18
  import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
19
19
  import { ARCHIVE_LIMIT_ERROR_CODE, ArchiveLimitError, extractArchive } from "openclaw/plugin-sdk/archive";
20
20
  import { createSubsystemLogger } from "openclaw/plugin-sdk/logging-core";
21
- import { CUSTOM_LOCAL_AUTH_MARKER, applyAuthProfileConfig, buildApiKeyCredential, ensureApiKeyFromEnvOrPrompt, hasConfiguredSecretInput, isNonSecretApiKeyMarker, normalizeOptionalSecretInput, upsertAuthProfileWithLock } from "openclaw/plugin-sdk/provider-auth";
21
+ import { CUSTOM_LOCAL_AUTH_MARKER, applyAuthProfileConfig, buildApiKeyCredential, ensureApiKeyFromEnvOrPrompt, hasConfiguredSecretInput, isNonSecretApiKeyMarker, normalizeOptionalSecretInput } from "openclaw/plugin-sdk/provider-auth";
22
22
  import { buildProviderToolCompatFamilyHooks } from "openclaw/plugin-sdk/provider-tools";
23
23
  import { removeAuthProfileConfig, removeProviderAuthProfilesWithLock, resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime";
24
24
  import { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime";
25
25
  import { LiveModelCatalogHttpError, runLiveProviderCatalog } from "openclaw/plugin-sdk/provider-catalog-live-runtime";
26
26
  import { SELF_HOSTED_DEFAULT_CONTEXT_WINDOW, SELF_HOSTED_DEFAULT_COST, SELF_HOSTED_DEFAULT_MAX_TOKENS, applyProviderDefaultModel, discoverOpenAICompatibleLocalModels } from "openclaw/plugin-sdk/provider-setup";
27
+ import { upsertAuthProfileWithLockOrThrow } from "openclaw/plugin-sdk/provider-auth-api-key";
27
28
  import { selectPreferredLocalModelId } from "openclaw/plugin-sdk/provider-model-shared";
28
29
  import { streamSimple } from "openclaw/plugin-sdk/llm";
29
30
  import { setQwenChatTemplateThinking } from "openclaw/plugin-sdk/provider-stream-shared";
@@ -2344,7 +2345,7 @@ async function configureLlamaServerNonInteractive(ctx) {
2344
2345
  resolved: validated.persistence.credential
2345
2346
  });
2346
2347
  if (!credential) return null;
2347
- await upsertAuthProfileWithLock({
2348
+ await upsertAuthProfileWithLockOrThrow({
2348
2349
  profileId: LLAMA_CPP_DEFAULT_PROFILE_ID,
2349
2350
  credential,
2350
2351
  agentDir: ctx.agentDir
@@ -2404,15 +2405,16 @@ function formatDownloadProgress(label, params) {
2404
2405
  function describeEmbeddingDownload(isDefault) {
2405
2406
  return isDefault ? "the local embedding model (about 0.3 GB)" : "your configured local embedding model";
2406
2407
  }
2407
- function readPrimaryModel(config) {
2408
- const model = config.agents?.defaults?.model;
2409
- return typeof model === "string" ? model : model?.primary;
2410
- }
2411
- function configuredCandidates(config) {
2408
+ async function configuredCandidates(config) {
2412
2409
  const provider = config.models?.providers?.[LLAMA_CPP_PROVIDER_ID];
2413
2410
  if (!provider?.localService) return [];
2414
- const primary = readPrimaryModel(config);
2415
- const primaryId = primary?.startsWith(`llama-cpp/`) ? primary.slice(LLAMA_CPP_PROVIDER_ID.length + 1) : void 0;
2411
+ const { resolveDefaultModelForAgent } = await import("openclaw/plugin-sdk/agent-runtime");
2412
+ const primary = resolveDefaultModelForAgent({
2413
+ cfg: config,
2414
+ allowManifestNormalization: false,
2415
+ allowPluginNormalization: false
2416
+ });
2417
+ const primaryId = primary.provider === "llama-cpp" ? primary.model : void 0;
2416
2418
  return provider.models.map((model) => ({
2417
2419
  model,
2418
2420
  provider
@@ -2465,7 +2467,7 @@ async function detectLlamaCppSetup(ctx) {
2465
2467
  const command = existing?.localService?.command;
2466
2468
  const presetPath = existing?.localService?.args?.find((_, index, args) => args[index - 1] === "--models-preset");
2467
2469
  if (!command || !path.isAbsolute(command) || !await isFile(command) || !presetPath || !await isFile(presetPath)) return null;
2468
- for (const candidate of configuredCandidates(ctx.config)) if (await resolveCachedCandidate(candidate, ctx.signal)) return {
2470
+ for (const candidate of await configuredCandidates(ctx.config)) if (await resolveCachedCandidate(candidate, ctx.signal)) return {
2469
2471
  modelRef: `${LLAMA_CPP_PROVIDER_ID}/${candidate.model.id}`,
2470
2472
  detail: "Managed llama.cpp server ready"
2471
2473
  };
@@ -2631,7 +2633,7 @@ async function runLlamaCppSetup(ctx) {
2631
2633
  asset = selectLlamaServerAsset(hardware.platform, hardware.arch, { kind: "cpu" });
2632
2634
  runtimeNote = `${error instanceof Error ? error.message : String(error)} This recommendation uses CPU execution.`;
2633
2635
  }
2634
- const plan = await resolveSetupPlan(ctx, configuredCandidates(ctx.config), embeddingModel.isDefault, embeddingSetup.localMemoryIntent, hardware, asset, runtimeNote);
2636
+ const plan = await resolveSetupPlan(ctx, await configuredCandidates(ctx.config), embeddingModel.isDefault, embeddingSetup.localMemoryIntent, hardware, asset, runtimeNote);
2635
2637
  if (!plan) return { profiles: [] };
2636
2638
  const progress = ctx.prompter.progress("Preparing managed llama.cpp server…");
2637
2639
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/llama-cpp-provider",
3
- "version": "2026.10.5-beta.2",
3
+ "version": "2026.10.5-beta.3",
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.10.5-beta.2"
24
+ "pluginApi": ">=2026.10.5-beta.3"
25
25
  },
26
26
  "build": {
27
- "openclawVersion": "2026.10.5-beta.2"
27
+ "openclawVersion": "2026.10.5-beta.3"
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.10.5-beta.2"
49
+ "openclaw": ">=2026.10.5-beta.3"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "openclaw": {