Skip to content

Create inference-provider.md #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions 0_app/4_api/inference-provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# How to add LM Studio as an LLM provider

While LM Studio has an OpenAI-compatible API, it also provides SDKs for Python and TypeScript/JavaScript, offering a richer set of features tailored specifically for local AI development.

## Why use LM Studio’s SDK over OpenAI’s SDK?

LM Studio’s SDKs are designed to be clean and developer-friendly for Python and TypeScript/JavaScript users.

They include a number of local AI-focused features not found in OpenAI's SDK, such as:

- **Model Management**: Load, unload, and manage AI models directly from memory
- **Model Information**: Get details like context length and model size
- **Reliable Request Handling**: Easily abort ongoing prediction requests
- **Advanced Configuration**: Customize model load parameters and use Presets (e.g., GPU offloading, context length)
- **Speculative Decoding**: Use advanced inference techniques for improved performance

Using LM Studio’s SDKs also means your application can automatically connect to LM Studio without needing to manually start a server or configure ports.

## Getting Started

Adding support for LM Studio as an inference provider is easy:

- [TypeScript/JavaScript Setup →](#)
- [Python Setup →](#)