@openclaw/llama-cpp-provider 2026.7.2-beta.7 → 2026.8.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.
- package/README.md +17 -18
- package/dist/doctor-contract-api.js +55 -0
- package/dist/index.js +796 -624
- package/dist/llama-server-assets-BEF3s_UC.js +181 -0
- package/openclaw.plugin.json +7 -3
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# @openclaw/llama-cpp-provider
|
|
2
2
|
|
|
3
|
-
Official llama.cpp
|
|
3
|
+
Official managed llama.cpp provider for OpenClaw GGUF chat and embeddings.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
`
|
|
5
|
+
The plugin installs a pinned, integrity-verified `llama-server` and configures
|
|
6
|
+
OpenClaw's existing `localService` supervisor. Model traffic uses the normal
|
|
7
|
+
OpenAI-compatible chat and embedding transports.
|
|
7
8
|
|
|
8
9
|
## Install
|
|
9
10
|
|
|
@@ -11,30 +12,28 @@ This plugin runs local GGUF chat and embedding models in-process through
|
|
|
11
12
|
openclaw plugins install @openclaw/llama-cpp-provider
|
|
12
13
|
```
|
|
13
14
|
|
|
14
|
-
Restart the Gateway after installing or updating the plugin
|
|
15
|
-
|
|
15
|
+
Restart the Gateway after installing or updating the plugin, then choose
|
|
16
|
+
**llama.cpp** once during interactive onboarding or configuration.
|
|
16
17
|
|
|
17
18
|
## Configure text inference
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
The
|
|
22
|
-
|
|
20
|
+
After explicit consent, OpenClaw installs the matching server build and
|
|
21
|
+
downloads Gemma 4 E4B IT Q4_K_M (approximately 5.0 GB) plus EmbeddingGemma
|
|
22
|
+
(approximately 0.3 GB). The default chat download is offered only on machines
|
|
23
|
+
with at least 16 GiB of RAM.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
remain available on any machine.
|
|
25
|
+
Custom GGUF models remain supported through `params.modelPath`. Rerun llama.cpp
|
|
26
|
+
setup after changing the model so OpenClaw can verify the file and regenerate
|
|
27
|
+
the managed router preset.
|
|
28
28
|
|
|
29
29
|
See the [llama.cpp provider guide](https://docs.openclaw.ai/plugins/llama-cpp)
|
|
30
|
-
for custom GGUF
|
|
30
|
+
for platform requirements, custom GGUF configuration, diagnostics, and repair.
|
|
31
31
|
|
|
32
32
|
## Configure embeddings
|
|
33
33
|
|
|
34
|
-
Set `memory.search.provider` to `local`.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Face model URI, or HTTPS model URL.
|
|
34
|
+
Set `memory.search.provider` to `local`. The plugin preserves the historical
|
|
35
|
+
`local` embedding provider and index identity while serving requests through
|
|
36
|
+
the managed server's `/v1/embeddings` endpoint.
|
|
38
37
|
|
|
39
38
|
## Package
|
|
40
39
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { C as buildLlamaCppProviderConfig, a as selectLlamaServerAsset, b as LLAMA_CPP_DEFAULT_PORT, i as resolveManagedLlamaServerPaths, x as LLAMA_CPP_PROVIDER_ID } from "./llama-server-assets-BEF3s_UC.js";
|
|
2
|
+
//#region extensions/llama-cpp/doctor-contract-api.ts
|
|
3
|
+
const LEGACY_BASE_URL = "local://llama-cpp";
|
|
4
|
+
const PROVIDER_PATH = "models.providers.llama-cpp";
|
|
5
|
+
const legacyConfigRules = [{
|
|
6
|
+
path: [
|
|
7
|
+
"models",
|
|
8
|
+
"providers",
|
|
9
|
+
LLAMA_CPP_PROVIDER_ID,
|
|
10
|
+
"baseUrl"
|
|
11
|
+
],
|
|
12
|
+
message: `${PROVIDER_PATH}.baseUrl uses the retired in-process runtime. Run "openclaw doctor --fix", then rerun interactive llama.cpp setup.`,
|
|
13
|
+
match: (value) => value === LEGACY_BASE_URL
|
|
14
|
+
}];
|
|
15
|
+
function normalizeCompatibilityConfig({ cfg }) {
|
|
16
|
+
const provider = cfg.models?.providers?.[LLAMA_CPP_PROVIDER_ID];
|
|
17
|
+
if (provider?.baseUrl !== LEGACY_BASE_URL) return {
|
|
18
|
+
config: cfg,
|
|
19
|
+
changes: []
|
|
20
|
+
};
|
|
21
|
+
const { command, presetPath } = resolveManagedLlamaServerPaths(selectLlamaServerAsset());
|
|
22
|
+
const rootUrl = `http://127.0.0.1:${LLAMA_CPP_DEFAULT_PORT}`;
|
|
23
|
+
const managed = {
|
|
24
|
+
command,
|
|
25
|
+
baseUrl: `${rootUrl}/v1`,
|
|
26
|
+
healthUrl: `${rootUrl}/health`,
|
|
27
|
+
args: [
|
|
28
|
+
"--host",
|
|
29
|
+
"127.0.0.1",
|
|
30
|
+
"--port",
|
|
31
|
+
String(LLAMA_CPP_DEFAULT_PORT),
|
|
32
|
+
"--models-preset",
|
|
33
|
+
presetPath,
|
|
34
|
+
"--models-max",
|
|
35
|
+
"2",
|
|
36
|
+
"--metrics",
|
|
37
|
+
"--no-ui"
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
config: {
|
|
42
|
+
...cfg,
|
|
43
|
+
models: {
|
|
44
|
+
...cfg.models,
|
|
45
|
+
providers: {
|
|
46
|
+
...cfg.models?.providers,
|
|
47
|
+
[LLAMA_CPP_PROVIDER_ID]: buildLlamaCppProviderConfig(provider, managed)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
changes: [`${PROVIDER_PATH}: migrated from the retired in-process runtime to managed llama-server; rerun interactive llama.cpp setup to verify/install runtime artifacts`]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { legacyConfigRules, normalizeCompatibilityConfig };
|