@elvatis_com/openclaw-cli-bridge-elvatis 2.6.0 → 2.6.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 +31 -1
- package/SKILL.md +1 -1
- package/index.ts +21 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/cli-runner.ts +1 -1
- package/src/session-manager.ts +1 -1
- package/test/cli-runner-extended.test.ts +1 -1
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.
|
|
5
|
+
**Current version:** `2.6.2`
|
|
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,16 @@ npm run ci # lint + typecheck + test
|
|
|
386
406
|
|
|
387
407
|
## Changelog
|
|
388
408
|
|
|
409
|
+
### v2.6.2
|
|
410
|
+
- **fix:** Codex CLI `--quiet` flag removed in latest Codex version — replaced with `codex exec` subcommand for non-interactive execution. All `openai-codex/*` models were failing with "unexpected argument '--quiet'" error.
|
|
411
|
+
- **fix:** Agent model routing — 10 agents referenced non-existent `google-gemini-cli` provider. Remapped to `vllm/cli-gemini/*` (OAuth-based, stable) for reliable Gemini access.
|
|
412
|
+
- **fix:** Main agent fallback `openai-codex/gpt-5.1` routed via direct OpenAI API (broken OAuth scopes) — now routes through CLI bridge (`vllm/openai-codex/gpt-5.1`)
|
|
413
|
+
|
|
414
|
+
### v2.6.1
|
|
415
|
+
- **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
|
|
416
|
+
- **feat:** Startup warning when `idleTimeoutSeconds` is not set or < 120s — tells you exactly what to add to `openclaw.json`
|
|
417
|
+
- **docs:** Added "Required: OpenClaw LLM idle timeout" section to README with recommended config
|
|
418
|
+
|
|
389
419
|
### v2.6.0
|
|
390
420
|
- **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
421
|
- **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
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(
|
package/openclaw.plugin.json
CHANGED
|
@@ -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.
|
|
5
|
+
"version": "2.6.2",
|
|
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.
|
|
3
|
+
"version": "2.6.2",
|
|
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": {
|
package/src/cli-runner.ts
CHANGED
|
@@ -592,7 +592,7 @@ export async function runCodex(
|
|
|
592
592
|
opts?: { tools?: ToolDefinition[]; mediaFiles?: MediaFile[]; log?: (msg: string) => void }
|
|
593
593
|
): Promise<string> {
|
|
594
594
|
const model = stripPrefix(modelId);
|
|
595
|
-
const args = ["--model", model, "--
|
|
595
|
+
const args = ["exec", "--model", model, "--full-auto"];
|
|
596
596
|
|
|
597
597
|
// Codex supports native image input via -i flag
|
|
598
598
|
if (opts?.mediaFiles?.length) {
|
package/src/session-manager.ts
CHANGED
|
@@ -87,7 +87,7 @@ describe("runCodex()", () => {
|
|
|
87
87
|
expect(result).toBe("codex result");
|
|
88
88
|
expect(mockSpawn).toHaveBeenCalledWith(
|
|
89
89
|
"codex",
|
|
90
|
-
["--model", "gpt-5.3-codex", "--
|
|
90
|
+
["exec", "--model", "gpt-5.3-codex", "--full-auto"],
|
|
91
91
|
expect.any(Object)
|
|
92
92
|
);
|
|
93
93
|
});
|