Tests: fix models list e2e registry mock

This commit is contained in:
Vincent Koc 2026-03-06 00:43:19 -05:00
parent e21f512e5e
commit 298f9a4f60

View File

@ -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() {