pi-opencode-zen

Free OpenCode Zen models (Nemotron, MiMo, DeepSeek, etc.) for the pi coding agent

Packages

Package details

extension

Install pi-opencode-zen from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-opencode-zen
Package
pi-opencode-zen
Version
0.3.2
Published
Sep 20, 2026
Downloads
336/mo · 206/wk
Author
feng-h
License
MIT
Types
extension
Size
10.8 KB
Dependencies
0 dependencies · 0 peers
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

pi-opencode-zen

npm version npm downloads License: MIT pi-package

English | 简体中文

Use OpenCode Zen's free models (e.g. nemotron-3.5-lightning-free, mimo-v2.5-free) inside the pi coding agent. No API key, no account, no login.

Install

Install via npm (recommended):

pi install npm:pi-opencode-zen

Or install directly from GitHub:

pi install git:github.com/Feng-H/pi-opencode-zen

Zero config — after installing, switch models with /model inside pi and pick a free model under opencode-zen.

How it works

OpenCode Zen exposes an OpenAI-compatible endpoint at https://opencode.ai/zen/v1. As of 2026-09 it grants free-tier access when a request:

  • carries an empty Authorization: Bearer header (any non-empty invalid token is rejected with 401), and
  • includes an x-session-id header — without it, Zen rejects with MissingSessionID: OpenCode's free tier can only be used in OpenCode. The extension generates one stable UUID per client startup, which is sufficient.

The extension registers an opencode-zen provider that points pi at the Zen endpoint, sets both headers, and fetches the live model list from /models at startup (falling back to a static list on failure).

Models

Fetched dynamically; only free models (id containing -free) are registered. Current pool (verified 2026-09-15):

Model Reasoning Notes
nemotron-3.5-lightning-free yes verified working
nemotron-3-ultra-free yes
mimo-v2.5-free yes often rate-limited
muse-spark-1.3-contributor-free no currently 500s upstream
muse-spark-1.2-contributor-free no currently 500s upstream
ling-3.0-flash-fin-free no Ant Ling (finance-tuned)
deepseek-v4-flash-free retired upstream

The pool rotates: new -free models appear automatically; individual models may be rate-limited or unavailable at any time — try another one.


中文说明

pi 中使用 OpenCode Zen免费模型(如 nemotron-3.5-lightning-freemimo-v2.5-free)。无需 API key、无需注册、无需登录。

安装方式

通过 npm 官方镜像 安装(推荐):

pi install npm:pi-opencode-zen

或者直接从 GitHub 安装:

pi install git:github.com/Feng-H/pi-opencode-zen

零配置 —— 装好后 pi 对话里 /model 切换,选 opencode-zen 下的免费模型即可。

工作原理

OpenCode Zen 提供 OpenAI 兼容端点 https://opencode.ai/zen/v12026-09 起免费访问需同时满足:

  • Authorization: Bearer Bearer —— 填任何非空无效 token 反而被 401 拒绝);
  • 携带 x-session-id 请求头 —— 缺了直接报 MissingSessionID: OpenCode's free tier can only be used in OpenCode。扩展每次启动生成一个稳定 UUID 即可满足。

扩展注册 opencode-zen provider,带上上述两个头,启动时从 /models 动态拉取模型列表(失败则回退静态列表)。

模型

动态拉取,只注册 id 含 -free 的免费模型(非免费模型匿名访问会被 401)。当前免费池(2026-09-15 实测):

模型 推理 说明
nemotron-3.5-lightning-free 实测可用
nemotron-3-ultra-free
mimo-v2.5-free 经常限流
muse-spark-1.3-contributor-free 上游目前 500
muse-spark-1.2-contributor-free 上游目前 500
ling-3.0-flash-fin-free 蚂蚁 Ling(金融向)
deepseek-v4-flash-free 上游已下线

免费池会轮换:新 -free 模型自动出现;个别模型可能随时限流或不可用 —— 换一个试即可。

限制

  • 有限流:免费模型共享公共配额,不适合重度/自动化使用;
  • 尽力而为:依赖第三方免费服务,策略随时可能变化(如 2026-09 的 SessionID 门禁);
  • 成本按零上报(访问本身免费)。

License

MIT