这是indexloc提供的服务,不要输入任何密码
Skip to content

feat: Add conversation ID support to custom endpoint headers #8601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

s10gopal
Copy link

@s10gopal s10gopal commented Jul 22, 2025

Summary

Enables custom endpoints to access conversation context using {{LIBRECHAT_CONVERSATION_ID}} placeholder

  • Add LIBRECHAT_CONVERSATION_ID to customUserVars when provided
  • Pass conversation ID to header resolution for dynamic headers
  • Add comprehensive test coverage

Change Type

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Testing

Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.

Test Configuration:

endpoints:
custom:
- name: 'customllm'
apiKey: 'KEY'
baseURL: 'http://host.docker.internal:8001/v1'
models:
default:
[
'mycustommodel'
]
fetch: false
titleConvo: true
titleModel: 'current_model'
modelDisplayLabel: 'mycustommodel'
headers:
X-Conversation-ID: "{{LIBRECHAT_CONVERSATION_ID}}"

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

@s10gopal
Copy link
Author

#8017

@s10gopal s10gopal force-pushed the feat/custom-endpoint-conversation-id branch 3 times, most recently from b6162a6 to 2dfb523 Compare July 22, 2025 16:14
@s10gopal s10gopal force-pushed the feat/custom-endpoint-conversation-id branch 6 times, most recently from e9416c9 to cfe699d Compare July 23, 2025 17:31
@s10gopal s10gopal force-pushed the feat/custom-endpoint-conversation-id branch from cfe699d to 9d33ce3 Compare July 24, 2025 10:35
@s10gopal s10gopal requested a review from MrunmayS July 24, 2025 11:34
Copy link

@MrunmayS MrunmayS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good!

Gopal Sharma and others added 2 commits July 25, 2025 18:07
- Add LIBRECHAT_CONVERSATION_ID to customUserVars when provided
- Pass conversation ID to header resolution for dynamic headers
- Add comprehensive test coverage

Enables custom endpoints to access conversation context using {{LIBRECHAT_CONVERSATION_ID}} placeholder.
@s10gopal s10gopal force-pushed the feat/custom-endpoint-conversation-id branch from ca0bd4e to 1d55f8a Compare July 25, 2025 12:37
@s10gopal
Copy link
Author

#8017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants