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) <noreply@anthropic.com>
This commit is contained in:
Walter Korman
2026-04-29 08:39:12 -07:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 57405f9361
commit 7ada3384e2
+4
View File
@@ -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),