Files
fusion/packages/pi-claude-cli
gsxdsm 2335a07620 FN-7291: add Claude Sonnet 5 Anthropic support
Adds Claude Sonnet 5 to Anthropic model catalogs, pricing, and pi execution paths.

- Register supplemental direct Anthropic model metadata for Claude Sonnet 5 with deduping.
- Surface the model through dashboard model routes and engine session creation for non-Claude-CLI pi sessions.
- Add Claude CLI provider metadata, pricing coverage, tests, and a published package changeset.

Files changed:
 .changeset/fn-7291-sonnet-5-anthropic.md           |   7 ++
 packages/core/src/__tests__/model-pricing.test.ts  |  28 +++++
 packages/core/src/anthropic-models.ts              | 127 +++++++++++++++++++++
 packages/core/src/index.ts                         |   7 ++
 packages/core/src/model-pricing.ts                 |  13 ++-
 .../dashboard/src/__tests__/routes-auth.test.ts    |  67 +++++++++++
 packages/dashboard/src/routes.ts                   |   6 +-
 .../dashboard/src/routes/register-model-routes.ts  |   5 +-
 .../src/__tests__/pi-create-fn-agent.test.ts       |  67 +++++++++++
 .../src/cli-agent/adapters/__tests__/pi.test.ts    |  16 +++
 packages/engine/src/pi.ts                          |   2 +
 packages/pi-claude-cli/index.ts                    |  13 +++
 .../src/__tests__/process-manager.test.ts          |   4 +-
 .../pi-claude-cli/src/__tests__/provider.test.ts   |  31 ++++-
 14 files changed, 384 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7291

Fusion-Task-Lineage: 6494fce8-4101-47f5-9137-306408fd7920

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 13:20:27 -07:00
..
2026-06-28 12:49:55 -07:00
2026-06-28 12:49:55 -07:00

pi-claude-cli

A pi extension that routes LLM calls through the Claude Code CLI as a subprocess. Use your Claude Pro/Max subscription as the LLM backend — no API key, no separate billing.

How it works

The extension registers as a custom pi provider exposing all Claude models. Each request spawns a claude -p subprocess using the stream-json wire protocol, with --resume on follow-up turns to reuse the CLI's session state instead of replaying full history. Claude proposes tool calls, pi executes them natively. Custom pi tools are exposed to Claude via a schema-only MCP server.

Requirements

  • Claude Code CLI installed and authenticated (claude on PATH)
  • A Claude Pro or Max subscription
  • pi or GSD

Installation

Add to ~/.gsd/agent/settings.json:

{
  "packages": ["npm:pi-claude-cli"]
}

Then select a Claude model via /model in the interactive UI. All Claude models appear under the pi-claude-cli provider.

Features

  • Streams text, thinking, and tool call tokens in real-time
  • Maps tool names and arguments bidirectionally between Claude and pi
  • Exposes custom pi tools to Claude via MCP (schema-only, no execution)
  • Break-early pattern prevents Claude CLI from auto-executing tools
  • Session resume via --resume eliminates history replay on follow-up turns
  • Configurable thinking effort with elevated budgets for Opus models
  • Cross-platform subprocess management (Windows, macOS, Linux)
  • Inactivity timeout and process registry for cleanup

License

MIT