pi-meridian-extension
Meridian proxy provider for pi — use your Claude Max subscription through the Meridian local proxy
Package details
Install pi-meridian-extension from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-meridian-extension- Package
pi-meridian-extension- Version
0.1.3- Published
- May 2, 2026
- Downloads
- 279/mo · 22/wk
- Author
- lnilluv
- License
- unknown
- Types
- extension
- Size
- 24.6 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-meridian-extension
Use your Claude Max subscription through pi via Meridian — a local proxy that bridges the Anthropic Messages API with Claude Code SDK authentication.
Without this extension, pi's default system prompt triggers an "You're out of extra usage" error on Claude Opus 4.6 (and potentially other models) when routed through Meridian. This extension rewrites the system prompt only for Meridian requests to avoid that issue, while leaving all other providers untouched.
What it does
- Registers a
meridianprovider with the current Meridian Claude models (Sonnet 4.6, Opus 4.6, Opus 4.7, Haiku 4.5) - Rewrites the system prompt for Meridian requests to avoid the extra-usage error, preserving project context and working directory
- Auto-starts Meridian on session start if the proxy isn't running
- Adds commands:
/meridian(health check),/meridian start,/meridian version
Models
| ID | Name |
|---|---|
meridian/claude-sonnet-4-6 |
Claude Sonnet 4.6 |
meridian/claude-opus-4-6 |
Claude Opus 4.6 |
meridian/claude-opus-4-7 |
Claude Opus 4.7 |
meridian/claude-haiku-4-5 |
Claude Haiku 4.5 |
Use them with --model, e.g. --model meridian/claude-opus-4-7:high.
Install
pi install npm:pi-meridian-extension
Requires Meridian installed globally:
npm install -g @rynfar/meridian
Configuration
| Env var | Default | Description |
|---|---|---|
MERIDIAN_BASE_URL |
http://127.0.0.1:3456 |
Meridian proxy URL |
MERIDIAN_API_KEY |
meridian |
Bearer token sent to Meridian. Set this to the same value as the Meridian daemon when upstream API-key auth is enabled. |
MERIDIAN_PROFILE |
unset | Optional Meridian profile ID sent as x-meridian-profile for multi-profile setups. |
Subagent Compatibility
When using pi-subagents with custom agent definitions (.md files in ~/.pi/agent/agents/), you must add the meridian extension to each agent's extensions: frontmatter. Without this, user-defined agents spawn with --no-extensions, which strips all global extensions — including this one — so the meridian provider won't be available.
Add the meridian extension path to your agent's frontmatter:
---
name: my-agent
extensions: /path/to/other/extension.ts, /opt/homebrew/lib/node_modules/pi-meridian-extension/extensions/index.ts
---
Note: This is only needed for user-defined agents with explicit
extensions:in their frontmatter. Builtin agents (likedelegate) inherit global extensions automatically.
Switch to Meridian
After installing, switch your model in pi:
/model meridian/claude-opus-4-7:high
Or use it for a single command:
pi --model meridian/claude-opus-4-7:high
Commands
/meridian— health check (connection status, runtime version, auth, mode)/meridian start— start the Meridian daemon if not running/meridian version— check installed vs latest version, update availability
How the prompt rewrite works
When provider === "meridian", the extension hooks before_provider_request and replaces the full system prompt with a concise version that:
- Identifies as Claude Code operating through Meridian for pi
- Preserves your
# Project Contextsection from the original prompt - Preserves
Current date:andCurrent working directory:lines - Drops pi's heavy default prompt that triggers the extra-usage error
All other providers continue to use pi's default system prompt unchanged.