From 8a4376fc174949750100238e2b3afafca523ff2e Mon Sep 17 00:00:00 2001 From: Dustin Healy <54083382+dustinhealy@users.noreply.github.com> Date: Mon, 7 Jul 2025 08:19:54 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20docs:=20Update=20Custom=20Endpoi?= =?UTF-8?q?nt=20docs=20with=20new=20user=20placeholder=20features=20for=20?= =?UTF-8?q?headers=20(#338)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../changelog/content/config_v1.2.8.mdx | 5 +++- .../object_structure/custom_endpoint.mdx | 27 ++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/components/changelog/content/config_v1.2.8.mdx b/components/changelog/content/config_v1.2.8.mdx index 9eac0ac..a6468f3 100644 --- a/components/changelog/content/config_v1.2.8.mdx +++ b/components/changelog/content/config_v1.2.8.mdx @@ -15,4 +15,7 @@ - Allows users to securely provide their own API keys and credentials for MCP servers - Configurable through UI via settings icon in tool selection or MCP Settings panel - Ensures authentication details remain private in multi-user environments - - See: [MCP Servers Object Structure - customUserVars](/docs/configuration/librechat_yaml/object_structure/mcp_servers#customuservars) \ No newline at end of file + - See: [MCP Servers Object Structure - customUserVars](/docs/configuration/librechat_yaml/object_structure/mcp_servers#customuservars) +- Added user placeholder variables support to Custom Endpoint Headers: + - Users can now use `{{LIBRECHAT_USER_ID}}`, `{{LIBRECHAT_USER_EMAIL}}`, and other user field placeholders in custom endpoint headers + - See: [Custom Endpoint Object Structure - Headers](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#headers) for details \ No newline at end of file diff --git a/pages/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx b/pages/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx index 684b95f..129c315 100644 --- a/pages/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx +++ b/pages/docs/configuration/librechat_yaml/object_structure/custom_endpoint.mdx @@ -346,7 +346,7 @@ dropParams: **Key:** @@ -355,9 +355,34 @@ dropParams: headers: x-api-key: "${ENVIRONMENT_VARIABLE}" Content-Type: "application/json" + X-User-ID: "{{LIBRECHAT_USER_ID}}" + X-User-Email: "{{LIBRECHAT_USER_EMAIL}}" ``` **Note:** Supports dynamic environment variable values, which use the format: `"${VARIABLE_NAME}"`. + +**Available User Field Placeholders:** + +| Placeholder | User Field | Type | Description | +|------------|------------|------|-------------| +| `{{LIBRECHAT_USER_ID}}` | `id` | String | User's unique identifier | +| `{{LIBRECHAT_USER_NAME}}` | `name` | String | User's display name | +| `{{LIBRECHAT_USER_USERNAME}}` | `username` | String | User's username | +| `{{LIBRECHAT_USER_EMAIL}}` | `email` | String | User's email address | +| `{{LIBRECHAT_USER_PROVIDER}}` | `provider` | String | Authentication provider (e.g., "email", "google", "github") | +| `{{LIBRECHAT_USER_ROLE}}` | `role` | String | User's role (e.g., "user", "admin") | +| `{{LIBRECHAT_USER_GOOGLEID}}` | `googleId` | String | Google account ID | +| `{{LIBRECHAT_USER_FACEBOOKID}}` | `facebookId` | String | Facebook account ID | +| `{{LIBRECHAT_USER_OPENIDID}}` | `openidId` | String | OpenID account ID | +| `{{LIBRECHAT_USER_SAMLID}}` | `samlId` | String | SAML account ID | +| `{{LIBRECHAT_USER_LDAPID}}` | `ldapId` | String | LDAP account ID | +| `{{LIBRECHAT_USER_GITHUBID}}` | `githubId` | String | GitHub account ID | +| `{{LIBRECHAT_USER_DISCORDID}}` | `discordId` | String | Discord account ID | +| `{{LIBRECHAT_USER_APPLEID}}` | `appleId` | String | Apple account ID | +| `{{LIBRECHAT_USER_EMAILVERIFIED}}` | `emailVerified` | Boolean → String | Email verification status ("true" or "false") | +| `{{LIBRECHAT_USER_TWOFACTORENABLED}}` | `twoFactorEnabled` | Boolean → String | 2FA status ("true" or "false") | +| `{{LIBRECHAT_USER_TERMSACCEPTED}}` | `termsAccepted` | Boolean → String | Terms acceptance status ("true" or "false") | + ## directEndpoint **Key:**