fix: use x-api-key auth header for Claude plugin API requests#37
Open
Ramyprojs wants to merge 1 commit intosupermemoryai:mainfrom
Open
fix: use x-api-key auth header for Claude plugin API requests#37Ramyprojs wants to merge 1 commit intosupermemoryai:mainfrom
Ramyprojs wants to merge 1 commit intosupermemoryai:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: use
x-api-keyauth header for Supermemory API requestsRelated: supermemoryai/supermemory#801
Problem
The plugin was sending
Authorization: Bearer <key>to Supermemory API endpoints that requirex-api-key. This caused all save, search, and profile operations to silently fail even when a valid API key was configured — so nothing was ever actually stored.Root Cause
The plugin client was relying on the SDK's default auth behavior, which sends
Authorization: Bearer. For direct API calls in this integration path, the API expectsx-api-keyinstead.Changes
src/lib/supermemory-client.js— setx-api-keyas the default auth header and explicitly override the SDK's Bearer behaviorplugin/scripts/*.cjs— rebuilt all runtime bundles so the fix is reflected in the shipped plugin artifactsSafety
Only the auth header was changed. The API key source, validation flow, and all other request headers are untouched.
Verification
add-memory,search-memory,context-hook,summary-hook,save-project-memory) confirmed to includex-api-keyScope Note
Issue #801 also reports Cloudflare/platform availability problems — those are server-side and out of scope here. This PR addresses only the plugin auth-header bug.
Checklist
x-api-key