Repository navigation
Use /session for status account info, fall back to /v3/session on older servers - #117
sreedharsreeram wants to merge 1 commit into
Conversation
…er servers The API now serves the session endpoint unversioned at /session and keeps /v3/session as a deprecated alias. Try /session first; if the server predates it, the request yields nothing and /v3/session is used. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Requesting a change in Please preserve enough response information to fall back only for the explicit compatibility condition (normally 404; account for the scoped-key legacy 403 behavior described on supermemory#1839 if this client supports scoped keys). Add tests for canonical success, compatibility fallback, and a representative non-fallback failure. |
|
P2 — Fall back only when
|
What
The Supermemory API now serves the session endpoint unversioned at
/sessionand keeps/v3/sessionas a deprecated alias (supermemoryai/mono#3626).statusnow looks up account info via/sessionfirst and falls back to/v3/sessionwhen the server predates it.src/cli.ts:getAccountInfotries/session, then/v3/session.Compatibility
/v3/session./session404s there,fetchJsonreturns null, and/v3/sessionis used. One extra request on old servers only.Note: the repo's v5 migration chose explicit
apiVersionselection "without failed-request fallback". This PR uses a fallback for this one read-only call; happy to switch it to theapiVersiongate if preferred.Verification
bun run typecheck,bun test(33/33).bun src/cli.ts statusagainst a local API on the new path and against a shim that 404s/session: account details resolve in both; the shim log shows404 GET /sessionthenGET /v3/session.🤖 Generated with Claude Code