@elvatis_com/openclaw-cli-bridge-elvatis 0.2.13 → 0.2.14

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.
@@ -2,13 +2,13 @@
2
2
 
3
3
  _Last updated: 2026-03-07 by Akido (claude-sonnet-4-6)_
4
4
 
5
- ## Current Version: 0.2.13 — STABLE
5
+ ## Current Version: 0.2.14 — STABLE
6
6
 
7
7
  ## What is done
8
8
 
9
9
  - ✅ Repo: `https://github.com/elvatis/openclaw-cli-bridge-elvatis`
10
- - ✅ npm: `@elvatis_com/openclaw-cli-bridge-elvatis@0.2.13`
11
- - ✅ ClawHub: `openclaw-cli-bridge-elvatis@0.2.13`
10
+ - ✅ npm: `@elvatis_com/openclaw-cli-bridge-elvatis@0.2.14`
11
+ - ✅ ClawHub: `openclaw-cli-bridge-elvatis@0.2.14`
12
12
  - ✅ Phase 1: `openai-codex` provider via `~/.codex/auth.json` (no re-login)
13
13
  - ✅ Phase 2: Local OpenAI-compatible proxy on `127.0.0.1:31337` (Gemini + Claude CLI)
14
14
  - ✅ Phase 3: 10 slash commands (`/cli-sonnet`, `/cli-opus`, `/cli-haiku`, `/cli-gemini`, `/cli-gemini-flash`, `/cli-gemini3`, `/cli-codex`, `/cli-codex-mini`, `/cli-back`, `/cli-test`)
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > OpenClaw plugin that bridges locally installed AI CLIs (Codex, Gemini, Claude Code) as model providers — with slash commands for instant model switching, restore, and health testing.
4
4
 
5
- **Current version:** `0.2.13`
5
+ **Current version:** `0.2.14`
6
6
 
7
7
  ---
8
8
 
@@ -234,7 +234,7 @@ npm test # vitest run (5 unit tests for formatPrompt)
234
234
 
235
235
  ## Changelog
236
236
 
237
- ### v0.2.13
237
+ ### v0.2.14
238
238
  - **docs:** Fix changelog (v0.2.10 entry was lost by sed, v0.2.11 description was wrong); enforce single-commit publish discipline
239
239
 
240
240
  ### v0.2.11
package/SKILL.md CHANGED
@@ -53,4 +53,4 @@ Each command runs `openclaw models set <model>` atomically and replies with a co
53
53
 
54
54
  See `README.md` for full configuration reference and architecture diagram.
55
55
 
56
- **Version:** 0.2.13
56
+ **Version:** 0.2.14
package/index.ts CHANGED
@@ -277,7 +277,7 @@ function proxyTestRequest(
277
277
  const plugin = {
278
278
  id: "openclaw-cli-bridge-elvatis",
279
279
  name: "OpenClaw CLI Bridge",
280
- version: "0.2.13",
280
+ version: "0.2.14",
281
281
  description:
282
282
  "Phase 1: openai-codex auth bridge. " +
283
283
  "Phase 2: HTTP proxy for gemini/claude CLIs. " +
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openclaw-cli-bridge-elvatis",
3
3
  "name": "OpenClaw CLI Bridge",
4
- "version": "0.2.13",
4
+ "version": "0.2.14",
5
5
  "description": "Phase 1: openai-codex auth bridge. Phase 2: local HTTP proxy routing model calls through gemini/claude CLIs (vllm provider).",
6
6
  "providers": [
7
7
  "openai-codex"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvatis_com/openclaw-cli-bridge-elvatis",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
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
@@ -254,11 +254,16 @@ export async function routeToCliRunner(
254
254
  ): Promise<string> {
255
255
  const prompt = formatPrompt(messages);
256
256
 
257
- if (model.startsWith("cli-gemini/")) return runGemini(prompt, model, timeoutMs);
258
- if (model.startsWith("cli-claude/")) return runClaude(prompt, model, timeoutMs);
257
+ // Strip "vllm/" prefix if present — OpenClaw sends the full provider path
258
+ // (e.g. "vllm/cli-claude/claude-sonnet-4-6") but the router only needs the
259
+ // "cli-<type>/<model>" portion.
260
+ const normalized = model.startsWith("vllm/") ? model.slice(5) : model;
261
+
262
+ if (normalized.startsWith("cli-gemini/")) return runGemini(prompt, normalized, timeoutMs);
263
+ if (normalized.startsWith("cli-claude/")) return runClaude(prompt, normalized, timeoutMs);
259
264
 
260
265
  throw new Error(
261
- `Unknown CLI bridge model: "${model}". Use "cli-gemini/<model>" or "cli-claude/<model>".`
266
+ `Unknown CLI bridge model: "${model}". Use "vllm/cli-gemini/<model>" or "vllm/cli-claude/<model>".`
262
267
  );
263
268
  }
264
269
 
@@ -1,5 +1,5 @@
1
- import { describe, it, expect } from "vitest";
2
- import { formatPrompt } from "../src/cli-runner.js";
1
+ import { describe, it, expect, vi } from "vitest";
2
+ import { formatPrompt, routeToCliRunner } from "../src/cli-runner.js";
3
3
 
4
4
  describe("formatPrompt", () => {
5
5
  it("returns empty string for empty messages", () => {
@@ -44,3 +44,31 @@ describe("formatPrompt", () => {
44
44
  expect(result).toContain("truncated");
45
45
  });
46
46
  });
47
+
48
+ describe("routeToCliRunner — model normalization", () => {
49
+ it("rejects unknown model without vllm prefix", async () => {
50
+ await expect(
51
+ routeToCliRunner("unknown/model", [], 1000)
52
+ ).rejects.toThrow("Unknown CLI bridge model");
53
+ });
54
+
55
+ it("rejects unknown model with vllm prefix", async () => {
56
+ await expect(
57
+ routeToCliRunner("vllm/unknown/model", [], 1000)
58
+ ).rejects.toThrow("Unknown CLI bridge model");
59
+ });
60
+
61
+ it("accepts cli-claude/ without vllm prefix (calls runClaude path)", async () => {
62
+ // Should throw CLI spawn error (no real claude), not "Unknown CLI bridge model"
63
+ await expect(
64
+ routeToCliRunner("cli-claude/claude-sonnet-4-6", [{ role: "user", content: "hi" }], 500)
65
+ ).rejects.not.toThrow("Unknown CLI bridge model");
66
+ });
67
+
68
+ it("accepts vllm/cli-claude/ — strips vllm prefix before routing", async () => {
69
+ // Should throw CLI spawn error (no real claude), not "Unknown CLI bridge model"
70
+ await expect(
71
+ routeToCliRunner("vllm/cli-claude/claude-sonnet-4-6", [{ role: "user", content: "hi" }], 500)
72
+ ).rejects.not.toThrow("Unknown CLI bridge model");
73
+ });
74
+ });