Add OpenRouter app headers

This commit is contained in:
Alex Gleason committed 2025-09-23 15:48:35 -05:00
1 parent 3c75849434
commit db697d0a85
1 file changed
+5
+5
View File
@@ -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