Skip to content

LM Studio

LM Studio exposes an OpenAI-compatible endpoint on localhost:1234 for developer machines. Useful for prototyping against a local model while still routing through TapPass for audit and policy.

Server-side (TapPass must be able to reach the developer’s LM Studio port — typically only true when TapPass is also running locally):

Terminal window
LMSTUDIO_BASE_URL=http://localhost:1234/v1
from tappass import Agent
agent = Agent("http://localhost:9620", "tp_dev_...")
response = agent.chat("Hello", model="lmstudio/qwen2.5-7b-instruct")
Terminal window
export OPENAI_BASE_URL=http://localhost:9620/v1
export OPENAI_API_KEY=tp_dev_...
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="lmstudio/qwen2.5-7b-instruct",
messages=[{"role": "user", "content": "Hello"}],
)
  • Prototyping governance policies on your laptop before shipping a rule.
  • Offline dev environments where you can’t hit a cloud provider.
  • Cost control during demos — swap the model without touching agent code.

For production-scale self-hosted inference, use vLLM or Ollama instead.