Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

lmstudiox

An extended Python SDK for LM Studio with support for explicitly enabling or disabling model thinking mode.

lmstudiox extends the official lmstudio Python SDK with additional capabilities, including explicit control over model thinking mode.

It provides an API compatible with the original SDK while allowing developers to disable thinking mode when needed.

Features

  • Thinking Mode Control: Explicitly enable or disable model thinking mode through LlmPredictionConfig.
  • Familiar API: Built on top of the official lmstudio SDK, retaining its familiar usage patterns.
  • Streaming Support: Supports asynchronous streaming responses.
  • Version Alignment: The package version is kept in sync with the official lmstudio package version on PyPI.

Installation

pip install lmstudiox

Usage

The following example demonstrates the difference between the official lmstudio SDK and lmstudiox when interacting with a model.

import asyncio
import lmstudio
import lmstudiox


# Use the official lmstudio SDK (thinking mode enabled by default).
async def use_lmstudio():
    async with lmstudio.AsyncClient("localhost:1234") as client:
        model = await client.llm.model("qwen3.5-9b")
        stream = await model.respond_stream("hello !")
        async for x in stream:
            if x.content:
                print(x.content, end="", flush=True)
        print()


# Use lmstudiox to explicitly disable thinking mode.
async def use_lmstudiox():
    async with lmstudiox.AsyncClient("localhost:1234") as client:
        model = await client.llm.model("qwen3.5-9b")
        stream = await model.respond_stream("hello !", config=lmstudiox.LlmPredictionConfig(enable_thinking=False))
        async for x in stream:
            if x.content:
                print(x.content, end="", flush=True)
        print()


# Run both examples for comparison.
asyncio.run(use_lmstudio())
asyncio.run(use_lmstudiox())

Requirements

  • Python >= 3.12
  • LM Studio with its local API server enabled
  • lmstudio Python SDK ~= 1.5.0

Acknowledgements

This project is built on top of the official LM Studio Python SDK.

Special thanks to the LM Studio team for providing the underlying SDK and local inference platform.

License

See LICENSE for details.

Metadata

Release files for lmstudiox 1.5.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lmstudiox 1.5.0rc1
File Size Uploaded Provenance Actions
lmstudiox-1.5.0rc1.tar.gz 331.8 kB Without provenance Details for lmstudiox-1.5.0rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lmstudiox 1.5.0rc1
File Interpreter ABI Platform Actions
lmstudiox-1.5.0rc1-py3-none-any.whl Python 3 none any Details for lmstudiox-1.5.0rc1-py3-none-any.whl

Total release size: 677.4 kB

Release files / lmstudiox-1.5.0rc1.tar.gz

Download URL lmstudiox-1.5.0rc1.tar.gz
Size 331.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b9349566521fe294a10543470ac2d7feea9f634e388bf260ffeb62c42267ccf6
BLAKE2b-256 checksum
How to use checksums
3e4c8206a1ae0806f559935c2ee0c41ed01150ebd33500412442073257c6e2c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Release files / lmstudiox-1.5.0rc1-py3-none-any.whl

Download URL lmstudiox-1.5.0rc1-py3-none-any.whl
Size 345.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e90595d314e468c58d3081a7cceccf81060325ec1a0c63f55e9e2747ceb8cb64
BLAKE2b-256 checksum
How to use checksums
df0f8dc62ce65e6a3a024392a4fd1c4fddaf9836421cf8a486f9a9c1cf8e0922
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Security for lmstudiox 1.5.0rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page