From b33391053341bb80b5d2ecc1d32186a3a3f0c21e Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 24 Oct 2026 21:57:56 +0200 Subject: [PATCH] test(assistant): the attachments e2e provider answers the model list a saved connection asks for Saving the custom connection lists the server's models first, and the fake provider answered that with a 404, so the setup got 502. It answers /api/tags the way the other assistant suites' fake provider does. --- server/tests/e2e/assistant-attachments.e2e.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/tests/e2e/assistant-attachments.e2e.test.ts b/server/tests/e2e/assistant-attachments.e2e.test.ts index a2c837d13..b79f1d68a 100644 --- a/server/tests/e2e/assistant-attachments.e2e.test.ts +++ b/server/tests/e2e/assistant-attachments.e2e.test.ts @@ -92,6 +92,12 @@ async function readBody(req: IncomingMessage): Promise { } async function answer(req: IncomingMessage, res: ServerResponse): Promise { + // Saving the connection lists the server's models first, the way an Ollama-style server answers. + if (req.method === 'GET' && req.url?.startsWith('/api/tags')) { + res.writeHead(200, { 'content-type': 'application/json' }); + res.end(JSON.stringify({ models: [{ name: 'fake-model', size: 1 }] })); + return; + } if (req.method !== 'POST' || req.url !== '/v1/chat/completions') { res.writeHead(404).end(); return;