knowledge-mcp: send x-tdai-service-id header (query endpoints require it)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
type-two 2026-08-03 21:19:08 +10:00
parent 260f02915f
commit ca04678ce6

View File

@ -36,6 +36,8 @@ export async function callApi(
const url = `${opts.baseUrl.replace(/\/$/, "")}/v3${endpoint}`;
const headers: Record<string, string> = { "Content-Type": "application/json" };
if (opts.token) headers["Authorization"] = `Bearer ${opts.token}`;
// GODCALL: query endpoints require the memory-instance id header.
headers["x-tdai-service-id"] = process.env.KNOWLEDGE_SERVICE_ID || "default";
log.debug(`POST ${url}`);