# Daniel Griesser 发布了 pi-openrouter 扩展，将 OpenRouter 的 advisor、subagent 等服务器工具集成到 Pi 平台，支持实时进度和成本显示

- 来源：OpenRouter
- 发布时间：2026-07-16 20:32
- AIWatch 分数：64
- AIWatch 标记：当日精选
- AIWatch 链接：https://aiwatch.icu/events/evt_01kxzk089gb18f2n5rg9s1nx6j
- 原文链接：https://x.com/OpenRouter/status/2077820294832545882

## 精选理由

常规快讯，保留列表

## AI 摘要

Daniel Griesser 发布了 pi-openrouter 扩展，将 OpenRouter 的 advisor、subagent 等服务器工具集成到 Pi 平台，支持实时进度和成本显示。

## 正文

Pi extension exposing OpenRouter server tools as local pi tools — works with any pi provider, not just OpenRouter.

Each tool makes a one-shot OpenRouter chat-completions call where a cheap executor model (google/gemini-2.5-flash by default) invokes the server tool and relays its output verbatim.

Tools

Tool	Server tool	What it does
or_advisor	openrouter:advisor	Consult a stronger model (default ~anthropic/claude-opus-latest) for guidance; optional web search
or_subagent	openrouter:subagent	Delegate a self-contained task to a fast worker model (default ~anthropic/claude-haiku-latest)
or_web_search	openrouter:web_search	Web search with citations
or_web_fetch	openrouter:web_fetch	Fetch/extract URL content (pages, docs, PDFs)
or_fusion	openrouter:fusion	Multi-model panel + judge analysis

All tools show live progress in the TUI: spinner, phase, elapsed time, and bytes received as the result streams in.

While running:

Live progress: spinner, phase label, and elapsed time while delegating to a worker model

When done:

Final result: checkmark with size, duration, server tool calls, and cost, plus output preview

Out of scope: datetime, image_generation, shell, files, apply_patch, experimental__search_models — pi covers most natively, shell/patch require the Responses API.

Install

pi install git:github.com/HazAT/pi-openrouter

Or for local development, clone and add to ~/.pi/agent/settings.json:

{ "extensions": ["/path/to/pi-openrouter/index.ts"] }

(This repo also wires itself via .pi/settings.json, so running pi inside the checkout loads the extension automatically.)

API key

Resolved in order:

OPENROUTER_API_KEY environment variable
pi model registry (openrouter provider)
~/.pi/agent/models.json → providers.openrouter.apiKey

Cost

Every call bills the executor model's tokens plus server-tool usage on your OpenRouter account. The executor is cheap and output is capped, but or_fusion and or_advisor with large models can cost real money. Cost per call is surfaced in the tool result details.

Development

vp install
vp check     # format + lint + typecheck (Vite+ toolchain)
pi           # extension auto-loads via .pi/settings.json

License

MIT
