@elvatis_com/openclaw-cli-bridge-elvatis 2.6.0 → 2.6.1

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > OpenClaw plugin that bridges locally installed AI CLIs (Codex, Gemini, Claude Code, OpenCode, Pi) as model providers — with slash commands for instant model switching, restore, health testing, and model listing.
4
4
 
5
- **Current version:** `2.6.0`
5
+ **Current version:** `2.6.1`
6
6
 
7
7
  ---
8
8
 
@@ -296,6 +296,26 @@ In `~/.openclaw/openclaw.json` → `plugins.entries.openclaw-cli-bridge-elvatis.
296
296
  }
297
297
  ```
298
298
 
299
+ ### Required: OpenClaw LLM idle timeout
300
+
301
+ **Important:** OpenClaw's embedded agent has a default **LLM idle timeout of 60 seconds**. CLI subprocesses (especially Claude/Gemini with large prompts) often need longer than 60s before producing the first token. Without this setting, you'll see `exit 143` / `status:408` / `FailoverError: LLM request timed out.`
302
+
303
+ Add to `~/.openclaw/openclaw.json`:
304
+
305
+ ```json5
306
+ {
307
+ "agents": {
308
+ "defaults": {
309
+ "llm": {
310
+ "idleTimeoutSeconds": 300 // 5 min — must be >= longest per-model timeout
311
+ }
312
+ }
313
+ }
314
+ }
315
+ ```
316
+
317
+ > **Note:** Cron-triggered agents automatically have `idleTimeoutSeconds: 0` (disabled) in OpenClaw, so crons are not affected.
318
+
299
319
  ---
300
320
 
301
321
  ## Model Allowlist
@@ -386,6 +406,11 @@ npm run ci # lint + typecheck + test
386
406
 
387
407
  ## Changelog
388
408
 
409
+ ### v2.6.1
410
+ - **fix:** Root cause of Exit 143 / 408 timeouts identified — OpenClaw's `agents.defaults.llm.idleTimeoutSeconds` defaults to 60s, which is too short for CLI subprocesses that need time before producing the first token
411
+ - **feat:** Startup warning when `idleTimeoutSeconds` is not set or < 120s — tells you exactly what to add to `openclaw.json`
412
+ - **docs:** Added "Required: OpenClaw LLM idle timeout" section to README with recommended config
413
+
389
414
  ### v2.6.0
390
415
  - **feat:** Provider session registry (`src/provider-sessions.ts`) — persistent sessions that survive across runs. When a CLI run times out, the session is preserved (not deleted) so follow-up runs can resume in the same context. Sessions are stored in `~/.openclaw/cli-bridge/sessions.json`.
391
416
  - **feat:** Centralized config module (`src/config.ts`) — all magic numbers, timeouts, paths, ports, and model defaults extracted into one file. No more scattered hardcoded values.
package/SKILL.md CHANGED
@@ -68,4 +68,4 @@ On gateway restart, if any session has expired, a **WhatsApp alert** is sent aut
68
68
 
69
69
  See `README.md` for full configuration reference and architecture diagram.
70
70
 
71
- **Version:** 2.6.0
71
+ **Version:** 2.6.1
package/index.ts CHANGED
@@ -1406,6 +1406,27 @@ const plugin = {
1406
1406
  api.logger.info(
1407
1407
  `[cli-bridge] proxy ready on :${port} — vllm/cli-gemini/* and vllm/cli-claude/* available`
1408
1408
  );
1409
+
1410
+ // Warn if OpenClaw's LLM idle timeout is too low for CLI models.
1411
+ // CLI subprocesses (especially with large prompts) need time before producing
1412
+ // the first token. The default 60s causes premature 408 timeouts.
1413
+ const llmIdleTimeout = (api.pluginConfig as Record<string, unknown>)?._resolvedAgentDefaults?.llm?.idleTimeoutSeconds;
1414
+ if (llmIdleTimeout === undefined) {
1415
+ // Can't read the resolved config — check the raw file instead
1416
+ try {
1417
+ const ocConfig = JSON.parse(readFileSync(join(OPENCLAW_DIR, "openclaw.json"), "utf-8")) as Record<string, unknown>;
1418
+ const agentDefaults = (ocConfig?.agents as Record<string, unknown>)?.defaults as Record<string, unknown> | undefined;
1419
+ const llm = agentDefaults?.llm as Record<string, unknown> | undefined;
1420
+ const idle = llm?.idleTimeoutSeconds as number | undefined;
1421
+ if (idle === undefined || (idle > 0 && idle < 120)) {
1422
+ api.logger.warn(
1423
+ `[cli-bridge] ⚠️ agents.defaults.llm.idleTimeoutSeconds is ${idle ?? "not set (default 60s)"} — ` +
1424
+ `CLI models need at least 120–300s. Set to 300 in openclaw.json to prevent premature 408 timeouts.`
1425
+ );
1426
+ }
1427
+ } catch { /* non-fatal — just skip the check */ }
1428
+ }
1429
+
1409
1430
  const result = patchOpencllawConfig(port);
1410
1431
  if (result.patched) {
1411
1432
  api.logger.info(
@@ -2,7 +2,7 @@
2
2
  "id": "openclaw-cli-bridge-elvatis",
3
3
  "slug": "openclaw-cli-bridge-elvatis",
4
4
  "name": "OpenClaw CLI Bridge",
5
- "version": "2.6.0",
5
+ "version": "2.6.1",
6
6
  "license": "MIT",
7
7
  "description": "Phase 1: openai-codex auth bridge. Phase 2: local HTTP proxy routing model calls through gemini/claude CLIs (vllm provider).",
8
8
  "providers": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvatis_com/openclaw-cli-bridge-elvatis",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "Bridges gemini, claude, and codex CLI tools as OpenClaw model providers. Reads existing CLI auth without re-login.",
5
5
  "type": "module",
6
6
  "openclaw": {