Foundry.LMStudioProvider (foundry v0.1.4)

Copy Markdown

Local OpenAI-compatible chat provider for LM Studio.

LM Studio exposes /v1/chat/completions; this module uses that API directly so local chat does not depend on hosted provider API keys or Claude Code usage.

Summary

Functions

Lists available LM Studio models from the OpenAI-compatible models endpoint.

Streams a conversation through LM Studio.

Functions

list_models(opts \\ [])

Lists available LM Studio models from the OpenAI-compatible models endpoint.

stream(messages, opts \\ [], on_event)

Streams a conversation through LM Studio.

Events:

  • {:delta, text} — newly streamed assistant text
  • {:result, text, metadata} — final successful response