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.
Requirements
Section titled “Requirements”Server-side (TapPass must be able to reach the developer’s LM Studio port — typically only true when TapPass is also running locally):
LMSTUDIO_BASE_URL=http://localhost:1234/v1Option A — SDK
Section titled “Option A — SDK”from tappass import Agent
agent = Agent("http://localhost:9620", "tp_dev_...")response = agent.chat("Hello", model="lmstudio/qwen2.5-7b-instruct")Option B — OpenAI SDK, zero-code
Section titled “Option B — OpenAI SDK, zero-code”export OPENAI_BASE_URL=http://localhost:9620/v1export 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"}],)When to use this
Section titled “When to use this”- 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.