u/squirrelscrush

7,236 post karma · 18.9k comment karma · joined Jul 2021 · moderator

squirrelscrush

I use opencode-mem, but you'll need to configure it before installing it.

Like, from their github repo, download the opencode-mem.example.jsonc file in ~/.config/opencode and save it as opencode-mem.jsonc.

Then, change these options there:

  1. Comment out the "embeddingModel": "Xenova/nomic-embed-text-v1" field.
  2. Add these lines:

    "embeddingApiUrl": "https://openrouter.ai/api/v1", "embeddingApiKey": "OPENROUTER_API_KEY", "embeddingModel": "nvidia/nemotron-3-embed-1b:free", "opencodeProvider": "openrouter", "opencodeModel": "openrouter/free",

    (OPENROUTER_API_KEY is your API key from OpenRouter. You can replace opencodeModel with any model you want, just ask chatgpt.)

    Otherwise it will download some model and it'll run slow. For other changes ask chatgpt too.

  3. Then add the plugin to opencode.