gitwtfhub

wtf is opencode-lmstudio-warm?

diegomarino/opencode-lmstudio-warm — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 2/5Setup · easy

TL;DR

An opencode plugin that keeps a local LM Studio AI model loaded and ready, fixing cold-start hangs and mid-session model unloading.

Mindmap

mindmap
  root((opencode-lmstudio-warm))
    What it does
      Preloads local models
      Prevents cold-start hangs
      Stops mid-session unloads
      Avoids duplicate loads
    Tech stack
      TypeScript
      opencode plugin API
      LM Studio CLI
    Use cases
      Warm a model before requests
      Run local LLMs reliably
      Automate fleet-wide setup
      Tune model residency settings
    Audience
      Developers using local LLMs
      opencode users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Avoid the first request hanging because a local model is still cold-loading.

REASON 2

Keep a local model resident so it does not get unloaded mid-session by an idle timeout.

REASON 3

Prevent duplicate model loads when multiple requests arrive at the same time.

REASON 4

Roll out consistent local-model warm-up settings across a fleet of machines.

What's in the stack?

TypeScriptopencodeLM Studio

How it stacks up

diegomarino/opencode-lmstudio-warm0xradioac7iv/tempfs52191314/web-agent-proxy-sdk
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderatemoderate
Complexity2/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Requires opencode and a locally running LM Studio instance, one manual settings change inside LM Studio is recommended.

Wtf does this do

opencode-lmstudio-warm is a plugin for opencode, an AI coding tool, that makes sure a local AI model running through LM Studio is fully loaded and ready before opencode sends it any request. Without this plugin, people running local models through LM Studio tend to hit three annoying problems: the very first request hangs while the model loads for the first time, requests fail outright with a no model loaded error if automatic loading is turned off, and models can get unloaded partway through a work session because LM Studio automatically frees up memory after a period of inactivity. The plugin fixes this by checking, before every request, whether the model is actually loaded, and if it is not, it loads the model first and only then lets the request through. It is careful to avoid loading the same model twice even if multiple requests come in around the same time. The project has been tested against specific versions of opencode and LM Studio on macOS with Apple Silicon. Setup involves running one command to register the plugin with opencode, either for a single project or globally on your machine, then pointing opencode's configuration at your local LM Studio server address. There is also a one-time settings change needed inside the LM Studio app itself, to turn off the automatic idle timeout that would otherwise unload models on its own. The plugin also offers a range of optional settings, like how long a loaded model should stay resident, how many requests it should handle at once, and how it should behave if a model fails to load, though it works out of the box with sensible defaults and no configuration required. This is a tool for developers who are already using opencode with local models through LM Studio rather than a cloud AI service, and it does not require any external dependencies beyond opencode and LM Studio themselves.

Yoink these prompts

Prompt 1
Walk me through installing opencode-lmstudio-warm and pointing opencode at my local LM Studio server.
Prompt 2
Explain what settings I need to change in LM Studio for this plugin to work correctly.
Prompt 3
Show me how to configure per-model TTL and context length overrides for this plugin.
Prompt 4
How does opencode-lmstudio-warm avoid loading the same model twice at once?
Prompt 5
Help me set up this plugin globally so it applies to every opencode session on my machine.

Frequently asked questions

wtf is opencode-lmstudio-warm?

An opencode plugin that keeps a local LM Studio AI model loaded and ready, fixing cold-start hangs and mid-session model unloading.

What language is opencode-lmstudio-warm written in?

Mainly TypeScript. The stack also includes TypeScript, opencode, LM Studio.

How hard is opencode-lmstudio-warm to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is opencode-lmstudio-warm for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.