Documentation
Basics
Agentic Flows
Integrations
Tools Provider
Prompt Preprocessor
Generators
Custom Configuration
Publishing a Plugin
Text Embedding
Tokenization
API Reference
Model Info
Basics
Agentic Flows
Integrations
Tools Provider
Prompt Preprocessor
Generators
Custom Configuration
Publishing a Plugin
Text Embedding
Tokenization
API Reference
Model Info
Manage Models
List Loaded Models
Query which models are currently loaded
You can iterate through models loaded into memory using the listLoaded
method. This method lives under the llm
and embedding
namespaces of the LMStudioClient
object.
This will give you results equivalent to using lms ps
in the CLI.
import { LMStudioClient } from "@lmstudio/sdk";
const client = new LMStudioClient();
const llmOnly = await client.llm.listLoaded();
const embeddingOnly = await client.embedding.listLoaded();
This page's source is available on GitHub