Skip to content

Commit a30e265

Browse files
authored
Merge branch 'danny-avila:main' into main
2 parents 57103ba + aec1777 commit a30e265

File tree

941 files changed

+78325
-30108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

941 files changed

+78325
-30108
lines changed

.env.example

Lines changed: 124 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ DOMAIN_CLIENT=http://localhost:3080
2020
DOMAIN_SERVER=http://localhost:3080
2121

2222
NO_INDEX=true
23-
# Use the address that is at most n number of hops away from the Express application.
24-
# req.socket.remoteAddress is the first hop, and the rest are looked for in the X-Forwarded-For header from right to left.
23+
# Use the address that is at most n number of hops away from the Express application.
24+
# req.socket.remoteAddress is the first hop, and the rest are looked for in the X-Forwarded-For header from right to left.
2525
# A value of 0 means that the first untrusted address would be req.socket.remoteAddress, i.e. there is no reverse proxy.
2626
# Defaulted to 1.
2727
TRUST_PROXY=1
@@ -58,7 +58,7 @@ DEBUG_CONSOLE=false
5858
# Endpoints #
5959
#===================================================#
6060

61-
# ENDPOINTS=openAI,assistants,azureOpenAI,google,gptPlugins,anthropic
61+
# ENDPOINTS=openAI,assistants,azureOpenAI,google,anthropic
6262

6363
PROXY=
6464

@@ -88,7 +88,7 @@ PROXY=
8888
#============#
8989

9090
ANTHROPIC_API_KEY=user_provided
91-
# ANTHROPIC_MODELS=claude-3-7-sonnet-latest,claude-3-7-sonnet-20250219,claude-3-5-haiku-20241022,claude-3-5-sonnet-20241022,claude-3-5-sonnet-latest,claude-3-5-sonnet-20240620,claude-3-opus-20240229,claude-3-sonnet-20240229,claude-3-haiku-20240307,claude-2.1,claude-2,claude-1.2,claude-1,claude-1-100k,claude-instant-1,claude-instant-1-100k
91+
# ANTHROPIC_MODELS=claude-opus-4-20250514,claude-sonnet-4-20250514,claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022,claude-3-opus-20240229,claude-3-sonnet-20240229,claude-3-haiku-20240307
9292
# ANTHROPIC_REVERSE_PROXY=
9393

9494
#============#
@@ -142,10 +142,10 @@ GOOGLE_KEY=user_provided
142142
# GOOGLE_AUTH_HEADER=true
143143

144144
# Gemini API (AI Studio)
145-
# GOOGLE_MODELS=gemini-2.5-pro-preview-05-06,gemini-2.5-flash-preview-04-17,gemini-2.0-flash-001,gemini-2.0-flash-exp,gemini-2.0-flash-lite-001,gemini-1.5-pro-002,gemini-1.5-flash-002
145+
# GOOGLE_MODELS=gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite-preview-06-17,gemini-2.0-flash,gemini-2.0-flash-lite
146146

147147
# Vertex AI
148-
# GOOGLE_MODELS=gemini-2.5-pro-preview-05-06,gemini-2.5-flash-preview-04-17,gemini-2.0-flash-001,gemini-2.0-flash-exp,gemini-2.0-flash-lite-001,gemini-1.5-pro-002,gemini-1.5-flash-002
148+
# GOOGLE_MODELS=gemini-2.5-pro,gemini-2.5-flash,gemini-2.5-flash-lite-preview-06-17,gemini-2.0-flash-001,gemini-2.0-flash-lite-001
149149

150150
# GOOGLE_TITLE_MODEL=gemini-2.0-flash-lite-001
151151

@@ -349,6 +349,11 @@ REGISTRATION_VIOLATION_SCORE=1
349349
CONCURRENT_VIOLATION_SCORE=1
350350
MESSAGE_VIOLATION_SCORE=1
351351
NON_BROWSER_VIOLATION_SCORE=20
352+
TTS_VIOLATION_SCORE=0
353+
STT_VIOLATION_SCORE=0
354+
FORK_VIOLATION_SCORE=0
355+
IMPORT_VIOLATION_SCORE=0
356+
FILE_UPLOAD_VIOLATION_SCORE=0
352357

