mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🧩 fix(Plugins): Keep User agentModel and Model Validation (#1972)
* fix: do not override model * temp fix for secondary model validation
This commit is contained in:
parent
62834e18fb
commit
8bef084bfc
2 changed files with 1 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
|||
const { EModelEndpoint, CacheKeys, ViolationTypes } = require('librechat-data-provider');
|
||||
const { CacheKeys, ViolationTypes } = require('librechat-data-provider');
|
||||
const { loadModels } = require('~/server/controllers/ModelController');
|
||||
const { logViolation, getLogStores } = require('~/cache');
|
||||
const { handleError } = require('~/server/utils');
|
||||
|
|
@ -33,9 +33,6 @@ const validateModel = async (req, res, next) => {
|
|||
}
|
||||
|
||||
let validModel = !!availableModels.find((availableModel) => availableModel === model);
|
||||
if (endpoint === EModelEndpoint.gptPlugins) {
|
||||
validModel = validModel && availableModels.includes(req.body.agentOptions?.model);
|
||||
}
|
||||
|
||||
if (validModel) {
|
||||
return next();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue