You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LibreChat custom endpoint for an OpenAI-compatible gateway: YAML, .env and silent drops
#17275
To let each user bring their own key, use apiKey: 'user_provided'. LibreChat asks for it on first use and stores it encrypted.
3. Docker: mount the file
Copy docker-compose.override.yml.example to docker-compose.override.yml and uncomment the bind mount of ./librechat.yaml to /app/librechat.yaml. Then:
docker compose down && docker compose up -d
It should appear in the endpoint selector.
Troubleshooting: the endpoint never appears
LibreChat keeps a custom endpoint only if name, baseURL, apiKey and models are all present, and models has fetch: true or a non-empty default. A block that fails this check is dropped with no error and no log line. Check:
Spelling of those four keys, and that the block sits inside endpoints.custom.
name is unique. A second endpoint with the same name (case-insensitive) silently replaces the first.
Schema errors anywhere in librechat.yaml stop the server entirely. Run docker compose logs api.
Other errors
Missing API Key for APIGOTO: the ${APIGOTO_API_KEY} variable isn't in .env, or the container wasn't restarted.
404s: baseURL should end at /v1, not /v1/chat/completions.
Model list empty with fetch: true: some endpoints don't serve /models to every key. Put the IDs in default and set fetch: false.
A model rejects a parameter: list it under dropParams (the docs example drops stop).
We use one endpoint for several model families, with upstream failover (at most 3 retries) and a per-request log. Pay-as-you-go, BYOK supported: www.china-aiapi.com
For people running several custom endpoints: do you set titleModel to a cheap fixed model, or leave it on current_model?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I work on the APIGOTO team. APIGOTO is an independent OpenAI-compatible gateway, not affiliated with OpenAI, Anthropic, Google or LibreChat.
0. Check the endpoint first
curl https://api.china-aiapi.com/v1/models -H "Authorization: Bearer $KEY"1.
.env2.
librechat.yaml(keep your existingversion:line)To let each user bring their own key, use
apiKey: 'user_provided'. LibreChat asks for it on first use and stores it encrypted.3. Docker: mount the file
Copy
docker-compose.override.yml.exampletodocker-compose.override.ymland uncomment the bind mount of./librechat.yamlto/app/librechat.yaml. Then:docker compose down && docker compose up -dIt should appear in the endpoint selector.
Troubleshooting: the endpoint never appears
LibreChat keeps a custom endpoint only if
name,baseURL,apiKeyandmodelsare all present, andmodelshasfetch: trueor a non-emptydefault. A block that fails this check is dropped with no error and no log line. Check:endpoints.custom.nameis unique. A second endpoint with the same name (case-insensitive) silently replaces the first.librechat.yamlstop the server entirely. Rundocker compose logs api.Other errors
Missing API Key for APIGOTO: the${APIGOTO_API_KEY}variable isn't in.env, or the container wasn't restarted.baseURLshould end at/v1, not/v1/chat/completions.fetch: true: some endpoints don't serve/modelsto every key. Put the IDs indefaultand setfetch: false.dropParams(the docs example dropsstop).We use one endpoint for several model families, with upstream failover (at most 3 retries) and a per-request log. Pay-as-you-go, BYOK supported: www.china-aiapi.com
For people running several custom endpoints: do you set
titleModelto a cheap fixed model, or leave it oncurrent_model?All reactions