packages/river (@magpie-community/opencode-river-auth 0.1.0, provider `river`):
River's OpenAI-compatible inference API with the user's API key. Models come
from GET /v1/models, limits, image input and reasoning efforts come from
docs.river.ai, and live prices come from River's public pricing endpoint
(BOOT_PRICES as the fallback). Unknown ids are text-only. A 401 or 403 marks
the sign-in expired. The usage card says "Pay as you go". It adds River's
rows to registry.json and the README.
River runs open-weight models on its own GPU fleet (river.ai). It is not a
relay of other vendors' APIs.
Run at the reviewed head 751e502, merged onto main c0a0fd1, on mote (Bun 1.4.2):
- HOME=$(mktemp -d) bun test: 2975 pass, 8 skip, 0 fail across 250 files.
- bun test packages/river: 25 pass. bun scripts/check.mjs: ok.
- A probe with a fake fetch built from River's documented shapes and today's
real /api/public/pricing body (ids GLM-5.3, Kimi-K3, DeepSeek-V4.1-Flash):
- The rows have the documented limits. GLM-5.3 is text-only, the others take images.
- Each variant carries { reasoningEffort } with the documented levels.
- The costs come from the live prices.
- 401 throws signIn "expired" from models and from usage.
- A 503 or a network failure keeps the previous list.
- An empty list replaces the bootstrap rows.
- A provider the user configured is kept.
- RiverPlugin is the only exported function.
- Today's docs.river.ai/guides/inference-models and inference-controls
match LIMITS, IMAGES and VARIANTS.
- An earlier review round (at 233919f) broke the code by hand and saw the
river tests go red.
Not tried: a live River key (I don't have one; the author ran one).
Known gap: GLM-5.3 (pricing id "GLM-5.3") has no LIMITS or VARIANTS row, so
it lists with unknown limits and no efforts. It is text-only, so this is
safe.