README.md
README.md
An LM Studio plugin that turns LM Studio into a client for any OpenAI-compatible API. Point it at a Base URL and a model, and you get full control over generation right inside the chat β sampling, reasoning, tools, and real-time diagnostics.
It is aimed chiefly at the Splash local model runner β a high-throughput, Apple-Silicon, OpenAI-compatible inference server. Its sampling, reasoning, request-control, and error-handling behaviours were shaped around how Splash responds; it will be equally happy to talk to any other OpenAI-compatible endpoint.
Built around @lmstudio/sdk, the official openai SDK, and zod.
Many powerful models live behind hosted, OpenAI-compatible endpoints rather than locally. This plugin lets you use them from within LM Studio without leaving the app, while keeping the familiar chat UX and exposing every knob that matters:
On each turn the plugin:
All diagnostics respect the selected Log Level; at debug the full effective request payload is dumped to the console.
All fields are editable from the plugin settings panel in LM Studio.
| Field | Type | Default | Description |
|---|---|---|---|
| Base URL | string | (empty) | OpenAI-compatible endpoint, e.g. https://api.sharti.ru/v1. Required. |
| API Key | string (protected) | (empty) | Bearer key. Leave empty if the endpoint needs no auth. |
| Model | string | (empty) | Model identifier to request, e.g. Qwen3.8-27B. Required. |
Tuning parameters below are sent only when Custom Sampling is enabled. When disabled, only structural fields (model, messages, tools, priority, timeout, preserve_thinking) are transmittedβall sampling knobs are omitted.
| Field | Range | Default | Description |
|---|---|---|---|
| Custom Sampling | bool | on | Gate for tuning parameters. Off β suppresses temperature, top-k/p/min-p, penalties, seed, max-tokens, reasoning effort/budget. |
| Temperature | 0β2 | 1.0 | Sampling temperature. |
| Top K | β1β100 | 20 | Highest-probability tokens considered. |
| Top P | 0β1 | 0.95 | Nucleus sampling threshold. |
| Min P | 0β1 | 0 | Minimum probability threshold. |
| Presence Penalty | β2β2 | 0 | Penalises tokens that already appear. |
| Frequency Penalty |
| Field | Options / Range | Default | Description |
|---|---|---|---|
| Reasoning Effort | default Β· none Β· minimal Β· low Β· medium Β· high Β· xhigh Β· max | default | Provider-specific reasoning level. |
| Thinking Token Budget | β1β128000 | -1 | Cap on thinking tokens (β1 = uncapped). |
Prior thinking is always preserved between turns (preserve_thinking).
| Field | Options | Default | Description |
|---|---|---|---|
| Tool Choice | auto Β· required Β· none | auto | How the model handles tool calls. |
| Parallel Tool Calls | bool | off | Allow multiple simultaneous tool calls. |
| Field | Options / Range | Default | Description |
|---|---|---|---|
| Priority | foreground Β· normal Β· background | normal | Queue priority at the provider. Sent regardless of Custom Sampling. |
| Request Timeout (s) | 0β600 | 0 | Max seconds per request (0 = no timeout). Sent regardless of Custom Sampling. |
| Max Retries | 0β5 | 3 | Retry attempts on HTTP 503. |
| Field | Options / Type | Default | Description |
|---|---|---|---|
| Log Level | minimal Β· normal Β· debug | normal | Controls console verbosity. minimal shows only warnings/errors; normal adds request summaries and per-request stats; debug additionally dumps the full effective payload. |
| Show Turn Summary in Chat | bool | on | Displays the aggregated turn-end summary (calls, tokens, speed, time) inline in the chat window. Automatically stripped from history before resending. |
"runner": "node" in its manifest)| Package | Role |
|---|---|
@lmstudio/sdk | LM Studio plugin API (chat, generators, config schema) |
openai | Client for OpenAI-compatible endpoints |
zod | Schema validation |
Dev: typescript, @types/node.
After pushing, enable the plugin in LM Studio's Plugins area and fill in Base URL, API Key, and Model under its settings.
Common provider errors are translated into clear, actionable messages:
| Symptom | Likely cause / fix |
|---|---|
| Prompt too long: exceeds the model's context limit | Start a new chat or trim the context. |
| Server out of memory / ran out of memory while processing | Reduce context size; retry later. |
| Invalid or missing API key | Double-check the API Key setting. |
| Model not found | Verify the Model name. |
| Rate limit exceeded (HTTP 429) | Wait and retry. |
| Access forbidden (HTTP 403) | Check host/origin allow-lists on the server side. |
| Server unavailable (HTTP 503) | Handled automatically β retried with backoff up to Max Retries. |
| Response truncated: max token limit reached. | Increase Max Tokens or start a shorter prompt. |
| Response blocked by content filter. | Adjust the prompt; the provider's safety filter intervened. |
Tip: raise Log Level to debug to see the full effective request payload in the console β invaluable when diagnosing unexpected provider behaviour.
Distributed under the Apache License 2.0.
An LM Studio plugin that turns LM Studio into a client for any OpenAI-compatible API. Point it at a Base URL and a model, and you get full control over generation right inside the chat β sampling, reasoning, tools, and real-time diagnostics.
It is aimed chiefly at the Splash local model runner β a high-throughput, Apple-Silicon, OpenAI-compatible inference server. Its sampling, reasoning, request-control, and error-handling behaviours were shaped around how Splash responds; it will be equally happy to talk to any other OpenAI-compatible endpoint.
Built around @lmstudio/sdk, the official openai SDK, and zod.
Many powerful models live behind hosted, OpenAI-compatible endpoints rather than locally. This plugin lets you use them from within LM Studio without leaving the app, while keeping the familiar chat UX and exposing every knob that matters:
On each turn the plugin:
All diagnostics respect the selected Log Level; at debug the full effective request payload is dumped to the console.
All fields are editable from the plugin settings panel in LM Studio.
| Field | Type | Default | Description |
|---|---|---|---|
| Base URL | string | (empty) | OpenAI-compatible endpoint, e.g. https://api.sharti.ru/v1. Required. |
| API Key | string (protected) | (empty) | Bearer key. Leave empty if the endpoint needs no auth. |
| Model | string | (empty) | Model identifier to request, e.g. Qwen3.8-27B. Required. |
Tuning parameters below are sent only when Custom Sampling is enabled. When disabled, only structural fields (model, messages, tools, priority, timeout, preserve_thinking) are transmittedβall sampling knobs are omitted.
| Field | Range | Default | Description |
|---|---|---|---|
| Custom Sampling | bool | on | Gate for tuning parameters. Off β suppresses temperature, top-k/p/min-p, penalties, seed, max-tokens, reasoning effort/budget. |
| Temperature | 0β2 | 1.0 | Sampling temperature. |
| Top K | β1β100 | 20 | Highest-probability tokens considered. |
| Top P | 0β1 | 0.95 | Nucleus sampling threshold. |
| Min P | 0β1 | 0 | Minimum probability threshold. |
| Presence Penalty | β2β2 | 0 | Penalises tokens that already appear. |
| Frequency Penalty |
| Field | Options / Range | Default | Description |
|---|---|---|---|
| Reasoning Effort | default Β· none Β· minimal Β· low Β· medium Β· high Β· xhigh Β· max | default | Provider-specific reasoning level. |
| Thinking Token Budget | β1β128000 | -1 | Cap on thinking tokens (β1 = uncapped). |
Prior thinking is always preserved between turns (preserve_thinking).
| Field | Options | Default | Description |
|---|---|---|---|
| Tool Choice | auto Β· required Β· none | auto | How the model handles tool calls. |
| Parallel Tool Calls | bool | off | Allow multiple simultaneous tool calls. |
| Field | Options / Range | Default | Description |
|---|---|---|---|
| Priority | foreground Β· normal Β· background | normal | Queue priority at the provider. Sent regardless of Custom Sampling. |
| Request Timeout (s) | 0β600 | 0 | Max seconds per request (0 = no timeout). Sent regardless of Custom Sampling. |
| Max Retries | 0β5 | 3 | Retry attempts on HTTP 503. |
| Field | Options / Type | Default | Description |
|---|---|---|---|
| Log Level | minimal Β· normal Β· debug | normal | Controls console verbosity. minimal shows only warnings/errors; normal adds request summaries and per-request stats; debug additionally dumps the full effective payload. |
| Show Turn Summary in Chat | bool | on | Displays the aggregated turn-end summary (calls, tokens, speed, time) inline in the chat window. Automatically stripped from history before resending. |
"runner": "node" in its manifest)| Package | Role |
|---|---|
@lmstudio/sdk | LM Studio plugin API (chat, generators, config schema) |
openai | Client for OpenAI-compatible endpoints |
zod | Schema validation |
Dev: typescript, @types/node.
After pushing, enable the plugin in LM Studio's Plugins area and fill in Base URL, API Key, and Model under its settings.
Common provider errors are translated into clear, actionable messages:
| Symptom | Likely cause / fix |
|---|---|
| Prompt too long: exceeds the model's context limit | Start a new chat or trim the context. |
| Server out of memory / ran out of memory while processing | Reduce context size; retry later. |
| Invalid or missing API key | Double-check the API Key setting. |
| Model not found | Verify the Model name. |
| Rate limit exceeded (HTTP 429) | Wait and retry. |
| Access forbidden (HTTP 403) | Check host/origin allow-lists on the server side. |
| Server unavailable (HTTP 503) | Handled automatically β retried with backoff up to Max Retries. |
| Response truncated: max token limit reached. | Increase Max Tokens or start a shorter prompt. |
| Response blocked by content filter. | Adjust the prompt; the provider's safety filter intervened. |
Tip: raise Log Level to debug to see the full effective request payload in the console β invaluable when diagnosing unexpected provider behaviour.
Distributed under the Apache License 2.0.
Base URL and an optional API Key (leave the key empty if the endpoint doesn't require auth).none β max), set a thinking-token budget, and keep prior thinking preserved between turns. Reasoning is detected from reasoning_content and β¦ blocks and surfaced as proper reasoning fragments in the UI.auto / required / none), supports parallel tool calls, and streams tool-call deltas incrementally.503s, per-request timeouts, request priority, graceful interruption, and table-driven error mapping (rate limits, context overflow, bad key, etc.).minimal / normal / debug). Warnings and errors reach the chat with visual badges; detailed request dumps and payload introspection stay in the console at higher levels.tool results so malformed histories don't break the provider.preserve_thinking) are always included; tuning parameters (sampling, reasoning) are included only when Custom Sampling is on.503) it retries with exponential backoff (1s β 2s β 4s β 8s β 10s), up to the configured maximum.finish_reason), the aggregator emits a consolidated summary to the consoleβand optionally to the chat.| β2β2 |
0 |
| Penalises tokens by how often they appear. |
| Repetition Penalty | 0.1β2 | 1 | Penalises repeated tokens. |
| Seed | β1β999999999 | -1 | Random seed (β1 = random). |
| Max Tokens | 0β128000 | 4000 | Maximum tokens to generate. |
sharti-connector/
βββ manifest.json # LM Studio plugin manifest (type, runner, owner, revision)
βββ package.json # Scripts & dependencies
βββ tsconfig.json # TypeScript config
βββ src/
βββ index.ts # Entry point: registers config schematics + generator
βββ config.ts # Schema definition + CONFIG_DEFAULTS + ShartiConfig type
βββ constants.ts # Shared delimiters (reasoning tags, turn-summary markers)
βββ types.ts # Wire types, request body, stream chunk, stats interfaces
βββ generator.ts # Orchestrator: validate β convert β request β stream β stats
βββ request.ts # Client factory, payload assembly, debug-dump helper
βββ errors.ts # Table-driven provider error classification & messaging
βββ stats.ts # Per-turn accumulator, session-scoped LRU store
βββ convert/
β βββ messages.ts # HistoryβOpenAI conversion, sanitization, conv-key derivation
β βββ stream.ts # Delta rendering, reasoning blocks, tool-call assembly, metrics
βββ utils/
βββ logger.ts # ShartiLogger: leveled channels (debug/info/warn/error/chat)
βββ coerce.ts # Safe runtime type guards (asString/asBool/asNumber)
βββ block.ts # Structured multi-line log block formatter
cd sharti-connector
# Install dependencies
npm install # or: bun install
# Run in watch mode against a connected LM Studio instance
npm run dev # β lms dev
# Push/build the plugin
npm run push # β lms push
Base URL and an optional API Key (leave the key empty if the endpoint doesn't require auth).none β max), set a thinking-token budget, and keep prior thinking preserved between turns. Reasoning is detected from reasoning_content and β¦ blocks and surfaced as proper reasoning fragments in the UI.auto / required / none), supports parallel tool calls, and streams tool-call deltas incrementally.503s, per-request timeouts, request priority, graceful interruption, and table-driven error mapping (rate limits, context overflow, bad key, etc.).minimal / normal / debug). Warnings and errors reach the chat with visual badges; detailed request dumps and payload introspection stay in the console at higher levels.tool results so malformed histories don't break the provider.preserve_thinking) are always included; tuning parameters (sampling, reasoning) are included only when Custom Sampling is on.503) it retries with exponential backoff (1s β 2s β 4s β 8s β 10s), up to the configured maximum.finish_reason), the aggregator emits a consolidated summary to the consoleβand optionally to the chat.| β2β2 |
0 |
| Penalises tokens by how often they appear. |
| Repetition Penalty | 0.1β2 | 1 | Penalises repeated tokens. |
| Seed | β1β999999999 | -1 | Random seed (β1 = random). |
| Max Tokens | 0β128000 | 4000 | Maximum tokens to generate. |
sharti-connector/
βββ manifest.json # LM Studio plugin manifest (type, runner, owner, revision)
βββ package.json # Scripts & dependencies
βββ tsconfig.json # TypeScript config
βββ src/
βββ index.ts # Entry point: registers config schematics + generator
βββ config.ts # Schema definition + CONFIG_DEFAULTS + ShartiConfig type
βββ constants.ts # Shared delimiters (reasoning tags, turn-summary markers)
βββ types.ts # Wire types, request body, stream chunk, stats interfaces
βββ generator.ts # Orchestrator: validate β convert β request β stream β stats
βββ request.ts # Client factory, payload assembly, debug-dump helper
βββ errors.ts # Table-driven provider error classification & messaging
βββ stats.ts # Per-turn accumulator, session-scoped LRU store
βββ convert/
β βββ messages.ts # HistoryβOpenAI conversion, sanitization, conv-key derivation
β βββ stream.ts # Delta rendering, reasoning blocks, tool-call assembly, metrics
βββ utils/
βββ logger.ts # ShartiLogger: leveled channels (debug/info/warn/error/chat)
βββ coerce.ts # Safe runtime type guards (asString/asBool/asNumber)
βββ block.ts # Structured multi-line log block formatter
cd sharti-connector
# Install dependencies
npm install # or: bun install
# Run in watch mode against a connected LM Studio instance
npm run dev # β lms dev
# Push/build the plugin
npm run push # β lms push