pi-model-suitable-tools

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

pi-model-suitable-tools

Pi Extension that switches model-facing tool shapes to match the active model family without changing prompts.

Motivation

Different model families are trained around different tool shapes. As Cursor notes in their article, giving each model the tool format it already expects can reduce unnecessary reasoning and mistakes. This extension applies that idea to Pi by exposing model-appropriate tool shapes while keeping the underlying behavior consistent.

Usage

Install this package into Pi:

pi install npm:pi-model-suitable-tool

For project-local installation, use Pi's local settings flag:

pi install -l npm:pi-model-suitable-tools

Behavior

  • Claude models get Claude Code style aliases: Read, Edit, Write, Bash, Grep, Glob, LS.
  • GPT/Codex models get Codex's default shell shape: shell_command, plus apply_patch.
  • Alias tools delegate to Pi built-in tools where possible.
  • apply_patch is implemented locally with Codex-style patch grammar.

Development

Install dependencies:

bun install

Run tests:

bun test

Run Pi with the extension temporarily during development:

pi -e ./