whatisgithub

What is local-relay?

alikonuk1/local-relay — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A TypeScript toolkit that gives web apps one interface to chat with local AI models like Ollama and LM Studio.

Mindmap

mindmap
  root((Local Relay))
    What it does
      Unified local LLM interface
      Streaming chat
      CORS proxy
    Tech stack
      TypeScript
      React hooks
      Node proxy
    Use cases
      Ollama and LM Studio apps
      Embeddings and Responses API
      Model picker UI
    Audience
      Web developers
      Local-first AI builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Detect and list local LLM providers like Ollama or LM Studio from a web app.

USE CASE 2

Stream chat responses token by token from a locally running model.

USE CASE 3

Route browser requests through a local proxy when CORS blocks direct calls.

USE CASE 4

Build model and provider picker UI with the included React hooks.

What is it built with?

TypeScriptReactNode.js

How does it compare?

alikonuk1/local-relay0xradioac7iv/tempfs52191314/web-agent-proxy-sdk
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderatemoderate
Complexity2/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Browser apps blocked by CORS need the optional local proxy package running alongside the app.

MIT license: free to use, modify, and redistribute, including commercially.

So what is it?

Local Relay is a toolkit for JavaScript and TypeScript apps that need to talk to AI models running on the user's own computer instead of a cloud service. It connects to local model runtimes like Ollama, LM Studio, llama.cpp server, vLLM, LocalAI, and other tools that speak an OpenAI-compatible API, and gives your app one consistent interface for working with any of them. With this single interface you can detect which local providers are available on someone's machine, list the models they have installed, send chat messages, stream the model's response token by token as it is generated, create text embeddings, and use OpenAI-style Responses API endpoints if the local server supports them. The library also handles a common browser problem: many local model servers block direct requests from a web page due to CORS restrictions, so Local Relay includes an optional small proxy program that runs on the user's own machine and forwards requests safely, only to local addresses. The project is split into three separate packages: a core library with the actual provider clients and logic, a set of React hooks and simple UI pieces for building model and provider pickers plus streaming chat interfaces, and the standalone proxy program itself. You only need to install the pieces you actually use. There is also a full example application built with Vite and React that shows provider detection, model selection, both direct and proxy modes, and live streaming chat working together. It is worth being clear about what this project is not: it is a connector library for wiring your own app to local models, not a finished chat application on its own. Feature support such as tool calling, image input, or embeddings still depends entirely on whether the specific local model and runtime you pick actually support that feature, since Local Relay simply forwards requests in a consistent shape rather than adding capabilities the underlying model does not have. The project is released under the MIT license, so it can be used, modified, and redistributed freely, including in commercial projects.

Copy-paste prompts

Prompt 1
Show me how to connect my web app to Ollama using Local Relay.
Prompt 2
Help me set up the Local Relay proxy for a browser app blocked by CORS.
Prompt 3
Walk me through streaming a chat response with the core client.
Prompt 4
Explain how to add a model selector UI using the React package.

Frequently asked questions

What is local-relay?

A TypeScript toolkit that gives web apps one interface to chat with local AI models like Ollama and LM Studio.

What language is local-relay written in?

Mainly TypeScript. The stack also includes TypeScript, React, Node.js.

What license does local-relay use?

MIT license: free to use, modify, and redistribute, including commercially.

How hard is local-relay to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is local-relay for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.