Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
patch 28 lines 1.39 KB
Raw
1 diff --git a/dist/index.js b/dist/index.js
2 index b8c857b..2c2726a 100644
3 --- a/dist/index.js
4 +++ b/dist/index.js
5 @@ -5444,7 +5444,8 @@ var OpenAISchemaCompatLayer = class extends SchemaCompatLayer3 {
6 ];
7 }
8 if (isObjectSchema(schema)) {
9 - schema.additionalProperties = false;
10 + const isOpenMap = Object.keys(schema.properties ?? {}).length === 0 && (schema.additionalProperties === true || (typeof schema.additionalProperties === "object" && schema.additionalProperties !== null));
11 + if (!isOpenMap) schema.additionalProperties = false;
12 if (schema.properties) {
13 for (const key of Object.keys(schema.properties)) {
14 const prop = schema.properties[key];
15 diff --git a/dist/index.cjs b/dist/index.cjs
16 index c9d2329..9de7be8 100644
17 --- a/dist/index.cjs
18 +++ b/dist/index.cjs
19 @@ -5444,7 +5444,8 @@ var OpenAISchemaCompatLayer = class extends SchemaCompatLayer3 {
20 ];
21 }
22 if (isObjectSchema(schema)) {
23 - schema.additionalProperties = false;
24 + const isOpenMap = Object.keys(schema.properties ?? {}).length === 0 && (schema.additionalProperties === true || (typeof schema.additionalProperties === "object" && schema.additionalProperties !== null));
25 + if (!isOpenMap) schema.additionalProperties = false;
26 if (schema.properties) {
27 for (const key of Object.keys(schema.properties)) {
28 const prop = schema.properties[key];