fix(confidence-engine): enforce openai strict object invariants
This commit is contained in:
+1
-1
@@ -171,7 +171,6 @@ function projectOpenAIStrictSchema(schema, zodSchema, rootSchema, visited) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (resolved.properties) resolved.required = Object.keys(resolved.properties);
|
||||
resolved.additionalProperties = false;
|
||||
}
|
||||
|
||||
@@ -182,6 +181,7 @@ function projectOpenAIStrictSchema(schema, zodSchema, rootSchema, visited) {
|
||||
for (const [key, property] of Object.entries(resolved.properties)) {
|
||||
projectOpenAIStrictSchema(property, shape?.[key], rootSchema, visited);
|
||||
}
|
||||
resolved.required = Object.keys(resolved.properties);
|
||||
}
|
||||
for (const branch of [
|
||||
...(resolved.anyOf ?? []),
|
||||
|
||||
Reference in New Issue
Block a user