Add local model connector options for local server#90
Open
seagpt wants to merge 1 commit into
Open
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.
Summary
Adds first-class local model connector options for the local Supermemory launcher and
Supermemory.local()startup path.This keeps the local server's existing OpenAI-compatible model-provider interface, but makes common local runtimes explicit:
Supermemory.local({ localModel: ... })TypeScript options for programmatic startupOPENAI_API_KEYfallback for local endpoints that ignore bearer tokensWhy
The local server already supports OpenAI-compatible model routing through env vars such as
OPENAI_BASE_URL,OPENAI_MODEL,OPENAI_FAST_MODEL, andOPENAI_TEXT_MODEL. In practice, users running fully local memory stacks need a documented, typed way to point Supermemory at Ollama / LM Studio / llama.cpp / vLLM without falling back to hosted LLMs or manual env glue.Validation
Ran locally:
node --check bin/clienv -u SUPERMEMORY_API_KEY corepack yarn test --runInBand tests/index.test.ts→ 52 passedenv -u SUPERMEMORY_API_KEY ./node_modules/typescript/bin/tscenv -u SUPERMEMORY_API_KEY corepack yarn build→ successgit diff --checkI also smoke-tested the patched CLI against a local llama.cpp/OpenAI-compatible endpoint via
--llamacpp-model+--llamacpp-url; the local server started, accepted a document, used local embeddings, issued a/v1/responsesrequest to the configured local endpoint, and search found the inserted test document.Notes / known limitation
This PR only adds the connector/configuration surface. During local smoke testing, the self-hosted memory-agent path still failed after receiving a local Responses API function-call response, even though document add/list/search and local embeddings worked. That appears to be a deeper local-server/model-agent compatibility issue rather than SDK routing, and likely belongs in the server implementation rather than this SDK launcher patch.