mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-27 04:07:05 +00:00
* fix: Header and Environment Variable Handling Bug from #9931 * refactor: Remove warning log for missing tokens in extractOpenIDTokenInfo function * feat: Enhance resolveNestedObject function for improved placeholder processing - Added a new function `resolveNestedObject` to recursively process nested objects, replacing placeholders in string values while preserving the original structure. - Updated `createTestUser` to use `IUser` type and modified user ID generation. - Added comprehensive unit tests for `resolveNestedObject` to cover various scenarios, including nested structures, arrays, and custom user variables. - Improved type handling in `processMCPEnv` to ensure correct processing of mixed numeric and placeholder values. * refactor: Remove unnecessary manipulation of Bedrock options introduced in #9931 - Eliminated the resolveHeaders function call from the getOptions method in options.js, as it was no longer necessary for processing additional model request fields. - This change simplifies the code and improves maintainability.
This commit is contained in:
parent
03955bd5cf
commit
35319c1354
4 changed files with 690 additions and 21 deletions
|
|
@ -1,4 +1,3 @@
|
|||
const { resolveHeaders } = require('@librechat/api');
|
||||
const { HttpsProxyAgent } = require('https-proxy-agent');
|
||||
const {
|
||||
AuthType,
|
||||
|
|
@ -89,14 +88,6 @@ const getOptions = async ({ req, overrideModel, endpointOption }) => {
|
|||
llmConfig.endpointHost = BEDROCK_REVERSE_PROXY;
|
||||
}
|
||||
|
||||
if (llmConfig.additionalModelRequestFields) {
|
||||
llmConfig.additionalModelRequestFields = resolveHeaders({
|
||||
headers: llmConfig.additionalModelRequestFields,
|
||||
user: req.user,
|
||||
body: req.body,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
/** @type {BedrockClientOptions} */
|
||||
llmConfig,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue