mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Only send X-Title and HTTP-Referer to OpenRouter
This commit is contained in:
1 file changed
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user