From 298f9a4f607eab648b2a9212a790a6572b19b6a6 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Fri, 6 Mar 2026 00:43:19 -0500 Subject: [PATCH] Tests: fix models list e2e registry mock --- src/commands/models.list.e2e.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/commands/models.list.e2e.test.ts b/src/commands/models.list.e2e.test.ts index 9bbda294f64..f5ab32de7b5 100644 --- a/src/commands/models.list.e2e.test.ts +++ b/src/commands/models.list.e2e.test.ts @@ -87,6 +87,15 @@ vi.mock("../agents/pi-embedded-runner/model.js", () => ({ resolveModel: () => { throw new Error("resolveModel should not be called from models.list tests"); }, + resolveModelWithRegistry: ({ + provider, + modelId, + modelRegistry, + }: { + provider: string; + modelId: string; + modelRegistry: { find: (provider: string, modelId: string) => unknown }; + }) => modelRegistry.find(provider, modelId), })); function makeRuntime() {