Skip to content

Commit 4abfeb4

Browse files
committed
fix(agents): restore strict guard for projections with diagnostics
Accidentally removed in the session-memory fix; the 3-line guard returns false when unreadable tools produce projection diagnostics.
1 parent 04b6c81 commit 4abfeb4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/agents/openai-tool-schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ export function resolveOpenAIStrictToolFlagForProjection(
318318
if (strict !== true) {
319319
return strict === false ? false : undefined;
320320
}
321+
if (projection.diagnostics.length > 0) {
322+
return false;
323+
}
321324
return projection.tools.every((tool) => isStrictOpenAIJsonSchemaCompatible(tool.parameters));
322325
}
323326

0 commit comments

Comments
 (0)