omp packages

pi-river0.1.1

River.ai provider for Pi

zer020 Published 1 hour ago MIT ~336 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-river

npm version license npm downloads

Use River.ai models in Pi, including DeepSeek, GLM, Nemotron, Qwen, and Kimi. The extension adds River to Pi's model picker with model discovery, thinking controls, image input, tool calling, and token/cost tracking.

Quick start

You need Pi 1.1.0 or newer, Git, and a River inference API key from the River console. The extension has been tested with Pi 1.4.0.

1. Install

Run this in your terminal:

# Stable release from the npm registry:
pi install npm:pi-river

# Or the latest development source from GitHub:
pi install git:github.com/ZeR020/pi-river

Both use Pi's package manager and register the extension. Plain npm install pi-river only downloads the files — Pi never loads it that way. Then start Pi. If Pi is already running, enter /reload to load the extension.

2. Connect your River account

In Pi, enter:

/login river

Paste your River API key when prompted. Pi saves it for future sessions.

Alternatively, set the RIVER_API_KEY environment variable before starting Pi. If both are configured, the saved key takes precedence.

3. Choose a model

Enter /model, search for river, and select a model. Enter /thinking to choose its reasoning setting. You can now use it for normal Pi conversations and coding tasks.

Requests use your River account and are billed by River. Your conversation content is sent to River when you use one of its models.

Models and thinking settings

The extension has verified configuration for the following models. Context and output limits are in tokens; context includes both input and output.

Model Context Maximum output Thinking settings
DeepSeek-V4.1-Flash 1,048,576 393,216 Off / Low / High / Max
DeepSeek-V4.1-Flash-1017 1,048,576 393,216 Off / Low / High / Max
GLM-5.3-Flash 1,048,576 128,000 Low / High / Max
GLM-5.3 1,048,576 128,000 Low / High / Max
Nemotron-3.5-Super-VL-120B-A12B-NVFP4 1,048,576 1,048,575 Off / Medium / High
Qwen3.8-27B-FP8 262,144 262,143 Off / Low / Medium / XHigh
Kimi-K3 1,048,576 1,048,575 Off / Max

These models accept text and images, except the full GLM-5.3, which is text only. Reasoning tokens and the final answer share the output limit. River lists GLM output as 128K; the extension conservatively uses 128,000. Pi may send a smaller output budget to leave room for your input and its context safety margin.

GLM-5.3-Flash and the full GLM-5.3 cannot turn reasoning off. Every other listed model can, through its Off setting. River sets each model's default: maximum effort for GLM and Kimi, XHigh for Qwen, on for Nemotron, and off for DeepSeek.

Specifications are based on River's model documentation, reasoning controls. Where River and a model author's guide differ (Kimi-K3), River's deployment table is used.

What model discovery does

The extension fetches the models listed for your River account, so newly released models can appear without adding their IDs by hand. River's list can omit models your key can still call (verified against the API on 2026-11-03), so the catalog is the union of the live list and the extension's docs-verified models: omissions never hide a working model, and genuinely new live-only models still appear with unverified labeling.

Discovery does not automatically configure a new model's specifications. River's model-list API returns IDs but no context limits, thinking settings, capabilities, or prices. Those details are verified and maintained in the extension separately.

An unrecognized model is labeled unverified metadata; estimated pricing. It uses text-only input, no selectable thinking controls, and placeholder limits of 16,384 context / 4,096 output tokens. These are conservative defaults, not the model's actual specifications. An extension update is needed to add verified support.

Privacy

The extension sends River only what the API needs: your API key, the request itself (conversation content and parameters), and a neutral pi user agent. The OpenAI SDK's platform headers (X-Stainless-* carrying OS, architecture, and runtime details) are removed from every request, and the extension contains no telemetry, analytics, or device fingerprinting. Pi's optional install telemetry never goes to River and is off unless you enable it. Your IP address is necessarily visible to River while connected to its servers; hiding it would require routing traffic through a proxy or VPN.

Usage and costs

Pi tracks token usage and estimates cost using the extension's model pricing, including discounted cached input. Rates are maintained in the extension; they are not fetched automatically. Check River's current prices for billing rates. Prices labeled estimated are placeholders, not guaranteed upper bounds; Pi's display is not an invoice.

Troubleshooting

  • No River models appear: check your API key with /login river, confirm it has inference access, and reopen /model. Catalog requests time out after five seconds.
  • A model has no thinking options or unexpectedly small limits: check whether its name says unverified. Update the extension and run /reload; if it is still unverified, its specifications have not been added yet.
  • The model list cannot refresh: cached models remain available after failed refreshes. pi --offline skips the startup model-list request, but River inference still needs an internet connection.

Contributing

See CONTRIBUTING.md for development setup, tests, and how to add verified model support. The extension reuses Pi's built-in streaming and tool handling rather than maintaining a separate implementation.

License

MIT © 2026 ZeR020 — see LICENSE.