mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30: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',
|
||||
|
|
|
|||
|
|
@ -889,6 +889,7 @@ export enum KnownEndpoints {
|
|||
shuttleai = 'shuttleai',
|
||||
'together.ai' = 'together.ai',
|
||||
unify = 'unify',
|
||||
vercel = 'vercel',
|
||||
xai = 'xai',
|
||||
}
|
||||
|
||||
|
|
@ -925,6 +926,7 @@ export const alternateName = {
|
|||
[KnownEndpoints.ollama]: 'Ollama',
|
||||
[KnownEndpoints.deepseek]: 'DeepSeek',
|
||||
[KnownEndpoints.xai]: 'xAI',
|
||||
[KnownEndpoints.vercel]: 'Vercel',
|
||||
};
|
||||
|
||||
const sharedOpenAIModels = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue