From 0f82ab15ec470559693e1b595a0a37b2a8be7d2b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 25 Sep 2025 19:13:04 -0500 Subject: [PATCH] Only send X-Title and HTTP-Referer to OpenRouter --- src/lib/ai-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ai-client.ts b/src/lib/ai-client.ts index 897006f1..fa291b85 100644 --- a/src/lib/ai-client.ts +++ b/src/lib/ai-client.ts @@ -13,11 +13,11 @@ export function createAIClient(provider: AIProvider, user?: NUser): OpenAI { baseURL: provider.baseURL, apiKey: provider.apiKey ?? '', dangerouslyAllowBrowser: true, - defaultHeaders: { + defaultHeaders: provider.id === 'openrouter' ? { // https://openrouter.ai/docs/app-attribution 'HTTP-Referer': 'https://shakespeare.diy', 'X-Title': 'Shakespeare', - }, + } : {}, }; let openai: OpenAI;