@zzjcool/pi-custom-endpoint

Pi provider for any compatible endpoint: log in with a base URL, API key, and protocol, and refresh its models automatically

Packages

Package details

extension

Install @zzjcool/pi-custom-endpoint from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@zzjcool/pi-custom-endpoint
Package
@zzjcool/pi-custom-endpoint
Version
0.1.0
Published
Oct 9, 2026
Downloads
201/mo · 201/wk
Author
zzjcool
License
MIT
Types
extension
Size
11.6 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@zzjcool/pi-custom-endpoint

A Pi package that connects to any compatible endpoint. Log in once with a base URL, an API key, and a protocol. Pi refreshes the model list when it starts and whenever you open /model, and keeps the last list for offline use.

Install

pi install npm:@zzjcool/pi-custom-endpoint

Use

Run /login and choose Custom endpoint (URL + key):

  1. Base URL, for example https://example.com/v1
  2. API key
  3. Protocol:
Protocol Typical endpoints
OpenAI Completions one-api, new-api, vLLM, Ollama, LM Studio, LiteLLM
OpenAI Responses OpenAI Responses API and compatible gateways
Anthropic Messages Claude API and Anthropic-compatible proxies
Google Generative AI Gemini API

Models then appear under the custom-endpoint provider in /model.

Logging in again replaces the endpoint. Only one endpoint is active at a time.

Model metadata

The list comes from GET {baseUrl}/models. Fields are used when the endpoint provides them and fall back otherwise:

Field Fallback
Context window 128000
Max output tokens 8192
Reasoning disabled
Image input text only
Display name model id

Costs are reported as zero. Models whose id contains embedding are skipped.

Authentication follows the protocol: Authorization: Bearer for both OpenAI formats, x-api-key for Anthropic, and ?key= for Google.