{"_id":"@d4rw1nz/pi-custom-provider","_rev":"7-52986438cce13408e4080fb4f31bcc26","name":"@d4rw1nz/pi-custom-provider","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.0":{"name":"@d4rw1nz/pi-custom-provider","version":"1.0.0","keywords":["pi-package","pi-extension","pi","llm","provider","models","coding-agent"],"author":{"name":"d4rw1nz"},"license":"MIT","_id":"@d4rw1nz/pi-custom-provider@1.0.0","maintainers":[{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"}],"homepage":"https://github.com/d4rw1nz/pi-custom-provider#readme","bugs":{"url":"https://github.com/d4rw1nz/pi-custom-provider/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"1367bbd8e840c94b926ea4c2e025c5d7aff63d6d","tarball":"https://registry.npmjs.org/@d4rw1nz/pi-custom-provider/-/pi-custom-provider-1.0.0.tgz","fileCount":8,"integrity":"sha512-NeZUmGeN8cy5FzuAaYzc+jcgJ0npTGAIjDMCxTpe6yEsSGHC9a3BDym3kVWA1TVSU+LrE/yntTPDwQlHSrdiqw==","signatures":[{"sig":"MEQCIEc7uevStcwGX0BQuDDz+xANh50LZTD3wSWPebCL/mZtAiB07CWplkbpv61N4tmI/WIJePRoREUXSl3sgnKe0izPwg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61098},"pnpm":{"onlyBuiltDependencies":[]},"engines":{"node":">=22.19.0"},"gitHead":"e2f210fbb1a50860c5409ed50f1dbca88ee125c6","scripts":{"pack:check":"npm pack --dry-run"},"_npmUser":{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"},"repository":{"url":"git+https://github.com/d4rw1nz/pi-custom-provider.git","type":"git"},"_npmVersion":"11.6.2","description":"Interactive wizard to manage custom LLM providers and models for the pi coding agent","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-custom-provider_1.0.0_1785124454257_0.6671540491979262","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@d4rw1nz/pi-custom-provider","version":"1.0.1","keywords":["pi-package","pi-extension","pi","llm","provider","models","coding-agent"],"author":{"name":"d4rw1nz"},"license":"MIT","_id":"@d4rw1nz/pi-custom-provider@1.0.1","maintainers":[{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"}],"homepage":"https://github.com/d4rw1nz/pi-custom-provider#readme","bugs":{"url":"https://github.com/d4rw1nz/pi-custom-provider/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"e0af7b10964e791a78a013a7c61f75f83421c011","tarball":"https://registry.npmjs.org/@d4rw1nz/pi-custom-provider/-/pi-custom-provider-1.0.1.tgz","fileCount":8,"integrity":"sha512-gXf04mx41K1Cf1VOLfIFvQrkmLTLQz651BMmSMBnBc75hA6lQQvUG2WWBJpQ+QHYUvO4oURUZByeZx2xn4u1rw==","signatures":[{"sig":"MEYCIQCkQOlqLXYlrAmOZ+6Vn/0lxYFuGbSW/tP5mj7KjwPcTQIhAJ/OouBREVVXHPJ9IusQONUARyXTLMJwwjbLtsU2YIxH","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63483},"pnpm":{"onlyBuiltDependencies":[]},"engines":{"node":">=22.19.0"},"gitHead":"3aaf78217701c1ea089cd0c92e3eed6bfff1a2f4","scripts":{"pack:check":"npm pack --dry-run"},"_npmUser":{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"},"repository":{"url":"git+https://github.com/d4rw1nz/pi-custom-provider.git","type":"git"},"_npmVersion":"11.6.2","description":"Interactive wizard to manage custom LLM providers and models for the pi coding agent","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-custom-provider_1.0.1_1786552316346_0.46689844496021604","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@d4rw1nz/pi-custom-provider","version":"1.0.2","keywords":["pi-package","pi-extension","pi","llm","provider","models","coding-agent"],"author":{"name":"d4rw1nz"},"license":"MIT","_id":"@d4rw1nz/pi-custom-provider@1.0.2","maintainers":[{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"}],"homepage":"https://github.com/d4rw1nz/pi-custom-provider#readme","bugs":{"url":"https://github.com/d4rw1nz/pi-custom-provider/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"046c9772af9722752cac8a65a12c1b70f73deda8","tarball":"https://registry.npmjs.org/@d4rw1nz/pi-custom-provider/-/pi-custom-provider-1.0.2.tgz","fileCount":8,"integrity":"sha512-z1jiUNGbLU8C1GyAqAFq7Z6vpJYq13CDBVE/XxiaGF0uMl5hBo8rIlqXCtuzay6IWF8CGuCnxAZTz9Y2LCO3Vg==","signatures":[{"sig":"MEUCIQDyCU1QVfp0RqwTThnb6slVzFwXXVAsbLsMi/8AU2++CAIgNj6SqUGGVh3WMlZWergcViNroPOwT/Y0Y/En/lQTYRQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82078},"pnpm":{"onlyBuiltDependencies":[]},"engines":{"node":">=22.19.0"},"gitHead":"136954fffb9a5996419a67e5660442cc9443dc07","scripts":{"pack:check":"npm pack --dry-run"},"_npmUser":{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"},"repository":{"url":"git+https://github.com/d4rw1nz/pi-custom-provider.git","type":"git"},"_npmVersion":"11.6.2","description":"Interactive wizard to manage custom LLM providers and models for the pi coding agent","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-custom-provider_1.0.2_1787130908916_0.41019959688659147","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@d4rw1nz/pi-custom-provider","version":"1.0.3","keywords":["pi-package","pi-extension","pi","llm","provider","models","coding-agent"],"author":{"name":"d4rw1nz"},"license":"MIT","_id":"@d4rw1nz/pi-custom-provider@1.0.3","maintainers":[{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"}],"homepage":"https://github.com/d4rw1nz/pi-custom-provider#readme","bugs":{"url":"https://github.com/d4rw1nz/pi-custom-provider/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"6afe5182115b8f5a5e914f7300f1541fe74e16cc","tarball":"https://registry.npmjs.org/@d4rw1nz/pi-custom-provider/-/pi-custom-provider-1.0.3.tgz","fileCount":8,"integrity":"sha512-6cCvYd5hMfX8HlHBfvPg1PwAGjYZcptehbIgVw2nz1wm0+AgEqGveShXPYXRAHmeZxfbmLeq/oOanteUdO/iOQ==","signatures":[{"sig":"MEQCIC5ZgpDOqMhlPl7wuZTd6yiQn3lNcbJlQzAVkLz9uO2vAiBCDwSfbLq4GOjEWrNZ5vq9FmdDH8shMJ8C8j1KJV8jwA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90873},"pnpm":{"onlyBuiltDependencies":[]},"engines":{"node":">=22.19.0"},"gitHead":"66d9e1bd9e6bc28ebbe77864d7a480ca04797bbc","scripts":{"pack:check":"npm pack --dry-run"},"_npmUser":{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"},"repository":{"url":"git+https://github.com/d4rw1nz/pi-custom-provider.git","type":"git"},"_npmVersion":"11.6.2","description":"Interactive wizard to manage custom LLM providers and models for the pi coding agent","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-custom-provider_1.0.3_1787194382718_0.766950751642719","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@d4rw1nz/pi-custom-provider","version":"1.0.6","keywords":["pi-package","pi-extension","pi","llm","provider","models","coding-agent"],"author":{"name":"d4rw1nz"},"license":"MIT","_id":"@d4rw1nz/pi-custom-provider@1.0.6","maintainers":[{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"}],"homepage":"https://github.com/d4rw1nz/pi-custom-provider#readme","bugs":{"url":"https://github.com/d4rw1nz/pi-custom-provider/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"ea0107f981b553686f22f67c598d6a30ff1947e2","tarball":"https://registry.npmjs.org/@d4rw1nz/pi-custom-provider/-/pi-custom-provider-1.0.6.tgz","fileCount":12,"integrity":"sha512-gNI1AVB13BE5JqA2vrwRMbwieMOmlo6NjNnDrjBOlon8qhrpgYtIVTZZ68N19Zp76656sfFbjX9VB/xP4fQlGw==","signatures":[{"sig":"MEUCIHEbxdziL9kLcQe/rKpO+X0c3f/U/8rlaTyAaAfVI4iLAiEAuweiab0EyBEoEojLlO9qAUI+Z8W2YQSc1+jkFcioTEI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCi3ft7txWMy9n+JFZTr7PWuc3D1VzPeVzhQvVALAEN/QIhAMhNPN4q9XYcftIdRjpiHSHAiam9XAw+3lIMuJ3Um2rI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@d4rw1nz%2fpi-custom-provider@1.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":141053},"pnpm":{"onlyBuiltDependencies":[]},"type":"module","engines":{"node":">=22.19.0"},"gitHead":"8099f5b340b560731dceee5b82337f9fd0f45092","scripts":{"test":"npx tsx src/test.ts && npx tsx src/e2e.ts","typecheck":"npx -p typescript tsc --noEmit --skipLibCheck --moduleResolution bundler --module esnext --target es2022 --allowImportingTsExtensions src/index.ts src/oauth.ts src/pi-catalog.ts src/provider-registry.ts src/provider-flow.ts src/wizard.ts src/models-config.ts src/discovery.ts","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6fec12e1-d5b1-4754-bf9d-5a2ff9b74a13"}},"repository":{"url":"git+https://github.com/d4rw1nz/pi-custom-provider.git","type":"git"},"_npmVersion":"12.0.2","description":"Interactive wizard to manage custom LLM providers and models for the pi coding agent","directories":{},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-custom-provider_1.0.6_1788770615165_0.8927318285145942","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@d4rw1nz/pi-custom-provider","version":"1.0.7","keywords":["pi-package","pi-extension","pi","llm","provider","models","coding-agent","provider-setup","openai-compatible","oauth"],"author":{"name":"d4rw1nz"},"license":"MIT","_id":"@d4rw1nz/pi-custom-provider@1.0.7","maintainers":[{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"}],"homepage":"https://github.com/d4rw1nz/pi-custom-provider#readme","bugs":{"url":"https://github.com/d4rw1nz/pi-custom-provider/issues"},"pi":{"image":"https://raw.githubusercontent.com/d4rw1nz/pi-custom-provider/main/assets/cover.png","extensions":["./src/index.ts"]},"dist":{"shasum":"ad6365c540b7292513c216110f69eeeeaf7d4506","tarball":"https://registry.npmjs.org/@d4rw1nz/pi-custom-provider/-/pi-custom-provider-1.0.7.tgz","fileCount":14,"integrity":"sha512-ct9TuU7GQwp1OgF+/PFwLDcbkpBNjlrFlnVoC0SC3PSji7Apdz6ES0yjQHDLLYgL4l63Ml56XzfE9VYXtm8+Yw==","signatures":[{"sig":"MEUCIHUjz2LPH7zaV+zr00E5cm7IVaW0Flp3oViHNL4mAIWYAiEA06zfTo4AkM//cRIS2ty2ugig13/LEDcSjsG8G77DpGM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDVpEIJ1pMiyz7OxtPRRBEqrWIvQ2SuUIQKiVTIBlWRzgIgShSD6hdeHvRvGgunBdSx1W7guYphyv5ffCxJozbm8MY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@d4rw1nz%2fpi-custom-provider@1.0.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1563251},"pnpm":{"onlyBuiltDependencies":[]},"type":"module","engines":{"node":">=22.19.0"},"gitHead":"8e483623a197503ea27394aee8c90e90e1ddfe8a","scripts":{"test":"npx tsx src/test.ts && npx tsx src/e2e.ts","typecheck":"npx -p typescript tsc --noEmit --skipLibCheck --moduleResolution bundler --module esnext --target es2022 --allowImportingTsExtensions src/index.ts src/oauth.ts src/pi-catalog.ts src/provider-registry.ts src/provider-flow.ts src/wizard.ts src/models-config.ts src/discovery.ts","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6fec12e1-d5b1-4754-bf9d-5a2ff9b74a13"}},"repository":{"url":"git+https://github.com/d4rw1nz/pi-custom-provider.git","type":"git"},"_npmVersion":"12.0.2","description":"Interactive wizard to manage custom LLM providers and models for the pi coding agent","directories":{},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-custom-provider_1.0.7_1788774077741_0.2134721317460755","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"pi":{"image":"https://raw.githubusercontent.com/d4rw1nz/pi-custom-provider/main/assets/cover.png","extensions":["./src/index.ts"]},"_id":"@d4rw1nz/pi-custom-provider@1.0.8","bugs":{"url":"https://github.com/d4rw1nz/pi-custom-provider/issues"},"dist":{"shasum":"d46b67ed9f3e1875db077065637b7485fcc4da25","tarball":"https://registry.npmjs.org/@d4rw1nz/pi-custom-provider/-/pi-custom-provider-1.0.8.tgz","fileCount":14,"integrity":"sha512-5NsvON+9RHwLZ243b2zVzRpQf+v0Tf2C3P9qOMREjWazqa8zriTDHJweb/B2OfAABlof6Am1PjeF0jfTGSf4lA==","signatures":[{"sig":"MEYCIQDOPC0qQgUqchoICZUaJghD/zKzdkkU82LkSH6pVpNjgQIhALbStMSNv7/wwvd4gMKwoH46E6H1fa9DxB76XhzedLzT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBJu0xIg8ORNE57Y3RKiTMH1ysg89BCgvgmFRH9kTC8WAiAk8PAYyIXHBOQgZAPgup/ZShgFN01PgDUoCxX4t+mgeg=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@d4rw1nz%2fpi-custom-provider@1.0.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1562708},"name":"@d4rw1nz/pi-custom-provider","pnpm":{"onlyBuiltDependencies":[]},"type":"module","author":{"name":"d4rw1nz"},"engines":{"node":">=22.19.0"},"gitHead":"e8329fa80cb0d69fbb5478bda0ea50714fd330d0","license":"MIT","scripts":{"test":"npx tsx src/test.ts && npx tsx src/e2e.ts","typecheck":"npx -p typescript tsc --noEmit --skipLibCheck --moduleResolution bundler --module esnext --target es2022 --allowImportingTsExtensions src/index.ts src/oauth.ts src/pi-catalog.ts src/provider-registry.ts src/provider-flow.ts src/wizard.ts src/models-config.ts src/discovery.ts","pack:check":"npm pack --dry-run"},"version":"1.0.8","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6fec12e1-d5b1-4754-bf9d-5a2ff9b74a13"}},"homepage":"https://github.com/d4rw1nz/pi-custom-provider#readme","keywords":["pi-package","pi-extension","pi","llm","provider","models","coding-agent","provider-setup","openai-compatible","oauth"],"repository":{"url":"git+https://github.com/d4rw1nz/pi-custom-provider.git","type":"git"},"_npmVersion":"12.0.2","description":"Interactive wizard to manage custom LLM providers and models for the pi coding agent","directories":{},"maintainers":[{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"}],"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-custom-provider_1.0.8_1788965345238_0.5204225834830527"}}},"time":{"created":"2026-07-27T03:54:14.128Z","modified":"2026-09-09T14:49:05.733Z","1.0.0":"2026-07-27T03:54:14.397Z","1.0.1":"2026-08-12T16:31:56.488Z","1.0.2":"2026-08-19T09:15:09.058Z","1.0.3":"2026-08-20T02:53:02.876Z","1.0.6":"2026-09-07T08:43:35.260Z","1.0.7":"2026-09-07T09:41:17.858Z","1.0.8":"2026-09-09T14:49:05.413Z"},"bugs":{"url":"https://github.com/d4rw1nz/pi-custom-provider/issues"},"author":{"name":"d4rw1nz"},"license":"MIT","homepage":"https://github.com/d4rw1nz/pi-custom-provider#readme","keywords":["pi-package","pi-extension","pi","llm","provider","models","coding-agent","provider-setup","openai-compatible","oauth"],"repository":{"url":"git+https://github.com/d4rw1nz/pi-custom-provider.git","type":"git"},"description":"Interactive wizard to manage custom LLM providers and models for the pi coding agent","maintainers":[{"name":"d4rw1nz","email":"zhang13290002391@gmail.com"}],"readme":"# pi-custom-provider\n\n![Pi Custom Provider 封面](https://raw.githubusercontent.com/d4rw1nz/pi-custom-provider/main/assets/cover.png)\n\n[English](README.md) · 中文\n\n> 在 Pi 中配置任意自定义 LLM 接口，无需手动编辑 `models.json`。\n\n## 简介\n\n`pi-custom-provider` 是一个 Pi 交互式扩展，用来添加和维护自定义 LLM Provider。它支持 OpenAI 兼容接口、由 Pi Catalog 驱动的 API 类型、模型发现、模型元数据、兼容性配置、API Key，以及 Pi 支持的 OAuth 流程。\n\n## 安装\n\n安装 npm 最新版本：\n\n```bash\npi install npm:@d4rw1nz/pi-custom-provider\n```\n\n安装指定版本：\n\n```bash\npi install npm:@d4rw1nz/pi-custom-provider@1.0.6\n```\n\n只在当前会话试用，不修改持久化配置：\n\n```bash\npi -e npm:@d4rw1nz/pi-custom-provider\n```\n\n安装后重启 Pi，然后执行：\n\n```text\n/provider-setup\n```\n\n## 快速开始\n\n1. 在 Pi 中执行 `/provider-setup`。\n2. 选择 **Create New Provider**。\n3. 选择 API 类型。大多数 OpenAI 兼容服务选择 `openai-completions`。\n4. 输入 Base URL，例如 `https://example.com/v1`。\n5. 输入 Provider ID，例如 `my-llm`。\n6. 普通自定义接口选择 **API Key**；只有确实要使用对应 OAuth 流程时才选择 GitHub Copilot 或 OpenRouter 等 OAuth Provider。\n7. 输入 API Key，或完成 OAuth 配置。\n8. 等待模型发现，选择要使用的模型，按 Enter 保存。\n9. 在 Pi 中选择模型并开始使用。\n\n## 使用流程\n\n```text\n/provider-setup\n  ├─ 新建 Provider\n  ├─ API Type\n  ├─ Base URL\n  ├─ Provider ID\n  ├─ 认证方式\n  │   ├─ API Key\n  │   └─ OAuth Provider → OAuth JSON / Pi OAuth 登录\n  ├─ 发现模型\n  ├─ 选择模型\n  ├─ 编辑模型信息（可选）\n  └─ 检查并保存\n```\n\n编辑已有 Provider：\n\n```text\n选择 Provider → Edit Config → 修改 Provider 配置 → 选择模型\n```\n\n## 认证说明\n\n对于自定义 OpenAI 兼容接口，应选择 **API Key**。\n\n**GitHub Copilot** 和 **OpenRouter** 是当前安装的 `pi-ai` Catalog 提供的 OAuth 实现，并不是插件根据你的 Base URL 推断出来的 Provider。某个 OAuth Provider 只有在其内置模型声明支持当前 API 类型时，才会显示在列表中。\n\nOAuth 凭据支持外部 JSON 文件、直接粘贴 JSON，或使用 Pi 自己的 OAuth 登录并保存到：\n\n```text\n~/.pi/agent/auth.json\n```\n\n## 模型发现与编辑\n\n扩展支持：\n\n- 从配置的 API 自动发现模型；\n- 根据 Base URL 和模型 ID 补充候选模型；\n- 从 [models.dev](https://models.dev) 获取上下文、输出长度、价格、输入模态等元数据；\n- 按 `n` 手动添加模型；\n- 按 `/` 过滤模型；\n- 按 `a` 全选模型；\n- 编辑 reasoning、图片输入、上下文窗口、最大输出、价格、thinking levels 和 `compat` JSON；\n- 按 `p` 从当前安装的 `pi-ai` Catalog 选择完整模型预设。\n\n候选模型只有在选中后才会保存。已有 Provider 的模型编辑会自动保存。\n\n## 配置文件与安全\n\nProvider 配置保存在：\n\n```text\n~/.pi/agent/models.json\n```\n\nPi OAuth 凭据保存在：\n\n```text\n~/.pi/agent/auth.json\n```\n\n这两个文件都包含敏感信息，请勿提交或分享。本扩展以 Pi 用户权限运行，模型发现时会访问你配置的服务端点和 `models.dev`。\n\n## 开发与发布\n\n```bash\npnpm install\npnpm test\npnpm run typecheck\npnpm run pack:check\n```\n\n推送 `v*.*.*` 格式的 tag 后，GitHub Actions 会自动测试并发布 npm：\n\n```bash\nnpm version patch\ngit push origin main --follow-tags\n```\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.zh-CN.md"}