<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: OpenCode Bridge</title>
    <description>The latest articles on DEV Community by OpenCode Bridge (@opencode-bridge).</description>
    <link>https://dev.to/opencode-bridge</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4269597%2F61502225-a8c1-42d3-8833-1ae81507a82a.png</url>
      <title>DEV Community: OpenCode Bridge</title>
      <link>https://dev.to/opencode-bridge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/opencode-bridge"/>
    <language>en</language>
    <item>
      <title>OpenCode Bridge: a local OpenAI-compatible API and chat for OpenCode models</title>
      <dc:creator>OpenCode Bridge</dc:creator>
      <pubDate>Fri, 27 Nov 2026 19:39:56 +0000</pubDate>
      <link>https://dev.to/opencode-bridge/opencode-bridge-a-local-openai-compatible-api-and-chat-for-opencode-models-1447</link>
      <guid>https://dev.to/opencode-bridge/opencode-bridge-a-local-openai-compatible-api-and-chat-for-opencode-models-1447</guid>
      <description>&lt;h1&gt;
  
  
  What is it?
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;OpenCode Bridge&lt;/strong&gt; is a small local application that exposes the models available in OpenCode through an OpenAI-compatible HTTP API. It also ships a browser chat UI, a Windows EXE launcher and a multilingual interface (Russian, English, Chinese, Korean).&lt;/p&gt;

&lt;p&gt;The idea is simple: if a program can talk to the OpenAI API, it can talk to OpenCode models. No cloud proxy, no API key for the models themselves — just a server on &lt;code&gt;127.0.0.1:8080&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;GET /v1/models&lt;/code&gt;, &lt;code&gt;POST /v1/chat/completions&lt;/code&gt;, &lt;code&gt;POST /v1/completions&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Real SSE streaming via OpenCode's &lt;code&gt;session.text.delta&lt;/code&gt; events — chunks arrive while the model is still generating.&lt;/li&gt;
&lt;li&gt;A web chat with conversation history, streaming output, a system prompt field and a language switcher.&lt;/li&gt;
&lt;li&gt;Four UI languages: Russian, English, Chinese and Korean. The model is instructed to answer in the user's language.&lt;/li&gt;
&lt;li&gt;Optional API key authentication and CORS restricted to local origins.&lt;/li&gt;
&lt;li&gt;A workaround for the daily free-model limit: clean forks of an already admitted session inherit the right to generate.&lt;/li&gt;
&lt;li&gt;A Windows EXE that starts the server, opens the browser and lives in the tray.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Install Node.js 18+ and OpenCode v2.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;opencode service start&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Double-click &lt;code&gt;OpenCode Bridge.exe&lt;/code&gt; (or run &lt;code&gt;node src/server.js&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;http://127.0.0.1:8080/&lt;/code&gt; or point another app to &lt;code&gt;http://127.0.0.1:8080/v1&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://127.0.0.1:8080/v1/chat/completions \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"model":"opencode/hy4-flash-free","messages":[{"role":"user","content":"Hello!"}]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using it from other programs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Base URL:&lt;/strong&gt; &lt;code&gt;http://127.0.0.1:8080/v1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Key:&lt;/strong&gt; any string, e.g. &lt;code&gt;dummy&lt;/code&gt; (when no key is configured)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; e.g. &lt;code&gt;opencode/hy4-flash-free&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This works with Cursor, Continue, Open WebUI, LibreChat, LangChain, the Python &lt;code&gt;openai&lt;/code&gt; package and similar clients.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multilingual summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RU:&lt;/strong&gt; Локальный мост к моделям OpenCode: веб-чат, OpenAI-совместимый API, четыре языка интерфейса и EXE-запускальщик.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ZH:&lt;/strong&gt; OpenCode 模型的本地桥接：网页聊天、OpenAI 兼容 API、四种界面语言与 EXE 启动器。&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KO:&lt;/strong&gt; OpenCode 모델용 로컬 브리지: 웹 채팅, OpenAI 호환 API, 4개 언어 인터페이스와 EXE 실행 프로그램.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Landing page: &lt;a href="https://bcfnjxbtd.github.io/opencode-bridge-landing/" rel="noopener noreferrer"&gt;https://bcfnjxbtd.github.io/opencode-bridge-landing/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source and archive: &lt;a href="https://github.com/bcfnjxbtd/opencode-bridge-landing" rel="noopener noreferrer"&gt;https://github.com/bcfnjxbtd/opencode-bridge-landing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Release v1.0.0: &lt;a href="https://github.com/bcfnjxbtd/opencode-bridge-landing/releases/tag/v1.0.0" rel="noopener noreferrer"&gt;https://github.com/bcfnjxbtd/opencode-bridge-landing/releases/tag/v1.0.0&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Gist: &lt;a href="https://gist.github.com/bcfnjxbtd/fc31cb773afb9fd3770772b96f123c4f" rel="noopener noreferrer"&gt;https://gist.github.com/bcfnjxbtd/fc31cb773afb9fd3770772b96f123c4f&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;p&gt;Free OpenCode models have a daily quota; the bridge works around it but cannot create new quota. &lt;code&gt;temperature&lt;/code&gt;/&lt;code&gt;top_p&lt;/code&gt; are ignored, and &lt;code&gt;max_tokens&lt;/code&gt;/&lt;code&gt;stop&lt;/code&gt; are applied as post-processing. In fork mode, tool permissions cannot be hard-disabled — keep the server on localhost and set an API key if needed.&lt;/p&gt;

&lt;p&gt;Feedback and contributions are welcome!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>python</category>
      <category>api</category>
    </item>
  </channel>
</rss>