353358
LOGIN_MAX=7
354359
LOGIN_WINDOW=5
@@ -443,6 +448,47 @@ OPENID_IMAGE_URL=
443448
# Set to true to automatically redirect to the OpenID provider when a user visits the login page
444449
# This will bypass the login form completely for users, only use this if OpenID is your only authentication method
445450
OPENID_AUTO_REDIRECT=false
451+
# Set to true to use PKCE (Proof Key for Code Exchange) for OpenID authentication
452+
OPENID_USE_PKCE=false
453+
#Set to true to reuse openid tokens for authentication management instead of using the mongodb session and the custom refresh token.
454+
OPENID_REUSE_TOKENS=
455+
#By default, signing key verification results are cached in order to prevent excessive HTTP requests to the JWKS endpoint.
456+
#If a signing key matching the kid is found, this will be cached and the next time this kid is requested the signing key will be served from the cache.
457+
#Default is true.
458+
OPENID_JWKS_URL_CACHE_ENABLED=
459+
OPENID_JWKS_URL_CACHE_TIME= # 600000 ms eq to 10 minutes leave empty to disable caching
460+
#Set to true to trigger token exchange flow to acquire access token for the userinfo endpoint.
461+
OPENID_ON_BEHALF_FLOW_FOR_USERINFO_REQUIRED=
462+
OPENID_ON_BEHALF_FLOW_USERINFO_SCOPE="user.read" # example for Scope Needed for Microsoft Graph API
463+
# Set to true to use the OpenID Connect end session endpoint for logout
464+
OPENID_USE_END_SESSION_ENDPOINT=
465+
466+
467+
# SAML
468+
# Note: If OpenID is enabled, SAML authentication will be automatically disabled.
469+
SAML_ENTRY_POINT=
470+
SAML_ISSUER=
471+
SAML_CERT=
472+
SAML_CALLBACK_URL=/oauth/saml/callback
473+
SAML_SESSION_SECRET=
474+
475+
# Attribute mappings (optional)
476+
SAML_EMAIL_CLAIM=
477+
SAML_USERNAME_CLAIM=
478+
SAML_GIVEN_NAME_CLAIM=
479+
SAML_FAMILY_NAME_CLAIM=
480+
SAML_PICTURE_CLAIM=
481+
SAML_NAME_CLAIM=
482+
483+
# Logint buttion settings (optional)
484+
SAML_BUTTON_LABEL=
485+
SAML_IMAGE_URL=
486+
487+
# Whether the SAML Response should be signed.
488+
# - If "true", the entire `SAML Response` will be signed.
489+
# - If "false" or unset, only the `SAML Assertion` will be signed (default behavior).
490+
# SAML_USE_AUTHN_RESPONSE_SIGNED=
491+
446492

447493
# LDAP
448494
LDAP_URL=
@@ -474,6 +520,18 @@ EMAIL_PASSWORD=
474520
EMAIL_FROM_NAME=
475521
476522

523+
#========================#
524+
# Mailgun API #
525+
#========================#
526+
527+
# MAILGUN_API_KEY=your-mailgun-api-key
528+
# MAILGUN_DOMAIN=mg.yourdomain.com
529+
530+
# EMAIL_FROM_NAME="LibreChat"
531+
532+
# # Optional: For EU region
533+
# MAILGUN_HOST=https://api.eu.mailgun.net
534+
477535
#========================#
478536
# Firebase CDN #
479537
#========================#
@@ -522,6 +580,10 @@ ALLOW_SHARED_LINKS_PUBLIC=true
522580
# If you have another service in front of your LibreChat doing compression, disable express based compression here
523581
# DISABLE_COMPRESSION=true
524582

583+
# If you have gzipped version of uploaded image images in the same folder, this will enable gzip scan and serving of these images
584+
# Note: The images folder will be scanned on startup and a ma kept in memory. Be careful for large number of images.
585+
# ENABLE_IMAGE_OUTPUT_GZIP_SCAN=true
586+
525587
#===================================================#
526588
# UI #
527589
#===================================================#
@@ -539,11 +601,31 @@ HELP_AND_FAQ_URL=https://librechat.ai
539601
# REDIS Options #
540602
#===============#
541603

542-
# REDIS_URI=10.10.10.10:6379
604+
# Enable Redis for caching and session storage
543605
# USE_REDIS=true
544606

545-
# USE_REDIS_CLUSTER=true
546-
# REDIS_CA=/path/to/ca.crt
607+
# Single Redis instance
608+
# REDIS_URI=redis://127.0.0.1:6379
609+
610+
# Redis cluster (multiple nodes)
611+
# REDIS_URI=redis://127.0.0.1:7001,redis://127.0.0.1:7002,redis://127.0.0.1:7003
612+
613+
# Redis with TLS/SSL encryption and CA certificate
614+
# REDIS_URI=rediss://127.0.0.1:6380
615+
# REDIS_CA=/path/to/ca-cert.pem
616+
617+
# Redis authentication (if required)
618+
# REDIS_USERNAME=your_redis_username
619+
# REDIS_PASSWORD=your_redis_password
620+
621+
# Redis key prefix configuration
622+
# Use environment variable name for dynamic prefix (recommended for cloud deployments)
623+
# REDIS_KEY_PREFIX_VAR=K_REVISION
624+
# Or use static prefix directly
625+
# REDIS_KEY_PREFIX=librechat
626+
627+
# Redis connection limits
628+
# REDIS_MAX_LISTENERS=40
547629

548630
#==================================================#
549631
# Others #
@@ -563,9 +645,9 @@ HELP_AND_FAQ_URL=https://librechat.ai
563645
# users always get the latest version. Customize #
564646
# only if you understand caching implications. #
565647

566-
# INDEX_HTML_CACHE_CONTROL=no-cache, no-store, must-revalidate
567-
# INDEX_HTML_PRAGMA=no-cache
568-
# INDEX_HTML_EXPIRES=0
648+
# INDEX_CACHE_CONTROL=no-cache, no-store, must-revalidate
649+
# INDEX_PRAGMA=no-cache
650+
# INDEX_EXPIRES=0
569651

570652
# no-cache: Forces validation with server before using cached version
571653
# no-store: Prevents storing the response entirely
@@ -575,3 +657,33 @@ HELP_AND_FAQ_URL=https://librechat.ai
575657
# OpenWeather #
576658
#=====================================================#
577659
OPENWEATHER_API_KEY=
660+
661+
#====================================#
662+
# LibreChat Code Interpreter API #
663+
#====================================#
664+
665+
# https://code.librechat.ai
666+
# LIBRECHAT_CODE_API_KEY=your-key
667+
668+
#======================#
669+
# Web Search #
670+
#======================#
671+
672+
# Note: All of the following variable names can be customized.
673+
# Omit values to allow user to provide them.
674+
675+
# For more information on configuration values, see:
676+
# https://librechat.ai/docs/features/web_search
677+
678+
# Search Provider (Required)
679+
# SERPER_API_KEY=your_serper_api_key
680+
681+
# Scraper (Required)
682+
# FIRECRAWL_API_KEY=your_firecrawl_api_key
683+
# Optional: Custom Firecrawl API URL
684+
# FIRECRAWL_API_URL=your_firecrawl_api_url
685+
686+
# Reranker (Required)
687+
# JINA_API_KEY=your_jina_api_key
688+
# or
689+
# COHERE_API_KEY=your_cohere_api_key

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Project maintainers have the right and responsibility to remove, edit, or reject
3030
2. Install typescript globally: `npm i -g typescript`.
3131
3. Run `npm ci` to install dependencies.
3232
4. Build the data provider: `npm run build:data-provider`.
33-
5. Build MCP: `npm run build:mcp`.
34-
6. Build data schemas: `npm run build:data-schemas`.
33+
5. Build data schemas: `npm run build:data-schemas`.
34+
6. Build API methods: `npm run build:api`.
3535
7. Setup and run unit tests:
3636
- Copy `.env.test`: `cp api/test/.env.test.example api/test/.env.test`.
3737
- Run backend unit tests: `npm run test:api`.

