From d03e14178b19381f0c40f9f69dca051808b82faa Mon Sep 17 00:00:00 2001 From: bendtherules Date: Fri, 20 Mar 2026 10:17:11 +0530 Subject: [PATCH] fix: update model references from gpt-4o to gpt-5.2 in README and tests --- README.md | 16 ++++++------ src/core/launch.ts | 2 +- tests/multi-model.test.ts | 52 +++++++++++++++++++-------------------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 4d1e150..c845bbb 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ Add to your OpenCode config (`opencode.json`): ```bash # Using bunx (no install) -bunx @username/opencode-multi-model open my-session -m openai/gpt-4o anthropic/claude-3-5-sonnet +bunx @username/opencode-multi-model open my-session -m openai/gpt-5.2 anthropic/claude-3-5-sonnet # Or install globally bun install -g @username/opencode-multi-model -opencode-multi-model open my-session -m openai/gpt-4o +opencode-multi-model open my-session -m openai/gpt-5.2 ``` ### As Project Tool @@ -54,7 +54,7 @@ export { openTool as open, closeTool as close } **Open a session:** ``` Use multi-model-open tool: -sessionName: my-session, models: ["openai/gpt-4o", "anthropic/claude-3-5-sonnet"] +sessionName: my-session, models: ["openai/gpt-5.2", "anthropic/claude-3-5-sonnet"] ``` **Close a session (using tool):** @@ -72,14 +72,14 @@ tmux kill-session -t my-session && rm -rf ~/.local/share/opencode/multi-model/my **Open a session:** ```bash # Basic usage -opencode-multi-model open my-session -m openai/gpt-4o anthropic/claude-3-5-sonnet +opencode-multi-model open my-session -m openai/gpt-5.2 anthropic/claude-3-5-sonnet # With custom binary (via flag) -opencode-multi-model open my-session -m openai/gpt-4o -b kilo +opencode-multi-model open my-session -m openai/gpt-5.2 -b kilo # With custom binary (via env) export OPENCODE_MULTI_MODEL_BINARY=kilo -opencode-multi-model open my-session -m openai/gpt-4o +opencode-multi-model open my-session -m openai/gpt-5.2 ``` **Close a session (CLI command):** @@ -113,7 +113,7 @@ export OPENCODE_MULTI_MODEL_BINARY=kilo **Via CLI flag:** ```bash -opencode-multi-model open my-session -m openai/gpt-4o -b kilo +opencode-multi-model open my-session -m openai/gpt-5.2 -b kilo ``` Priority: CLI flag > Environment variable > Default ("opencode") @@ -140,7 +140,7 @@ bun run build bun test # Test CLI locally -bun dist/cli.js open test-session -m openai/gpt-4o +bun dist/cli.js open test-session -m openai/gpt-5.2 bun dist/cli.js close test-session ``` diff --git a/src/core/launch.ts b/src/core/launch.ts index 0db0e89..0994746 100644 --- a/src/core/launch.ts +++ b/src/core/launch.ts @@ -26,7 +26,7 @@ import { * ```ts * const result = await launchMultiModel({ * sessionName: "compare", - * models: ["openai/gpt-4o", "anthropic/claude-3-5-sonnet"], + * models: ["openai/gpt-5.2", "anthropic/claude-3-5-sonnet"], * binaryName: "opencode", * }); * if (result.success) { diff --git a/tests/multi-model.test.ts b/tests/multi-model.test.ts index 959674e..bc1aba4 100644 --- a/tests/multi-model.test.ts +++ b/tests/multi-model.test.ts @@ -68,7 +68,7 @@ describe("multi-model launch", () => { "git rev-parse --is-inside-work-tree": { ok: true, stdout: "true", stderr: "" }, "command -v tmux": { ok: true, stdout: "/usr/bin/tmux", stderr: "" }, "command -v opencode": { ok: true, stdout: "/usr/bin/opencode", stderr: "" }, - "opencode models": { ok: true, stdout: "openai/gpt-4o\nanthropic/claude-3-5-sonnet", stderr: "" }, + "opencode models": { ok: true, stdout: "openai/gpt-5.2\nanthropic/claude-3-5-sonnet", stderr: "" }, "tmux has-session -t test-session": { ok: false, stdout: "", stderr: "session not found" }, "git show-ref --verify --quiet refs/heads/opencode/test-session/gpt-4o": { ok: false, stdout: "", stderr: "" }, }; @@ -81,7 +81,7 @@ describe("multi-model launch", () => { test("fails if session name is empty", async () => { const result = await launchMultiModel({ sessionName: "", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -103,7 +103,7 @@ describe("multi-model launch", () => { test("fails if duplicate models are provided", async () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o", "openai/gpt-4o"], + models: ["openai/gpt-5.2", "openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -116,7 +116,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -129,7 +129,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -145,7 +145,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -178,7 +178,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -195,7 +195,7 @@ describe("multi-model launch", () => { test("successfully plans and executes tmux launch with single model", async () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(true); @@ -209,7 +209,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o", "anthropic/claude-3-5-sonnet"], + models: ["openai/gpt-5.2", "anthropic/claude-3-5-sonnet"], }); expect(result.success).toBe(true); @@ -224,7 +224,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test session!", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(true); @@ -239,7 +239,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -265,7 +265,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -284,7 +284,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -304,7 +304,7 @@ describe("multi-model launch", () => { const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o"], + models: ["openai/gpt-5.2"], }); expect(result.success).toBe(false); @@ -321,13 +321,13 @@ describe("multi-model launch", () => { }); test("model name collision creates unique window names", async () => { - mockCommandResponses["opencode models"] = { ok: true, stdout: "openai/gpt-4o\nanthropic/gpt-4o", stderr: "" }; + mockCommandResponses["opencode models"] = { ok: true, stdout: "openai/gpt-5.2\nanthropic/gpt-4o", stderr: "" }; mockCommandResponses["git show-ref --verify --quiet refs/heads/opencode/test-session/gpt-4o"] = { ok: false, stdout: "", stderr: "" }; mockCommandResponses["git show-ref --verify --quiet refs/heads/opencode/test-session/gpt-4o-2"] = { ok: false, stdout: "", stderr: "" }; const result = await launchMultiModel({ sessionName: "test-session", - models: ["openai/gpt-4o", "anthropic/gpt-4o"], + models: ["openai/gpt-5.2", "anthropic/gpt-4o"], }); expect(result.success).toBe(true); @@ -403,7 +403,7 @@ describe("core utils", () => { }); test("array with mixed valid models, padded models, and empty strings", () => { - expect(normalizeModels([" openai/gpt-4o ", "", " anthropic/claude "])).toEqual(["openai/gpt-4o", "anthropic/claude"]); + expect(normalizeModels([" openai/gpt-5.2 ", "", " anthropic/claude "])).toEqual(["openai/gpt-5.2", "anthropic/claude"]); }); }); @@ -454,12 +454,12 @@ describe("core utils", () => { describe("createWindowPlans", () => { test("single model", () => { - expect(createWindowPlans(["openai/gpt-4o"])).toEqual([{ model: "openai/gpt-4o", windowName: "gpt-4o" }]); + expect(createWindowPlans(["openai/gpt-5.2"])).toEqual([{ model: "openai/gpt-5.2", windowName: "gpt-4o" }]); }); test("two models with the same base name", () => { - expect(createWindowPlans(["openai/gpt-4o", "anthropic/gpt-4o"])).toEqual([ - { model: "openai/gpt-4o", windowName: "gpt-4o" }, + expect(createWindowPlans(["openai/gpt-5.2", "anthropic/gpt-4o"])).toEqual([ + { model: "openai/gpt-5.2", windowName: "gpt-4o" }, { model: "anthropic/gpt-4o", windowName: "gpt-4o-2" } ]); }); @@ -650,19 +650,19 @@ describe("core utils", () => { describe("launchModelInWindow", () => { test("sends correct tmux command", async () => { - mockCommandResponses["tmux send-keys -t session:window opencode --model 'openai/gpt-4o' C-m"] = { ok: true, stdout: "", stderr: "" }; + mockCommandResponses["tmux send-keys -t session:window opencode --model 'openai/gpt-5.2' C-m"] = { ok: true, stdout: "", stderr: "" }; - const result = await launchModelInWindow("session", { model: "openai/gpt-4o", windowName: "window" }); + const result = await launchModelInWindow("session", { model: "openai/gpt-5.2", windowName: "window" }); expect(result.ok).toBe(true); - expect(executedCommands).toContain("tmux send-keys -t session:window opencode --model 'openai/gpt-4o' C-m"); + expect(executedCommands).toContain("tmux send-keys -t session:window opencode --model 'openai/gpt-5.2' C-m"); }); test("uses custom binary name", async () => { - mockCommandResponses["tmux send-keys -t session:window kilo --model 'openai/gpt-4o' C-m"] = { ok: true, stdout: "", stderr: "" }; + mockCommandResponses["tmux send-keys -t session:window kilo --model 'openai/gpt-5.2' C-m"] = { ok: true, stdout: "", stderr: "" }; - const result = await launchModelInWindow("session", { model: "openai/gpt-4o", windowName: "window" }, "kilo"); + const result = await launchModelInWindow("session", { model: "openai/gpt-5.2", windowName: "window" }, "kilo"); expect(result.ok).toBe(true); - expect(executedCommands).toContain("tmux send-keys -t session:window kilo --model 'openai/gpt-4o' C-m"); + expect(executedCommands).toContain("tmux send-keys -t session:window kilo --model 'openai/gpt-5.2' C-m"); }); });