Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-relace-provider

A pi extension that adds Relace as a model provider. Relace exposes an OpenAI-compatible Chat Completions API at https://models.relace.ai/v1, so this package registers it declaratively with pi's built-in openai-completions implementation.

Models

Model Context Max output Reasoning
deepseek-ai/DeepSeek-V4-Flash-0731 1M 384K yes

Add more models (e.g. deepseek-ai/DeepSeek-V4-Pro-...) by copying a model entry in index.ts and installing the updated package.

Install

From npm (once published) — listed on the Pi package marketplace

pi install npm:pi-relace-provider@0.1.3

This package is available on the Pi package marketplace (npm-backed). Publishing requires an npmjs.com account and a publish token; the manifest ships with keywords: ["pi-package"] so it registers for gallery discoverability.

Curl (one-liner)

curl -sfL https://raw.githubusercontent.com/shivamnarkar47/pi-relace-provider/main/install.sh | bash

The script installs the package into your user settings and reports next steps.

Manual

pi install https://github.com/shivamnarkar47/pi-relace-provider

DIY (copy the single file)

The whole extension is one self-contained file. Drop it in ~/.pi/agent/extensions/:

curl -sfL https://raw.githubusercontent.com/shivamnarkar47/pi-relace-provider/main/index.ts \
  -o ~/.pi/agent/extensions/relace-provider.ts

Authentication

The package reads the API key from $RELACE_API_KEY (via apiKey: "$RELACE_API_KEY").

export RELACE_API_KEY="rlc-..."

Alternatively, run /login relace inside a session to store the key persistently (pi writes it to ~/.pi/agent/auth.json).

Usage

# One-shot
pi --provider relace --model "deepseek-ai/DeepSeek-V4-Flash-0731" "Hello"

# Pick in the model switcher (Ctrl+P) after starting an interactive session
pi

Privacy

Your API key is referenced by environment variable ($RELACE_API_KEY) and is never embedded in this repository. Credentials entered via /login are stored only in pi's local auth.json.

License

Apache-2.0

About

Relace provider for pi: register models.relace.ai as an OpenAI-compatible model provider

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages