Skip to content

docs: add warning and troubleshooting for self-hosted LLM provider config bug (#1577) - #1605

Open
Adityakk9031 wants to merge 1 commit into
supermemoryai:mainfrom
Adityakk9031:fix/issue-1577-model-provider-init-bug
Open

docs: add warning and troubleshooting for self-hosted LLM provider config bug (#1577)#1605
Adityakk9031 wants to merge 1 commit into
supermemoryai:mainfrom
Adityakk9031:fix/issue-1577-model-provider-init-bug

Conversation

@Adityakk9031

Copy link
Copy Markdown
Contributor

Resolves #1577.

Description

Adds a troubleshooting section to the self-hosted configuration documentation, explaining the root cause and workaround for the [llm] No model provider configured\ error on document processing.

Root Cause

During binary compilation of \supermemory-server\ with Bun (\�un build --compile), environment variables like \process.env.OPENAI_API_KEY\ are evaluated and inlined at compile/build time (resolved to \undefined\ or default values on CI/CD runner environments).
At runtime:

  1. The memoized setup module (\s55()) runs exactly once when server modules are loaded and uses these inlined references, causing the internal LLM registry to construct model factories with
    ull\ keys.
  2. Inside sandboxed background execution environments (like Miniflare/workerd running the \IngestContentWorkflow), \process.env\ is not propagated from the host process unless explicitly configured as bindings.
  3. This creates a disconnect where \supermemory-server doctor\ reports successful configuration (as it connects to the database store directly), but runtime memory generation crashes.

Workaround Documented

  • Always launch the server using the generated wrapper script (~/.local/bin/supermemory-server), which properly exports keys from ~/.supermemory/env\ using \set -a.
  • Explicitly inject keys into the parent environment if using process managers (systemd/PM2) or Docker.

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.

[Bug]: v0.0.8 self-hosted memory generation fails with No model provider configured while doctor detects OpenAI

1 participant