#lm task timeout

1 messages ยท Page 1 of 1 (latest)

torn sigil
#

I have this as part of a lobster workflow, I think it is timing out, how can I adjust timeout

let s = "";

process.stdin.on("data", c => {
s += c;
});

process.stdin.on("end", async () => {
try {
const args = JSON.parse(s);

args.provider = args.provider || "lmstudio";
args.model = args.model || "lmstudio/qwen/qwen3.6-35b-a3b";

const port = process.env.OPENCLAW_GATEWAY_PORT || "18789";
const baseUrl = process.env.OPENCLAW_GATEWAY_URL || `http://127.0.0.1:${port}`;
const token = process.env.OPENCLAW_GATEWAY_TOKEN || process.env.SHARED_GATEWAY_TOKEN || "";
const url = `${baseUrl.replace(/\/$/, "")}/tools/invoke`;

const headers = { "content-type": "application/json" };
if (token) headers.authorization = `Bearer ${token}`;

const payload = {
  tool: "llm-task",
  action: "json",
  sessionKey: process.env.OPENCLAW_SESSION_KEY || "agent:sql:main",
  args
};

const res = await fetch(url, {
  method: "POST",
  headers,
  body: JSON.stringify(payload)
});
jolly belfryBOT
# torn sigil I have this as part of a lobster workflow, I think it is timing out, how can I a...

For llm-task, the timeout knob is timeoutMs in milliseconds. The plugin default is 30000, so for a slow LM Studio model you can set it per call before building payload:

args.timeoutMs = args.timeoutMs || Number(process.env.LLM_TASK_TIMEOUT_MS || 180000);

Since your payload passes args through to llm-task, that becomes:

const payload = {
  tool: "llm-task",
  action: "json",
  sessionKey: process.env.OPENCLAW_SESSION_KEY || "agent:sql:main",
  args: {
    ...args,
    timeoutMs: args.timeoutMs || 180000
jolly belfryBOT
jolly belfryBOT
# torn sigil I have this as part of a lobster workflow, I think it is timing out, how can I a...
      }
    }
  }
}

For LM Studio specifically, there is a second timeout that may bite first: the model provider HTTP timeout. Set models.providers.lmstudio.timeoutSeconds too, e.g. 300, because that covers connect/headers/body streaming/model idle handling for local OpenAI-compatible providers.

Docs:
https://docs.openclaw.ai/tools/llm-task
https://docs.openclaw.ai/concepts/model-providers

If it still times out after that, can you share openclaw --version and the exact error text from the workflow/log? That will tell us whether it is the llm-task run timeout, provider HTTP timeout, or an outer Lobster/workflow timeout.