From f5e2fece8ca624c952ac2511666d3ea7af7fc6ef Mon Sep 17 00:00:00 2001 From: Patrick Wozniak Date: Tue, 25 Aug 2026 13:54:33 +0200 Subject: [PATCH] test(models): fix DeepSeek vision regressions --- tests/test-models.ts | 5 ++++- tests/test-stream.ts | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test-models.ts b/tests/test-models.ts index 583ed5e..0bf34a3 100644 --- a/tests/test-models.ts +++ b/tests/test-models.ts @@ -103,7 +103,10 @@ describe("commandCodeModelsFromApiResponse()", () => { it("matches command-code@1.32.1 image input capabilities", () => { assert.deepEqual(inputModalitiesForModel("gpt-5.6-luna"), ["text", "image"]) assert.deepEqual(inputModalitiesForModel("meta/muse-spark-1.2"), ["text", "image"]) - assert.deepEqual(inputModalitiesForModel("deepseek/deepseek-v4-flash-vision-exp"), ["text", "image"]) + assert.deepEqual(inputModalitiesForModel("deepseek/deepseek-v4-flash-vision-exp"), [ + "text", + "image", + ]) assert.deepEqual(inputModalitiesForModel("deepseek/deepseek-v4-pro"), ["text"]) assert.deepEqual(inputModalitiesForModel("unknown-new-model"), ["text"]) assert.equal(modelSupportsImageInput("gpt-5.6-luna"), true) diff --git a/tests/test-stream.ts b/tests/test-stream.ts index fa7626c..f831dc2 100644 --- a/tests/test-stream.ts +++ b/tests/test-stream.ts @@ -247,8 +247,10 @@ describe("streamCommandCode — successful streams", () => { ), ) - assert.equal(events.at(-1)?.type, "error") - assert.match(events.at(-1)?.error.errorMessage ?? "", /does not support image content/i) + const lastEvent = events.at(-1) + assert.equal(lastEvent?.type, "error") + if (lastEvent?.type !== "error") throw new Error("expected error event") + assert.match(lastEvent.error.errorMessage ?? "", /does not support image content/i) assert.equal(server.requestCount(), 0) })