@alessiods/openrouter-maskOpenCode plugin that masks your requests as Hermes Agent on OpenRouter. Spoofs HTTP-Referer, X-OpenRouter-Title, and X-OpenRouter-Categories headers.
0
501
237 in 7 days
35.4
Multi-signal model
27 days ago
2026-07-23
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@alessiods/openrouter-mask@1.0.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@alessiods/openrouter-mask@1.0.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @alessiods/openrouter-maskopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
OpenCode plugin that masks your API requests as Hermes Agent on OpenRouter.
What it does
When you send requests through OpenRouter, this plugin overrides the following HTTP headers:
| Header | Value |
|---|---|
HTTP-Referer |
https://hermes-agent.nousresearch.com/ |
X-OpenRouter-Title |
Hermes Agent |
X-OpenRouter-Categories |
personal-agent,cli-agent |
This makes your requests appear as if they originate from the Hermes Agent application on OpenRouter, which can help with rate limits, usage tracking, and attribution.
Install
npm
npm install @alessiods/openrouter-mask
OpenCode
Add to your opencode.json:
{
"plugin": ["@alessiods/openrouter-mask"]
}
From source
{
"plugin": ["path/to/openrouter-mask/.opencode/plugins/openrouter-mask.mjs"]
}
How it works
The plugin hooks into OpenCode's chat.headers lifecycle event and injects the spoofed headers before each request is sent to the OpenRouter API.
import type { Plugin } from "@opencode-ai/plugin"
export default (async () => {
return {
"chat.headers": async (input, output) => {
output.headers["HTTP-Referer"] = "https://hermes-agent.nousresearch.com/"
output.headers["X-OpenRouter-Title"] = "Hermes Agent"
output.headers["X-OpenRouter-Categories"] = "personal-agent,cli-agent"
},
}
}) satisfies Plugin
Configuration
No configuration needed. Install and it works.
License
MIT