Openrouter Proxy banner
ahaostudy ahaostudy

Openrouter Proxy

Development community

Description

A zero-dependency proxy that unlocks free Xiaomi MiMo on OpenRouter for any client, and fixes SSE streaming issues with the VS Code Claude Code extension.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

OpenRouter Proxy

A zero-dependency proxy that unlocks **free Xiaomi MiMo** on OpenRouter for any client, and fixes **SSE streaming** issues with the VS Code Claude Code extension.

**[中文文档](./README_CN.md)**


The Problem

**Free MiMo for any tool** — [Xiaomi MiMo](https://openrouter.ai/xiaomi/mimo-v2-pro) is free on OpenRouter, but only when requests come through the **OpenClaw** channel. Without the right headers, you pay or get nothing. This proxy injects them automatically — works with any HTTP client.

**Claude Code SSE fix** — The VS Code Claude Code extension breaks when consuming OpenRouter's SSE stream due to:

  • unsupported content type: redacted_thinking errors
  • Duplicate or out-of-order events
  • Missing content block boundaries

The SSE repair logic specifically targets Claude Code's Anthropic-style event format. Other tools (Continue, Cline, etc.) get the free MiMo access without needing the SSE fix.

**OpenRouter Proxy handles both — transparently, with zero dependencies.**


How It Works

┌──────────────────┐       ┌──────────────────┐       ┌─────────────────┐
│   Any AI Tool    │──────▶│  OpenRouter Proxy │──────▶│   OpenRouter    │
│                  │       │  localhost:8899   │       │                 │
│  Claude Code     │◀──────│                  │◀──────│  Xiaomi MiMo    │
│  Continue        │       │  • Inject headers │       │  (free via      │
│  Cline / Aider   │       │  • Repair SSE     │       │   OpenClaw)     │
│  OpenAI SDK      │       │  • WebSocket      │       │                 │
│  Any HTTP client │       │                  │       │                 │
└──────────────────┘       └──────────────────┘       └─────────────────┘
Feature Detail
Header injection Adds HTTP-Referer + X-OpenRouter-Title to qualify for free MiMo — works with any tool
SSE repair Fixes redacted_thinking, block lifecycle, event order — Claude Code only
Transparent