From 7ada3384e2afb5f3c43d9106389da86d8f807dca Mon Sep 17 00:00:00 2001 From: Walter Korman Date: Wed, 29 Apr 2026 08:39:12 -0700 Subject: [PATCH] feat(docs): add AI Gateway app attribution headers (#1305) Pass http-referer and x-title headers to streamText so Vercel can identify agent-browser on AI Gateway pages. Co-authored-by: Claude Opus 4.6 (1M context) --- docs/src/app/api/docs-chat/route.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/app/api/docs-chat/route.ts b/docs/src/app/api/docs-chat/route.ts index c95b533..2cacf82 100644 --- a/docs/src/app/api/docs-chat/route.ts +++ b/docs/src/app/api/docs-chat/route.ts @@ -105,6 +105,10 @@ export async function POST(req: Request) { } = await createBashTool({ files: docsFiles }); const result = streamText({ + headers: { + "http-referer": "https://agent-browser.dev", + "x-title": "agent-browser", + }, model: DEFAULT_MODEL, system: SYSTEM_PROMPT, messages: await convertToModelMessages(messages),