Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

opencode-lmstudio-sync

An opencode plugin to sync the model list from lmstudio and inject them at run time in opencode, which you can access using the /models command.

usage

Important

Your LMStudio API server must be running for this to work! e.g. at http://127.0.0.1:1234

# clone the repo
git clone https://github.com/rashomon-gh/opencode-lmstudio-sync.git
cd opencode-lmstudio-sync

# then copy the plugin file to your opencode config directory
cp ./lmstudio-sync.ts ~/.config/opencode/plugins/lmstudio-sync.ts

Then add the following to your opencode config file (~/.config/opencode/opencode.json).

{
    ...
    "plugin": ["./plugins/lmstudio-sync.ts"],
     "provider": {
        "lmstudio": {
        "npm": "@ai-sdk/openai-compatible",
        "name": "LM Studio (local)",
        "options": {
            "baseURL": "http://127.0.0.1:1234/v1"
        }
    },
    ...
    // any other providers you may have
}

An example opencode.json file using only lmstudio endpoints:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["./plugins/lmstudio-sync.ts"],
  "provider": {
    "lmstudio": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "LM Studio (local)",
      "options": {
        "baseURL": "http://127.0.0.1:1234/v1"
      }
    }
  }
}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages