diff --git a/src/gateway/openai-http.test.ts b/src/gateway/openai-http.test.ts index 5480135a9cf..6c6d12f4903 100644 --- a/src/gateway/openai-http.test.ts +++ b/src/gateway/openai-http.test.ts @@ -146,6 +146,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => { message?: string; extraSystemPrompt?: string; images?: Array<{ type: string; data: string; mimeType: string }>; + senderIsOwner?: boolean; } | undefined; const getFirstAgentMessage = () => getFirstAgentCall()?.message ?? ""; @@ -169,6 +170,7 @@ describe("OpenAI-compatible HTTP API (e2e)", () => { messages: [{ role: "user", content: message }], }); expect(res.status).toBe(200); + expect(getFirstAgentCall()?.senderIsOwner).toBe(false); return (await res.json()) as Record; }; diff --git a/src/gateway/openai-http.ts b/src/gateway/openai-http.ts index 61e6c958765..138799f0698 100644 --- a/src/gateway/openai-http.ts +++ b/src/gateway/openai-http.ts @@ -117,8 +117,8 @@ function buildAgentCommandInput(params: { deliver: false as const, messageChannel: params.messageChannel, bestEffortDeliver: false as const, - // HTTP API callers are authenticated operator clients for this gateway context. - senderIsOwner: true as const, + // OpenAI-compatible HTTP ingress is external input and must not inherit owner-only tools. + senderIsOwner: false as const, allowModelOverride: true as const, }; }