fix: update model references from gpt-4o to gpt-5.2 in README and tests

This commit is contained in:
2026-03-20 10:17:11 +05:30
parent 5a56ed421d
commit d03e14178b
3 changed files with 35 additions and 35 deletions
+26 -26
View File
@@ -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");
});
});