Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test(assistant): the attachments e2e provider answers the model list a saved connection asks for

Mauriceb33391053341
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<string> {
}
async function answer(req: IncomingMessage, res: ServerResponse): Promise<void> {
+ // 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;