mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
🔼 feat: Vercel App Attribution for LibreChat (#9769)
This commit is contained in:
parent
880c7b43a1
commit
91e49d82aa
2 changed files with 6 additions and 1 deletions
|
|
@ -41,6 +41,9 @@ export function getOpenAIConfig(
|
|||
!isAnthropic &&
|
||||
((baseURL && baseURL.includes(KnownEndpoints.openrouter)) ||
|
||||
(endpoint != null && endpoint.toLowerCase().includes(KnownEndpoints.openrouter)));
|
||||
const isVercel =
|
||||
(baseURL && baseURL.includes('ai-gateway.vercel.sh')) ||
|
||||
(endpoint != null && endpoint.toLowerCase().includes(KnownEndpoints.vercel));
|
||||
|
||||
let azure = options.azure;
|
||||
let headers = options.headers;
|
||||
|
|
@ -80,7 +83,7 @@ export function getOpenAIConfig(
|
|||
if (baseURL) {
|
||||
configOptions.baseURL = baseURL;
|
||||
}
|
||||
if (useOpenRouter) {
|
||||
if (useOpenRouter || isVercel) {
|
||||
configOptions.defaultHeaders = Object.assign(
|
||||
{
|
||||
'HTTP-Referer': 'https://librechat.ai',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue