Skip to content

Commit 7210eea

Browse files
committed
chore: fallback to default plugin if provider name is not passed
1 parent 98ffb08 commit 7210eea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/handlers/handlerUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,11 @@ export function convertGuardrailsShorthand(guardrailsArr: any, type: string) {
214214
}
215215
});
216216

217+
hooksObject = convertKeysToCamelCase(hooksObject);
218+
217219
// Now, add all the checks to the checks array
218220
hooksObject.checks = Object.keys(guardrails).map((key) => ({
219-
id: key,
221+
id: key.includes('.') ? key : `default.${key}`,
220222
parameters: guardrails[key],
221223
}));
222224

@@ -991,6 +993,8 @@ export function constructConfigFromRequestHeaders(
991993
'checks',
992994
'vertex_service_account_json',
993995
'conditions',
996+
'input_guardrails',
997+
'output_guardrails',
994998
]) as any;
995999
}
9961000

0 commit comments

Comments
 (0)