fix: preserve upstream model errors and native request parameters
This commit is contained in:
@@ -12,6 +12,7 @@ export const DEFAULT_CONFIG = {
|
||||
export function cleanConfig(value = {}) {
|
||||
const result = { ...DEFAULT_CONFIG };
|
||||
for (const key of Object.keys(result)) if (Object.hasOwn(value, key)) result[key] = value[key];
|
||||
for (const key of ['nativeParameters', 'outputTokenField']) if (Object.hasOwn(value, key)) result[key] = structuredClone(value[key]);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user