Custom API (GWDG), Embeddings & Upload Issues #8309
Unanswered
Teclablue
asked this question in
Troubleshooting
Replies: 1 comment
-
yo just saw this — brutal combo. actually helped someone last week run into exactly the same issues (custom backend, weird ENV stack, embedding fallback logic silently skipped…) the real problem? LibreChat doesn’t enforce a semantic-safe bootstrap order. so what happens is:
we ran into this mess so often that we just built a semantic bootstrap validator — it auto-detects these traps before startup. MIT license, and even Tesseract.js creator gave us a thumbs up. if you want the link, just say the word. it’ll save you hours of hair-pulling. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Hi LibreChat team,
we're running LibreChat in a Docker setup and use a custom AI backend via the GWDG Academic Cloud (Germany). We're not using OpenAI but a compatible API. Here's our stack:
🔧 Setup
What works
Issues
Despite setting the RAG_* environment variables correctly, only image uploads work.
Uploading PDFs or CSVs is not possible. Only an "upload pictures" buttons appear.
We do not want the e5-mistral-7b-instruct embedding model to appear as a selectable chat model.
This is likely because the model is listed under embedding_models or not filtered out properly.
How can we prevent this?
Web Search doesn't work
Although WEBSEARCH_ENABLED=true and the three keys are provided, web search fails silently or doesn't return anything.
We also defined multiple custom endpoints in librechat.yaml for the GWDG models, all working fine. But adding a rag: section in librechat.yaml breaks all model loading.
There seems to be no place in the .env or librechat.yaml where these are set. Any advice?
ENV:
====================================================================#
LibreChat Configuration
#=====================================================================#
Please refer to the reference documentation for assistance
with configuring your LibreChat environment.
https://www.librechat.ai/docs/configuration/dotenv
#=====================================================================#
VITE_CUSTOM_LOGIN_LOGO=/ZALF_Logo_DE.png
#==================================================#
Server Configuration
#==================================================#
CHAT_AI_API_KEY=xxx
HOST=xxx
PORT=xxx
MONGO_URI=xxx
DOMAIN_CLIENT=xxx
DOMAIN_SERVER=hxxx
NO_INDEX=true
Use the address that is at most n number of hops away from the Express application.
req.socket.remoteAddress is the first hop, and the rest are looked for in the X-Forwarded-For header from right to left.
A value of 0 means that the first untrusted address would be req.socket.remoteAddress, i.e. there is no reverse proxy.
Defaulted to 1.
TRUST_PROXY=1
#===============#
JSON Logging
#===============#
Use when process console logs in cloud deployment like GCP/AWS
CONSOLE_JSON=false
#===============#
Debug Logging
#===============#
DEBUG_LOGGING=true
DEBUG_CONSOLE=true
#=============#
Permissions
#=============#
UID=0
GID=0
#===============#
Configuration
#===============#
Use an absolute path, a relative path, or a URL
CONFIG_PATH="/alternative/path/to/librechat.yaml"
#===================================================#
Endpoints
#===================================================#
ENDPOINTS=custom
PROXY=
#============#
GWDG
#============#
CHAT_AI_API_KEY=xxx
OPENAI_BASE_URL=https://chat-ai.academiccloud.de/v1
DEBUG_OPENAI=true
EMBEDDING_API_KEY=xxx
EMBEDDINGS_PROVIDER=custom # ← NEU (falls nicht vorhanden)
EMBEDDINGS_MODEL=e5-mistral-7b-instruct # ← NEU (GWDG-Embeddings-Modell)
EMBEDDING_BASE_URL=https://chat-ai.academiccloud.de/v2
FILE_UPLOAD_MAX_SIZE=20 # ← optional größer als 10 MB
#============#
Plugins
#============#
PLUGIN_MODELS=gpt-4o,gpt-4o-mini,gpt-4,gpt-4-turbo-preview,gpt-4-0125-preview,gpt-4-1106-preview,gpt-4-0613,gpt-3.5-turbo,gpt-3.5-turbo-0125,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613
DEBUG_PLUGINS=true
CREDS_KEY=xxx
CREDS_IV=xxx
#==================================================#
Search
#==================================================#
SEARCH=true
MEILI_NO_ANALYTICS=true
MEILI_HOST=http://0.0.0.0:7700
MEILI_MASTER_KEY=xxx
#==================================================#
RAG
#==================================================#
RAG_OPENAI_API_KEY=${EMBEDDING_API_KEY}
RAG_OPENAI_BASEURL=${EMBEDDING_BASE_URL}
EMBEDDINGS_PROVIDER=openai # so heißt die Variablen-Gruppe intern
EMBEDDINGS_MODEL=${EMBEDDINGS_MODEL}
#===================================================#
User System
#===================================================#
#========================#
Moderation
#========================#
OPENAI_MODERATION=false
OPENAI_MODERATION_API_KEY=
OPENAI_MODERATION_REVERSE_PROXY=
BAN_VIOLATIONS=true
BAN_DURATION=1000 * 60 * 60 * 2
BAN_INTERVAL=20
LOGIN_VIOLATION_SCORE=1
REGISTRATION_VIOLATION_SCORE=1
CONCURRENT_VIOLATION_SCORE=1
MESSAGE_VIOLATION_SCORE=1
NON_BROWSER_VIOLATION_SCORE=20
LOGIN_MAX=7
LOGIN_WINDOW=5
REGISTER_MAX=5
REGISTER_WINDOW=60
LIMIT_CONCURRENT_MESSAGES=true
CONCURRENT_MESSAGE_MAX=2
LIMIT_MESSAGE_IP=true
MESSAGE_IP_MAX=40
MESSAGE_IP_WINDOW=1
LIMIT_MESSAGE_USER=false
MESSAGE_USER_MAX=40
MESSAGE_USER_WINDOW=1
ILLEGAL_MODEL_REQ_SCORE=5
#========================#
Balance
#========================#
CHECK_BALANCE=false
START_BALANCE=20000 # note: the number of tokens that will be credited after registration.
#========================#
Registration and Login
#========================#
ALLOW_EMAIL_LOGIN=true
ALLOW_REGISTRATION=true
ALLOW_SOCIAL_LOGIN=true
ALLOW_SOCIAL_REGISTRATION=true
ALLOW_PASSWORD_RESET=false
ALLOW_ACCOUNT_DELETION=true # note: enabled by default if omitted/commented out
ALLOW_UNVERIFIED_EMAIL_LOGIN=true
SESSION_EXPIRY=1000 * 60 * 15
REFRESH_TOKEN_EXPIRY=(1000 * 60 * 60 * 24) * 7
JWT_SECRET=xxx
JWT_REFRESH_SECRET=xxx
OpenID / Entra ID
OPENID_ENABLED=true
OPENID_ISSUER=xxx
OPENID_CLIENT_ID=xx
OPENID_CLIENT_SECRET=xxx
OPENID_REDIRECT_URI=xxx
OPENID_SCOPES="openid profile email"
Set to determine which user info property returned from OpenID Provider to store as the User's username
OPENID_USERNAME_CLAIM=upn
Set to determine which user info property returned from OpenID Provider to store as the User's name
OPENID_NAME_CLAIM=name
OPENID_BUTTON_LABEL="Login mit Microsoft"
OPENID_IMAGE_URL="https://cdn-icons-png.flaticon.com/512/732/732221.png" # Beispiel-Icon
Set to true to automatically redirect to the OpenID provider when a user visits the login page
This will bypass the login form completely for users, only use this if OpenID is your only authentication method
OPENID_AUTO_REDIRECT=false
Set to true to use PKCE (Proof Key for Code Exchange) for OpenID authentication
OPENID_USE_PKCE=false
#Set to true to reuse openid tokens for authentication management instead of using the mongodb session and the custom refresh token.
OPENID_REUSE_TOKENS=false
#By default, signing key verification results are cached in order to prevent excessive HTTP requests to the JWKS endpoint.
#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.
#Default is true.
OPENID_JWKS_URL_CACHE_ENABLED=true
OPENID_JWKS_URL_CACHE_TIME=600000 # ms eq to 10 minutes leave empty to disable caching
#Set to true to trigger token exchange flow to acquire access token for the userinfo endpoint.
OPENID_ON_BEHALF_FLOW_FOR_USERINFRO_REQUIRED=
OPENID_ON_BEHALF_FLOW_USERINFRO_SCOPE = "user.read" # example for Scope Needed for Microsoft Graph API
Set to true to use the OpenID Connect end session endpoint for logout
OPENID_USE_END_SESSION_ENDPOINT=
VITE_OPENID_ENABLED=true
VITE_OPENID_BUTTON_LABEL="Login mit Microsoft"
VITE_OPENID_IMAGE_URL="https://cdn-icons-png.flaticon.com/512/732/732221.png"
#========================#
Email Password Reset
#========================#
EMAIL_SERVICE=
EMAIL_HOST=
EMAIL_PORT=25
EMAIL_ENCRYPTION=
EMAIL_ENCRYPTION_HOSTNAME=
EMAIL_ALLOW_SELFSIGNED=
EMAIL_USERNAME=
EMAIL_PASSWORD=
EMAIL_FROM_NAME=
EMAIL_FROM=[email protected]
#========================#
Shared Links
#========================#
ALLOW_SHARED_LINKS=true
ALLOW_SHARED_LINKS_PUBLIC=true
#===================================================#
UI
#===================================================#
APP_TITLE=LibreChat KiGate ZALF e.V.
CUSTOM_FOOTER="My custom footer"
HELP_AND_FAQ_URL=https://librechat.ai
SHOW_BIRTHDAY_ICON=true
Google tag manager id
#ANALYTICS_GTM_ID=user provided google tag manager id
#===============#
REDIS Options
#===============#
REDIS_URI=xxx
USE_REDIS=true
USE_REDIS_CLUSTER=true
REDIS_CA=/path/to/ca.crt
#======================#
Web Search
#======================#
WEBSEARCH_ENABLED=true
WEBSEARCH_PROVIDER=serper
Search Provider (Required)
SERPER_API_KEY="xxx"
Scraper (Required)
FIRECRAWL_API_KEY="xxx"
Optional: Custom Firecrawl API URL
FIRECRAWL_API_URL=your_firecrawl_api_url
Reranker (Required)
JINA_API_KEY="xxx"
Librechat.YAML:
-------------------------------------------------
LibreChat Hauptkonfiguration
-------------------------------------------------
version: 1.2.1
cache: true
-------------------------------------------------
Endpoints
-------------------------------------------------
endpoints:
1) Custom-Endpoints (GWDG /v2 – „inference-service“-Header)
custom:
- name: Chat AI openai-gpt41
apiKey: ${CHAT_AI_API_KEY}
baseURL: https://chat-ai.academiccloud.de/v2
headers: { inference-service: openai-gpt41 }
models: { default: [openai-gpt41], fetch: false }
stream: false
vision: false
titleConvo: true
titleModel: current_model
-------------------------------------------------
Interface-Optionen (unverändert zu vorher)
-------------------------------------------------
interface:
customWelcome: "Willkommen auf ZALF KI / Welcome to ZALF AI"
privacyPolicy: { externalUrl: https://librechat.ai/privacy-policy, openNewTab: true }
termsOfService:
externalUrl: https://librechat.ai/tos
openNewTab: true
modalAcceptance: true
modalTitle: "Terms of Service for LibreChat"
modalContent: |
(… Text gekürzt …)
endpointsMenu: true
modelSelect: true
parameters: true
sidePanel: true
presets: true
prompts: true
bookmarks: true
multiConvo: true
agents: true
-------------------------------------------------
registration:
socialLogins: [github, google, discord, openid, facebook, apple]
actions:
allowedDomains: [swapi.dev, librechat.ai, google.com]
fileConfig:
serverFileSizeLimit: 50 # maximale Größe pro Anfrage (MB)
endpoints:
default:
fileLimit: 5 # max. 5 Dateien pro Nachricht
fileSizeLimit: 20 # max. 20 MB pro Datei
totalSizeLimit: 50 # max. 50 MB gesamt
supportedMimeTypes:
- application/pdf
- text/plain
- text/csv
- application/json
Docker compose:
version: "3.9"
services:
############################################################
LibreChat-Backend
############################################################
api:
container_name: librechat
# Wenn du lieber das offizielle Image nutzen willst, auskommentieren:
image: ghcr.io/danny-avila/librechat-dev:latest
build:
############################################################
Datenbanken
############################################################
mongodb:
container_name: chat-mongodb
image: mongo
restart: unless-stopped
user: "${UID}:${GID}"
volumes:
- ./data-node:/data/db
command: ["mongod", "--noauth"]
meilisearch:
container_name: chat-meilisearch
image: getmeili/meilisearch:v1.12.3
restart: unless-stopped
user: "${UID}:${GID}"
env_file:
- .env # liest MEILI_MASTER_KEY
environment:
MEILI_NO_ANALYTICS: "true"
volumes:
- ./meili_data_v1.12:/meili_data
vectordb:
container_name: vectordb
image: ankane/pgvector:latest
restart: unless-stopped
environment:
POSTGRES_DB: xxx
POSTGRES_USER: xxx
POSTGRES_PASSWORD: xxx
volumes:
- pgdata2:/var/lib/postgresql/data
############################################################
RAG-API (volle Version, kann GWDG/OpenAI ansprechen)
############################################################
rag_api:
container_name: rag_api
image: ghcr.io/danny-avila/librechat-rag-api-dev:latest
restart: unless-stopped
depends_on:
- vectordb
volumes:
pgdata2:
HELP?!?!
Thank you in advance!!!
Best Teclablue
Version Information
root@srv-pr-ki2:/home/sos/LibreChat# docker images | grep librechat
ghcr.io/danny-avila/librechat-dev latest 7ffcb513e668 4 days ago 1.11GB
librechat_api latest 554be69c408a 4 days ago 972MB
ghcr.io/danny-avila/librechat v0.7.9-rc1 3d0aff522ece 5 days ago 1.11GB
ghcr.io/danny-avila/librechat-rag-api-dev latest eb981aff60a5 2 weeks ago 7.86GB
ghcr.io/danny-avila/librechat-dev 4af29672793f 7 weeks ago 1.03GB
ghcr.io/danny-avila/librechat latest 17cfdb1df083 2 months ago 1.02GB
ghcr.io/danny-avila/librechat-rag-api-dev-lite latest e7da8e6aca0f 2 months ago 1.31GB
ghcr.io/danny-avila/librechat v0.7.1 d16209914198 14 months ago 1.42GB
Steps to Reproduce
see above
What browsers are you seeing the problem on?
Firefox
Relevant log output
Which logs are needed?
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions