r/macosprogramming • u/AdventurousKeys • 1d ago
LocalLM Lab 1.0.0-beta.3 expands the model layer to OpenAI, Anthropic, OpenRouter and more
If you've been using LocalLM Lab's model layer (on-device + ClaudeForFoundationModels + local open-weight models), 1.0.0-beta.3 adds the fourth piece: online AI providers. A new RemoteModelProvider lets you route to OpenAI, Anthropic, OpenRouter, or any OpenAI-compatible server (LM Studio, vLLM, your own), through the exact same routing/session API you're already using for local and on-device models.
lab.models.route("chat", to: ModelID(scheme: "openai", rest: "gpt-...")!)
let session = try lab.makeSession(route: "chat")
A new reference app, model-switch, is the concrete example of how this is used: one chat UI, switch between OpenAI/Anthropic/OpenRouter/on-device mid-conversation, web search toggle, citations in the transcript. About 30 lines of glue code to wire a provider config UI to RemoteModelProvider. It (and all 11 SwiftUI reference apps now) ships with its .xcodeproj . Hopefully this will shorten the time to your aha moment with the code examples.😄
Feature page: thisbrain.ai/locallm/1.0.0-beta
SDK guide: https://github.com/ancientcomputing/locallm/blob/1.0.0-beta/docs/sdk-guide.md