-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
🏷️ feat: Request Body Placeholders in Custom 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
🏷️ feat: Request Body Placeholders in Custom Headers #8601
Conversation
b6162a6
to
2dfb523
Compare
e9416c9
to
cfe699d
Compare
cfe699d
to
9d33ce3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good!
ca0bd4e
to
1d55f8a
Compare
fd8ec0a
to
3a8bd57
Compare
Hi @danny-avila, Could you please review? |
ee3e954
to
a7905eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the guidance! I've moved the logic to env.ts and added tests in env.spec.ts. Happy to adjust further if needed
I'll continue on from where you guys left off here and resolve the rest of Danny's requested changes. Thanks for the work done so far! |
- 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.
…aders - Add {{LIBRECHAT_BODY_*}} placeholders for conversationId, parentMessageId, messageId - Update tests to reflect new body placeholder functionality
6fd4531
to
d37db43
Compare
Docs PR: LibreChat-AI/librechat.ai#386 |
Hi Gopal, just resolving the final conflicts right now. |
Hi @danny-avila, Could you please review? |
Hi @danny-avila, really appreciate your earlier reviews and guidance. When you have a moment, could you take another look? |
Moved to #9095 |
Summary
feat: add support for request body placeholders in custom endpoint headers
Change Type
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_BODY_CONVERSATIONID}}"
Checklist