Skip to content

[Bug]: SUPERMEMORY_EMBEDDING_PROVIDER and related env vars are ignored — embedding hardcoded to local #1336

Closed as not planned

Description

@DengHaitao-2022

Bug Description

The self-hosted Supermemory server ignores the SUPERMEMORY_EMBEDDING_PROVIDER, SUPERMEMORY_EMBEDDING_MODEL, SUPERMEMORY_EMBEDDING_DIMENSIONS, and SUPERMEMORY_EMBEDDING_BASE_URL environment variables documented at https://supermemory.ai/docs/self-hosting/embeddings. The embedding provider is hardcoded to local with model Xenova/bge-base-v1.5 (768d).

Environment Variables Not Read

The binary only references SUPERMEMORY_EMBEDDING_RAM_LIMIT — none of the following documented variables are present in the compiled binary:

  • SUPERMEMORY_EMBEDDING_PROVIDER
  • SUPERMEMORY_EMBEDDING_MODEL
  • SUPERMEMORY_EMBEDDING_DIMENSIONS
  • SUPERMEMORY_EMBEDDING_BASE_URL

Proof (binary analysis)

# Only EMBEDDING_RAM_LIMIT is found
strings /usr/local/bin/supermemory-server | grep -o "SUPERMEMORY_EMBEDDING[A-Z_]*" | sort -u
# Output: SUPERMEMORY_EMBEDDING_RAM_LIMIT

# Default provider hardcoded
strings /usr/local/bin/supermemory-server | grep "var y90"
# Output: var y90="local"

Steps to Reproduce

  1. Set environment variables in /etc/supermemory/supermemory.env:
SUPERMEMORY_EMBEDDING_PROVIDER=openai
SUPERMEMORY_EMBEDDING_MODEL=BAAI/bge-m3
SUPERMEMORY_EMBEDDING_DIMENSIONS=1024
SUPERMEMORY_EMBEDDING_BASE_URL=http://10.10.0.2:3004/v1
  1. Restart the service
  2. Check logs — still shows * local embeddings Xenova/bge-base-v1.5
  3. Verify env vars are loaded in process

Expected Behavior

The server should use the configured embedding provider (e.g., OpenAI-compatible endpoint with BAAI/bge-m3).

Actual Behavior

The server always uses local Xenova/bge-base-v1.5 (768d) regardless of environment variable configuration.

Affected Versions

  • v0.0.6 (stable)
  • v0.0.7-rc.2 (pre-release)

Impact

Users with non-English content cannot use the self-hosted server effectively because the default local model is English-only. The documented workaround (switching to remote embedding or local bge-m3) does not work.

Additional Context

  • Platform: Ubuntu 24.04, x86_64
  • Installation: systemd service
  • The OpenAI-compatible endpoint works correctly when tested directly via curl
  • The LLM configuration (OPENAI_BASE_URL, OPENAI_MODEL) works fine — only embedding is affected

Activity

  1. linear-code commented on Jul 22, 2026

    @linear-code
  2. 100-eyes commented on Aug 1, 2026

    @100-eyes

    Independent confirmation against the official Linux x64 server-v0.0.7-rc.2 release asset:

    • Release commit: 816b85d
    • Asset SHA-256: f56e7abc1d2d838d75c47827d0a823672d3707f2e0c26c4472d15805080d9a8c
    • Platform: Linux x86_64
    • Test used a completely fresh Supermemory state directory and isolated listener

    Configuration:

    SUPERMEMORY_EMBEDDING_PROVIDER=local
    SUPERMEMORY_EMBEDDING_MODEL=Xenova/bge-m3
    SUPERMEMORY_EMBEDDING_DIMENSIONS=1024
    SUPERMEMORY_LOCAL_EMBEDDING_POOL_SIZE=1
    SUPERMEMORY_LOCAL_EMBEDDING_WASM_THREADS=1
    SUPERMEMORY_LOCAL_EMBEDDING_BATCH_SIZE=8
    

    We verified through /proc/<pid>/environ that all six values reached the running process. Nevertheless, first boot reported:

    * local embeddings  Xenova/bge-base-en-v1.5 · first-run download
        pool: 1 worker · 1 thread each
    

    The binary then downloaded the 106 MB default English model.

    Additional release-artifact evidence:

    Literal in official rc.2 Linux binary Count
    Xenova/bge-base-en-v1.5 1
    Xenova/bge-m3 0
    SUPERMEMORY_EMBEDDING_PROVIDER 0
    SUPERMEMORY_EMBEDDING_MODEL 0
    SUPERMEMORY_EMBEDDING_DIMENSIONS 0

    The local-worker tuning variables are present in the same binary. This appears to be a release-build capability mismatch: the documentation at the rc.2 tag describes pluggable embeddings, while the published binary includes the tuning knobs but not provider/model/dimension selection.

    We also tested first-run setup in interactive TTY mode:

    1. With the LLM provider supplied through environment variables, setup skipped the embedding picker.
    2. Without LLM environment variables, the wizard asked for LLM provider/key/base URL/model and then completed without an embedding picker.

    This was reproduced before any benchmark ingestion and without Hermes, our privacy adapter, or Tinfoil in the request path.

    Practical multilingual impact from a separate controlled 12-fact German test on the default model:

    • Raw German queries: Hit@3 6/12
    • German paraphrases: Hit@3 7/12
    • English translations of the same queries: Hit@3 12/12

    Happy to retest a corrected Linux x64 release asset with Xenova/bge-m3.

  3. oddrap commented on Aug 8, 2026

    @oddrap

    Independent confirmation on macOS / Apple Silicon (Darwin arm64) with the official server-v0.0.6 binary and a fresh disposable data directory.

    The running process environment contained:

    SUPERMEMORY_EMBEDDING_PROVIDER=local
    SUPERMEMORY_EMBEDDING_MODEL=Xenova/bge-m3
    SUPERMEMORY_EMBEDDING_DIMENSIONS=1024
    SUPERMEMORY_LOCAL_EMBEDDING_POOL_SIZE=1
    SUPERMEMORY_LOCAL_EMBEDDING_WASM_THREADS=1
    

    Nevertheless, first boot selected and downloaded Xenova/bge-base-en-v1.5 at 768 dimensions. The data directory was new, so this was not an existing-index compatibility fallback. This confirms the documented multilingual configuration is also ignored on the Darwin arm64 v0.0.6 release artifact.

    I used synthetic documents only and can retest a corrected Darwin arm64 build.

  4. Adityakk9031 commented on Sep 10, 2026

    @Adityakk9031
    Contributor

    Fixed in v0.0.8. If you're upgrading from v0.0.6, wipe ~/.supermemory or it locks to the old 768d local model and ignores your env vars. (Docs PR: #1659)

  5. musa034 commented on Sep 13, 2026

    @musa034

    The embedding provider is still ignored in the v0.0.8 version. It is still hardcoded to the local provider

    ◆ embeddings
    ℹ reshaped "chunk"."embedding" → vector(1000)
    ℹ reshaped "memory_entry"."memory_embedding" → vector(1000)
    ✓ embeddings local · Xenova/bge-base-en-v1.5 · 768d · 148ms
    ◆ http server port 6767
    ✓ http server listening on http://localhost:6767 · 37ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions