🐛 fix: Assistants Endpoint Handling in createPayload Function (#8123)

* 📦 chore: bump librechat-data-provider version to 0.7.89

* 🐛 fix: Assistants endpoint handling in createPayload function
This commit is contained in:
Danny Avila 2025-06-28 12:33:43 -04:00 committed by GitHub
parent dd67e463e4
commit 1060ae8040
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

2
package-lock.json generated
View file

@ -46717,7 +46717,7 @@
}, },
"packages/data-provider": { "packages/data-provider": {
"name": "librechat-data-provider", "name": "librechat-data-provider",
"version": "0.7.88", "version": "0.7.89",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"axios": "^1.8.2", "axios": "^1.8.2",

View file

@ -1,6 +1,6 @@
{ {
"name": "librechat-data-provider", "name": "librechat-data-provider",
"version": "0.7.88", "version": "0.7.89",
"description": "data services for librechat apps", "description": "data services for librechat apps",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/index.es.js", "module": "dist/index.es.js",

View file

@ -13,16 +13,17 @@ export default function createPayload(submission: t.TSubmission) {
ephemeralAgent, ephemeralAgent,
} = submission; } = submission;
const { conversationId } = s.tConvoUpdateSchema.parse(conversation); const { conversationId } = s.tConvoUpdateSchema.parse(conversation);
const { endpoint: _e } = endpointOption as { const { endpoint: _e, endpointType } = endpointOption as {
endpoint: s.EModelEndpoint; endpoint: s.EModelEndpoint;
endpointType?: s.EModelEndpoint; endpointType?: s.EModelEndpoint;
}; };
const endpoint = _e as s.EModelEndpoint; const endpoint = _e as s.EModelEndpoint;
let server = `${EndpointURLs[s.EModelEndpoint.agents]}/${endpoint}`; let server = `${EndpointURLs[s.EModelEndpoint.agents]}/${endpoint}`;
if (s.isAssistantsEndpoint(endpoint)) {
if (isEdited && s.isAssistantsEndpoint(endpoint)) { server =
server += '/modify'; EndpointURLs[(endpointType ?? endpoint) as 'assistants' | 'azureAssistants'] +
(isEdited ? '/modify' : '');
} }
const payload: t.TPayload = { const payload: t.TPayload = {