From db697d0a850fb9881a0582eea66610dfdcc931c8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 23 Sep 2025 15:48:35 -0500 Subject: [PATCH] Add OpenRouter app headers --- src/lib/ai-client.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/ai-client.ts b/src/lib/ai-client.ts index 8b2405e8..7eb4d669 100644 --- a/src/lib/ai-client.ts +++ b/src/lib/ai-client.ts @@ -16,6 +16,11 @@ export function createAIClient(connection: { baseURL: connection.baseURL, apiKey: connection.apiKey ?? '', dangerouslyAllowBrowser: true, + defaultHeaders: { + // https://openrouter.ai/docs/app-attribution + 'HTTP-Referer': 'https://shakespeare.diy', + 'X-Title': 'Shakespeare', + }, }; // If Nostr authentication is required and we have a user, use NIP-98