🤖 fix: Azure Agents after Upstream Breaking Change (#5571)

* 🤖 fix: Azure Agents after Upstream Breaking Change

* chore: bump @langchain/core & @librechat/agents

* fix: correct formatting in assistant actions update logic and use correctly filtered actions variable

* fix: linting errors
This commit is contained in:
Danny Avila 2025-01-31 09:50:49 -05:00 committed by GitHub
parent e1a6268904
commit 6920e23fb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 48 additions and 471 deletions

View file

@ -105,12 +105,7 @@ router.post('/:assistant_id', async (req, res) => {
if (!assistant_data) {
assistantUpdateData.user = req.user.id;
}
promises.push(
updateAssistantDoc(
{ assistant_id },
assistantUpdateData,
)
);
promises.push(updateAssistantDoc({ assistant_id }, assistantUpdateData));
// Only update user field for new actions
const actionUpdateData = { metadata, assistant_id };
@ -191,16 +186,11 @@ router.delete('/:assistant_id/:action_id/:model', async (req, res) => {
const promises = [];
// Only update user field if assistant document doesn't exist
const assistantUpdateData = { actions };
const assistantUpdateData = { actions: updatedActions };
if (!assistant_data) {
assistantUpdateData.user = req.user.id;
}
promises.push(
updateAssistantDoc(
{ assistant_id },
assistantUpdateData,
),
);
promises.push(updateAssistantDoc({ assistant_id }, assistantUpdateData));
promises.push(deleteAction({ action_id }));
await Promise.all(promises);