.github/workflows/backend-review.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- release/*
88
paths:
99
- 'api/**'
10+
- 'packages/api/**'
1011
jobs:
1112
tests_Backend:
1213
name: Run Backend unit tests
@@ -36,12 +37,12 @@ jobs:
3637
- name: Install Data Provider Package
3738
run: npm run build:data-provider
3839

39-
- name: Install MCP Package
40-
run: npm run build:mcp
41-
4240
- name: Install Data Schemas Package
4341
run: npm run build:data-schemas
4442

43+
- name: Install API Package
44+
run: npm run build:api
45+
4546
- name: Create empty auth.json file
4647
run: |
4748
mkdir -p api/data
@@ -66,5 +67,8 @@ jobs:
6667
- name: Run librechat-data-provider unit tests
6768
run: cd packages/data-provider && npm run test:ci
6869

69-
- name: Run librechat-mcp unit tests
70-
run: cd packages/mcp && npm run test:ci
70+
- name: Run @librechat/data-schemas unit tests
71+
run: cd packages/data-schemas && npm run test:ci
72+
73+
- name: Run @librechat/api unit tests
74+
run: cd packages/api && npm run test:ci

.github/workflows/client.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish `@librechat/client` to NPM
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
reason:
7+
description: 'Reason for manual trigger'
8+
required: false
9+
default: 'Manual publish requested'
10+
11+
jobs:
12+
build-and-publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18.x'
21+
22+
- name: Check if client package exists
23+
run: |
24+
if [ -d "packages/client" ]; then
25+
echo "Client package directory found"
26+
else
27+
echo "Client package directory not found - workflow ready for future use"
28+
exit 0
29+
fi
30+
31+
- name: Placeholder for future publishing
32+
run: echo "Client package publishing workflow is ready"

.github/workflows/deploy-dev.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Update Test Server
22

33
on:
44
workflow_run:
5-
workflows: ["Docker Dev Images Build"]
5+
workflows: ["Docker Dev Branch Images Build"]
66
types:
77
- completed
88
workflow_dispatch:
@@ -12,7 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: |
1414
github.repository == 'danny-avila/LibreChat' &&
15-
(github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
15+
(github.event_name == 'workflow_dispatch' ||
16+
(github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'dev'))
1617
steps:
1718
- name: Checkout repository
1819
uses: actions/checkout@v4
@@ -29,13 +30,17 @@ jobs:
2930
DO_USER: ${{ secrets.DO_USER }}
3031
run: |
3132
ssh -o StrictHostKeyChecking=no ${DO_USER}@${DO_HOST} << EOF
32-
sudo -i -u danny bash << EEOF
33+
sudo -i -u danny bash << 'EEOF'
3334
cd ~/LibreChat && \
3435
git fetch origin main && \
35-
npm run update:deployed && \
36+
sudo npm run stop:deployed && \
37+
sudo docker images --format "{{.Repository}}:{{.ID}}" | grep -E "lc-dev|librechat" | cut -d: -f2 | xargs -r sudo docker rmi -f || true && \
38+
sudo npm run update:deployed && \
39+
git checkout dev && \
40+
git pull origin dev && \
3641
git checkout do-deploy && \
37-
git rebase main && \
38-
npm run start:deployed && \
42+
git rebase dev && \
43+
sudo npm run start:deployed && \
3944
echo "Update completed. Application should be running now."
4045
EEOF
4146
EOF

0 commit comments

Comments
 (0)