Skip to content

Conversation

@MaheshtheDev
Copy link
Member

No description provided.

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
supermemory-app ea1f232 Jan 23 2026, 03:10 AM

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 23, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
⛔ Deployment terminated
View logs
supermemory-app 0853bc8 Jan 23 2026, 03:37 AM

@MaheshtheDev MaheshtheDev marked this pull request as ready for review January 23, 2026 03:11
@graphite-app graphite-app bot requested a review from Dhravya January 23, 2026 03:11
Copy link
Member Author

MaheshtheDev commented Jan 23, 2026


How to use the Graphite Merge Queue

Add the label Main to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Jan 23, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

1 similar comment
@claude
Copy link

claude bot commented Jan 23, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@graphite-app
Copy link

graphite-app bot commented Jan 23, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the 01-22-feat_tools_package_strict_mode_for_openai_models branch from ea1f232 to 0853bc8 Compare January 23, 2026 03:15
@graphite-app graphite-app bot merged commit 0853bc8 into main Jan 23, 2026
3 of 6 checks passed
Comment on lines +19 to +22
* Enable strict schema mode for OpenAI strict validation.
* When true, all schema properties are required (satisfies OpenAI strict mode).
* When false (default), optional fields remain optional for maximum compatibility.
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The strict configuration option is ignored by the OpenAI tools in openai/tools.ts. The schema remains static, not enforcing required fields as expected.
Severity: HIGH

Suggested Fix

Modify the OpenAI tools in packages/tools/src/openai/tools.ts to dynamically generate the tool schema based on the strict flag in the configuration. This involves changing memoryToolSchemas from a hardcoded constant to a function that accepts the config and adjusts the required fields array accordingly, ensuring consistent behavior with the AI SDK implementation.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/tools/src/types.ts#L19-L22

Potential issue: The `strict` configuration option, added to `SupermemoryToolsConfig`,
is correctly implemented for the AI SDK tools but is silently ignored by the OpenAI
tools in `packages/tools/src/openai/tools.ts`. Functions like `createSearchMemoriesTool`
accept a `config` object but use a hardcoded schema that does not become stricter when
`config.strict` is `true`. This leads to a discrepancy where users enabling strict mode
for OpenAI tools will not get the expected schema validation, causing potential runtime
validation errors with services like OpenAI's strict mode, contrary to the feature's
documented purpose.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants