omp packages

@d3ara1n/pi-provider-sensenova1.5.1

SenseNova (商汤日日新) provider for pi — registers Token Plan chat models via OpenAI-compatible API

GitHub Actions Published 8 days ago MIT ~4.3K 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

@d3ara1n/pi-provider-sensenova

npm version npm downloads license

SenseNova (商汤日日新) provider for Pi Coding Agent — registers the SenseNova Token Plan models via OpenAI-compatible API.

Provider

Provider ID Name API Key Env
sensenova-plan SenseNova (Token Plan) $SENSENOVA_API_KEY

Models

The model catalog is refreshed from the live SenseNova API (GET /v1/models) when the cached snapshot is stale — at most once every 4 hours, matching pi's built-in catalog cadence — so newly published models appear without a plugin update:

  • Network refresh: pi fetches the live catalog with your API key during interactive startup when the persisted snapshot is older than 4 hours, and replaces the registered model list. pi update --models forces an immediate refresh.
  • Offline restore: the last-seen catalog is persisted to ~/.pi/agent/models-store.json and restored on offline startups (PI_OFFLINE=1).
  • Filtering: chat models (output_modalities contains "text") are registered; image-generation models (e.g. sensenova-u1.5-lite, which outputs image) are excluded automatically.
  • Metadata: context_length, max_output_length, pricing and supported_features come from the live catalog; entries missing fields fall back to the shipped specs for known model ids, then to generic defaults. thinkingLevelMap/compat flags stay fixed.
  • Fallback: a static list is used only until the first successful network refresh (or while the API is unreachable), so a fresh install keeps working immediately.

Image-generation models (e.g. sensenova-u1.5-lite, sensenova-u1-fast) are intentionally not registered — their output modality is image, not chat.

The chat models run over an OpenAI-compatible chat/completions API — tool calling, streaming, and usage reporting are verified against the live API. Reasoning accepts only low / medium / high / none, so pi's minimal thinking level is not offered for these models.

Installation

pi install npm:@d3ara1n/pi-provider-sensenova

Or add to ~/.pi/agent/settings.json:

{
  "extensions": [
    "/absolute/path/to/pi-extensions/packages/pi-provider-sensenova"
  ]
}

Set your API key:

export SENSENOVA_API_KEY="sk-..."

Or use /login in pi to store it in ~/.pi/agent/auth.json:

{ "sensenova-plan": { "type": "api_key", "key": "sk-..." } }

Getting an API Key

  1. Visit SenseNova Platform
  2. Go to 管理中心 → API-Key 管理 → 创建 API-Key
  3. Copy the key immediately (it's shown only once)

The Token Plan is currently in free public beta — no credit card required, up to 1,500 calls per model every 5 hours, with up to 20 API keys.

Dependencies

None — this is a standalone provider with no pi-extension dependencies. It uses pi's built-in openai-completions streaming.

Usage Quota Reporting

Not yet implemented. SenseNova does not currently expose a public quota or balance API. When one becomes available, quota reporting will be added via @d3ara1n/pi-usage-block-core.