Skip to content

feat(tools): apiKey option, type re-exports, and two reliability fixes - #1594

Merged
graphite-app[bot] merged 1 commit into
mainfrom
feat/openai-middleware-apikey
Aug 24, 2026
Merged

feat(tools): apiKey option, type re-exports, and two reliability fixes#1594
graphite-app[bot] merged 1 commit into
mainfrom
feat/openai-middleware-apikey

Conversation

@MaheshtheDev

@MaheshtheDev MaheshtheDev commented Aug 24, 2026

Copy link
Copy Markdown
Member

Cherry-picks four contributor PRs for @supermemory/tools onto one branch, and bumps the package to 2.2.0.

Dropped the middleware.test.ts added by #1244. Note that editing packages/tools/package.json triggers the npm publish workflow on merge.

Co-Authored-By: rajarshidattapy 138959719+rajarshidattapy@users.noreply.github.com
Co-Authored-By: Agnik47 140933190+Agnik47@users.noreply.github.com
Co-Authored-By: abhinav7x94 204053250+abhinav7x94@users.noreply.github.com

Copy link
Copy Markdown
Member Author

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.

@MaheshtheDev MaheshtheDev changed the title feat(openai): add support for API key in middleware options and validation feat(tools): accept a programmatic apiKey in the OpenAI integration Aug 24, 2026
@MaheshtheDev MaheshtheDev changed the title feat(tools): accept a programmatic apiKey in the OpenAI integration feat(tools): apiKey option, type re-exports, and two reliability fixes Aug 24, 2026
@MaheshtheDev
MaheshtheDev force-pushed the feat/openai-middleware-apikey branch 2 times, most recently from 2d19164 to 5b10659 Compare August 24, 2026 22:10
@MaheshtheDev
MaheshtheDev marked this pull request as ready for review August 24, 2026 22:11
@claude

claude Bot commented Aug 24, 2026

Copy link
Copy Markdown

Claude finished @MaheshtheDev's task in 1m 36s —— View job


Review Complete

  • Load MCP tools
  • Get PR diff and review changed files
  • Check for existing review comments
  • Analyze code for bugs, security issues, and logic errors
  • Submit review

Result: No issues found. All four changes are correctly implemented — apiKey option threading, type re-exports, malformed JSON handling, and the VoltAgent await fix. Score: 10/10

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 24, 2026

Copy link
Copy Markdown

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 successful!
View logs
supermemory-mcp e4afc77 Aug 24 2026, 10:41 PM

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overview: Cherry-picks four contributor fixes into @supermemory/tools v2.2.0, adding options.apiKey support, type re-exports, malformed tool-call handling, and an awaited VoltAgent conversation save.

Issues found: None — this looks good to ship.

Details:

  • apiKey option — Correctly threads through the existing validateApiKey helper which falls back to process.env.SUPERMEMORY_API_KEY. The double validation in withSupermemorycreateOpenAIMiddleware is mildly redundant but not incorrect.

  • Type re-exports — Clean fix for the documented custom-template example that referenced unexported types from the non-published ./vercel subpath.

  • Malformed JSON handling (tools.ts) — Good defensive change. Returns a structured error result instead of throwing, preventing unhandled exceptions from corrupted tool arguments.

  • VoltAgent onEnd await — Correct fix for serverless reliability. The outer try-catch preserves error logging, so behavior is equivalent except the save is now guaranteed to complete before the handler returns.

Score: 10/10

@graphite-app

graphite-app Bot commented Aug 24, 2026

Copy link
Copy Markdown

Merge activity

#1594)

Cherry-picks four contributor PRs for `@supermemory/tools` onto one branch, and bumps the package to 2.2.0.

- #1244 (@rajarshidattapy): `withSupermemory` accepts `options.apiKey` instead of only reading `SUPERMEMORY_API_KEY`, matching the Vercel, Mastra and Voltagent integrations. Unblocks secrets managers, edge runtimes and per-request keys.
- #1574 (@Agnik47): re-exports `PromptTemplate`, `MemoryPromptData` and `WithSupermemoryOptions` from `ai-sdk`. `./vercel` is not a published subpath, so the documented custom-template example did not compile.
- #1488 (@abhinav7x94): malformed tool-call JSON returns an error result instead of throwing out of the request.
- #1507 (@abhinav7x94): VoltAgent `onEnd` awaits the conversation save, which was fire-and-forget and could be dropped when a serverless runtime tore down.

Dropped the `middleware.test.ts` added by #1244. Note that editing `packages/tools/package.json` triggers the npm publish workflow on merge.

Co-Authored-By: rajarshidattapy <138959719+rajarshidattapy@users.noreply.github.com>
Co-Authored-By: Agnik47 <140933190+Agnik47@users.noreply.github.com>
Co-Authored-By: abhinav7x94 <204053250+abhinav7x94@users.noreply.github.com>
@graphite-app
graphite-app Bot force-pushed the feat/openai-middleware-apikey branch from 5b10659 to e4afc77 Compare August 24, 2026 22:39
@graphite-app
graphite-app Bot merged commit e4afc77 into main Aug 24, 2026
6 of 7 checks passed
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.

2 participants