From 7d5c3257dd28cf74069fa15ff3dcbdc86471aefa Mon Sep 17 00:00:00 2001 From: Andy Salerno Date: Tue, 25 Aug 2026 19:49:51 -0700 Subject: [PATCH 1/2] Node: Cover synthetic model list compatibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- nodejs/test/client.test.ts | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index 3ffda2fa7..34da7f1b2 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -16,6 +16,7 @@ import { type ManagedSettings, type ModelInfo, } from "../src/index.js"; +import type { Model } from "../src/generated/rpc.js"; import { CopilotSession } from "../src/session.js"; import { defaultJoinSessionPermissionHandler } from "../src/types.js"; @@ -2984,7 +2985,32 @@ describe("CopilotClient", () => { }); }); - describe("onListModels", () => { + describe("model listing", () => { + it("preserves synthetic model identifiers and picker metadata through models.list", async () => { + const models: Model[] = [ + { + id: "hydrafusion", + name: "HydraFusion", + capabilities: {}, + modelPickerCategory: "powerful", + }, + { + id: "hydrafusion-max", + name: "HydraFusion Max", + capabilities: {}, + modelPickerCategory: "powerful", + }, + ]; + const sendRequest = vi.fn().mockResolvedValue({ models }); + const client = new CopilotClient(); + (client as any).connection = { sendRequest }; + + const result = await client.rpc.models.list({}); + + expect(sendRequest).toHaveBeenCalledWith("models.list", {}); + expect(result.models).toEqual(models); + }); + it("calls onListModels handler instead of RPC when provided", async () => { const customModels: ModelInfo[] = [ { From 4b30395b5e30811cfe2b7a4a14e1d2fdca0448cc Mon Sep 17 00:00:00 2001 From: Andy Salerno Date: Fri, 28 Aug 2026 09:48:13 -0700 Subject: [PATCH 2/2] Update HydraFusion model categories Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1bc96139-e399-44b5-92c1-ad27b9ea4995 --- nodejs/test/client.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index 34da7f1b2..b15e435b9 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -2992,7 +2992,7 @@ describe("CopilotClient", () => { id: "hydrafusion", name: "HydraFusion", capabilities: {}, - modelPickerCategory: "powerful", + modelPickerCategory: "versatile", }, { id: "hydrafusion-max",