<?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: Haoyi Zhu</title>
    <description>The latest articles on DEV Community by Haoyi Zhu (@zhuhaoyi181).</description>
    <link>https://dev.to/zhuhaoyi181</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Haoyi Zhu</title>
      <link>https://dev.to/zhuhaoyi181</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zhuhaoyi181"/>
    <language>en</language>
    <item>
      <title>RelayPilot: An AI Night-Shift Engineer for LLM Relay Stations</title>
      <dc:creator>Haoyi Zhu</dc:creator>
      <pubDate>Tue, 13 Oct 2026 04:14:46 +0000</pubDate>
      <link>https://dev.to/zhuhaoyi181/relaypilot-an-ai-night-shift-engineer-for-llm-relay-stations-1apo</link>
      <guid>https://dev.to/zhuhaoyi181/relaypilot-an-ai-night-shift-engineer-for-llm-relay-stations-1apo</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;RelayPilot&lt;/strong&gt; is an AI ops copilot for people who run LLM relay stations — the small, often one-person services that sit between users and model providers, juggling API keys, channel quotas, and bills.&lt;/p&gt;

&lt;p&gt;I know this pain firsthand: I run a free public relay station myself. RelayPilot is the night-shift engineer I always wished I had.&lt;/p&gt;

&lt;p&gt;It does four things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Channel health monitoring&lt;/strong&gt; — probes every upstream channel on a schedule and tracks latency, error rates, and quota burn, so a dying channel gets caught in minutes, not hours.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic quarantine&lt;/strong&gt; — an open-weight model classifies key usage patterns locally; when a key suddenly starts behaving like a stolen one (traffic spikes at 3 AM from a new region), RelayPilot quarantines it automatically and pings the owner.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Natural-language ops queries&lt;/strong&gt; — "which channel burned the most tokens yesterday?" or "is the DeepSeek channel healthy right now?" answered in plain language, no dashboard spelunking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telegram alerts&lt;/strong&gt; — the things that actually need a human get pushed to your phone; everything else stays in the log.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Who would pay for it:&lt;/strong&gt; anyone running a relay station or reselling API access — indie hackers, small dev-tool teams, campus AI clubs. The pitch is simple: one prevented quota-burn incident pays for a year. I'm launching with a free self-hosted tier (bring your own server) and a $9/month hosted tier that handles monitoring, alerting, and multi-tenant billing. My first user is me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;62-second terminal demo of the simulated key-leak scenario (&lt;code&gt;SIMULATION_MODE=1&lt;/code&gt; — no real keys were harmed): channel probes → normal traffic → &lt;code&gt;sk-dave&lt;/code&gt;'s key starts leaking at 03:00 from a new region → WARNING → auto-quarantine + CRITICAL Telegram alert → natural-language queries → daily digest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx0ni4dfv9a43r9su0agg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx0ni4dfv9a43r9su0agg.gif" alt=" " width="600" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/2951461586/relaypilot" rel="noopener noreferrer"&gt;https://github.com/2951461586/relaypilot&lt;/a&gt; — MIT licensed, repo created Oct 13, 2026, inside the challenge window.&lt;br&gt;
Stack: Python, FastAPI, Ollama (open-weight models, local inference), python-telegram-bot, SQLite. Channel adapters forked from the open-source Veloera/New API gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Anomaly detection, local by design.&lt;/strong&gt; A small open-weight model (Qwen3 via Ollama) classifies per-key usage windows — request rate, token profile, time-of-day, geography — into normal/suspicious. It runs entirely on the operator's own machine, with automatic fallback to built-in heuristic rules when Ollama is unreachable. No usage telemetry ever leaves the server, which matters because key logs are the crown jewels of a relay business.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic where it counts.&lt;/strong&gt; The model only &lt;em&gt;classifies&lt;/em&gt;; all money-adjacent decisions (quarantine thresholds, quota math, billing) are plain code. An LLM never touches arithmetic it can get wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Veloera adapters.&lt;/strong&gt; Instead of writing channel integrations from scratch, I built on the open-source Veloera gateway's channel abstraction, so RelayPilot speaks the same plugin interface as the relay itself — any Veloera-compatible station can drop it in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telegram as the UI.&lt;/strong&gt; Operators don't want another dashboard; they want their phone to buzz only when something is actually wrong. Alert fatigue was the design enemy: three severity levels, quiet hours, and a daily digest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A static landing page&lt;/strong&gt; ships in the repo (site/) and is headed for relaypilot.tech — the .tech domain I claimed through the Hacktoberfest promo.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Four reasons, all of which are load-bearing for this business — not decoration:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The data can't leave the building.&lt;/strong&gt; Key usage logs contain everything an attacker needs. Sending them to a third-party API for "AI monitoring" would be malpractice. An open-weight model running locally means the security tool doesn't become the security hole.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The unit economics only work at zero marginal cost.&lt;/strong&gt; Monitoring means classifying thousands of usage windows a day, forever. At paid-API prices, the monitoring bill would exceed the relay's own margin. Local inference makes the $9/month tier actual profit instead of a loss leader.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operators need to swap models, not vendors.&lt;/strong&gt; When a better small classifier drops, I swap a model file — no contract renegotiation, no API migration, no retraining pipeline owned by someone else. The whole product is model-agnostic by construction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trust is the product.&lt;/strong&gt; Relay operators are trusting RelayPilot with their keys and their users. Every line of the detection logic is inspectable; nothing phones home. You can't sell "we watch your keys" as a closed black box.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;I built this with an AI agent under my direction: I specified the architecture and requirements, the agent wrote the code, and I verified it end-to-end with the simulated leak scenario above. (No DevRelay session link — the build happened in my own environment.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Overall&lt;/strong&gt; — every valid submission is considered for the overall prize; entering here.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of a .tech Domain&lt;/strong&gt; — relaypilot.tech, claimed through the Hacktoberfest promo, is this project's domain. The landing page goes live there next.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
