{"repo":"ttimasdf/pi-provider-newapi","free":true,"listed":false,"github":"https://github.com/ttimasdf/pi-provider-newapi","clone":"git clone https://github.com/ttimasdf/pi-provider-newapi.git","description":"pi provider extension for self-hosted NewAPI AI gateway — dynamic model discovery with cost calculation from ratio_config. 适用于自托管 NewAPI AI 网关的 pi 模型提供商扩展 — 支持基于 ratio_config 进行动态模型发现并计算模型单价","language":"TypeScript","stars":45,"topics":[],"license":"MIT","category":"self-hosted-apps","readme_excerpt":"pi-provider-newapi Connect pi to one or more self-hosted NewAPI gateways. This extension requires Pi Coding Agent v0.84.0 or later . Each gateway becomes a separate, named provider in pi. The extension: - discovers available models dynamically from NewAPI; - enriches known models with pi's built-in capability and compatibility metadata; - selects a compatible API from the gateway's advertised endpoints, with optional regex overrides; - calculates model costs from NewAPI's ratio configuration when it is available; and - keeps the last successful model catalog available for offline use or temporary gateway failures. Pi remains responsible for credentials. The extension never copies API keys into its configuration, model definitions, logs, or cached catalogs. 中文文档 Installation Install from npm: Or install directly from GitHub: Quick start Add a gateway using its root URL (without /v1 ): The setup command performs a best-effort reachability check. A warning does not prevent the provider from being saved, since authenticated gateways often reject an anonymous probe. Next, enter the API key through pi's standard login flow: The provider is available in /login before its first model has been discovered. Once authenticated, open /model and choose a model such as my gateway/claude-sonnet-4-5 . Pi stores the credential through its configured credential store, normally /auth.json . Do not add the key to provider-newapi.json . Commands Command Description --- --- /newapi-provider-add [na","default_branch":null,"files":null,"tree":[],"storefront":"/r/ttimasdf","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ttimasdf/pi-provider-newapi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}