feat: LangDB AI Custom Endpoint and conversationId as headers #8647
+68
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
LangDB AI Custom Endpoint Integration
Added configuration for the LangDB AI custom endpoint in librechat.example.yaml. This enables LibreChat users to connect directly to the LangDB API and utilize its specialized models with settings for headers, model display, and title conversations.
Key additions:
{{LIBRECHAT_CONVERSATION_ID}}
placeholderHeaders for LangDB User Tracking:
LangDB offers comprehensive user tracking using these headers:
x-project-id
: Project identification for API accessx-user-id
: User identification for session trackingx-user-name
: User display name for personalizationx-email
: User email for account managementx-user-tiers
: User role/permission levelx-thread-id
: Conversation context using {{LIBRECHAT_CONVERSATION_ID}} placeholderThese headers enable LangDB to provide personalized experiences, track usage patterns, and maintain conversation context across sessions.
Change Type
Please delete any irrelevant options.
Testing
Tested the LangDB AI endpoint configuration by setting up the API connection with provided keys and verifying model fetching, header configurations, and response outputs. Validated model retrieval and display settings align with LangDB model responses.
Test Configuration:
LANGDB_API_KEY
andLANGDB_PROJECT_ID
for testinghttps://api.us-east-1.langdb.ai
openai/gpt-4.1-nano
Checklist
Please delete any irrelevant options.