akemon 0.1.71 → 0.1.72
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/server.js +4 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -722,6 +722,7 @@ const LLM_ENGINES = new Set(["claude", "codex", "opencode", "gemini", "local"]);
|
|
|
722
722
|
// Local engine: tool call loop over OpenAI-compatible API (Ollama, llama.cpp)
|
|
723
723
|
// ---------------------------------------------------------------------------
|
|
724
724
|
const LOCAL_API_URL = process.env.AKEMON_LOCAL_URL || "http://localhost:11434/v1";
|
|
725
|
+
const LOCAL_API_KEY = process.env.AKEMON_LOCAL_KEY || "";
|
|
725
726
|
const LOCAL_MAX_ROUNDS = 20;
|
|
726
727
|
const LOCAL_TOOLS = [
|
|
727
728
|
{
|
|
@@ -833,7 +834,9 @@ async function runLocalEngine(task, model, workdir) {
|
|
|
833
834
|
try {
|
|
834
835
|
const res = await fetch(apiUrl, {
|
|
835
836
|
method: "POST",
|
|
836
|
-
headers:
|
|
837
|
+
headers: LOCAL_API_KEY
|
|
838
|
+
? { "Content-Type": "application/json", "Authorization": `Bearer ${LOCAL_API_KEY}` }
|
|
839
|
+
: { "Content-Type": "application/json" },
|
|
837
840
|
body: JSON.stringify(body),
|
|
838
841
|
signal: AbortSignal.timeout(300_000),
|
|
839
842
|
});
|