Skip to content

Releases: xinghe-labs/pi-model-config

v0.4.5 — per-endpoint auto-refresh toggle in edit

Choose a tag to compare

@xinghe-labs xinghe-labs released this 02 Nov 05:07

The global noProbe list (v0.4.4) answered the black-hole timeout, but the natural place for "should this endpoint be refreshed" is the provider's own settings.

/model-config edit gains an 自动刷新模型列表 field — a confirm toggle backed by "noProbe": true on the provider object in models.json — plus --no-probe / --probe for scripted use:

/model-config edit gw --no-probe --all
/model-config edit gw --probe --all
  • The per-provider flag and the global model-config.json list combine (either one opts the endpoint out).
  • pi's models.json schema tolerates the extra key — verified against its own ModelConfig.load.
  • Toggling never probes: an unreachable endpoint must not block a settings change.

Full changelog: https://github.com/xinghe-labs/pi-model-config/commits/v0.4.5

v0.4.4 — noProbe: endpoints not to probe

Choose a tag to compare

@xinghe-labs xinghe-labs released this 02 Nov 04:52

Two reports, one root cause: a black-hole endpoint hung every audit until the 10s probe timeout (which reads as "/model feels stuck" after startup), and some endpoints are simply not to be refreshed.

model-config.json gains an optional noProbe array, plus PI_MODEL_CONFIG_NO_PROBE="a,b", matched case-insensitively like runtimeProviders:

{ "noProbe": ["slow-endpoint"] }
  • check — the startup audit and --fix included — audits such a provider from models.dev / name heuristics only, with an ℹ noProbe note in the report.
  • sync skips the provider entirely and says why in the table.
  • list --ping still pings: that is an action the user asked for by name.

Full changelog: https://github.com/xinghe-labs/pi-model-config/commits/v0.4.4

v0.4.3 — check --fix now fills a zero cost

Choose a tag to compare

@xinghe-labs xinghe-labs released this 28 Oct 03:33

The cost floor introduced in v0.4.1 rode entirely on the repair path, which check only enters when an audited field differs — and cost is deliberately not an audited field. A provider whose parameters were already in step kept its all-zero cost no matter how many times check --fix ran; deleting the models and re-syncing was the only workaround (a fresh sync resolves from scratch).

  • The fill now applies on its own condition: all-zero cost plus a models.dev list price available, even when nothing else differs.
  • Reported as +cost (models.dev list price) in the check output.
  • A hand-edited price is still never touched.

Full changelog: https://github.com/xinghe-labs/pi-model-config/commits/v0.4.3

v0.4.2 — probing falls back to pi's auth.json credential

Choose a tag to compare

@xinghe-labs xinghe-labs released this 28 Oct 03:18

pi resolves a custom provider's key as: auth.json stored credential first, models.json apiKey second. The extension only read the second, so a user following pi's auth.json flow got 401 probes from check and list --ping while the runtime itself worked.

  • check, list --ping and edit now walk the same chain: models.json key, then the auth.json api_key credential.
  • OAuth credentials are ignored — their bearers are minted by pi's refresh flow.
  • A torn or unreadable auth.json degrades to "no credential"; probing stays best-effort.
  • auth.json is read-only here (pi owns the file: file-locked, mode 0600). add/edit now say when a stored credential shadows the models.json key instead of letting an edit look like a no-op.

Full changelog: https://github.com/xinghe-labs/pi-model-config/commits/v0.4.2

v0.4.1 — cost falls back to the models.dev list price

Choose a tag to compare

@xinghe-labs xinghe-labs released this 27 Oct 09:39

Fallback for cost: the vendor list price from models.dev.

  • When the model has a list price on models.dev, cost is filled from it — pi's cost accounting is no longer all zeros (e.g. glm-5.3-flash → $0.15/$0.50 per Mtok).
  • A gateway's actual rates differ from list prices: this is a floor for accounting, not a billing claim.
  • A hand-edited cost (your gateway's real rates) is never overwritten, and pricing is not an audited field — the diff never reports cost changes.
  • Cache version bumped; stale caches rebuild with the price field on the next check / add / sync.

Full changelog: https://github.com/xinghe-labs/pi-model-config/commits/v0.4.1

v0.4.0 — edit, default, list --ping, /model-config 命令名

Choose a tag to compare

@xinghe-labs xinghe-labs released this 27 Oct 07:10

A URL and a key. The model's numbers are derived, not typed.

A Pi extension for adding third-party / self-hosted / proxied model endpoints to models.json — and keeping that entry in step with the endpoint afterwards. 中文界面,零运行时依赖。

Highlights

  • add — add an endpoint from a URL and a key; context window, output limit, reasoning, vision and thinking levels are inferred (endpoint metadata → models.dev → model name), never typed
  • edit — change a provider's URL / key / api / id field-by-field; the model list stays untouched; a changed URL or api is probe-verified before anything is written
  • sync — mirror the endpoint's model list: add what appeared, remove what disappeared (never on a failed probe), repair what drifted
  • check — audit models.json against the endpoint and models.dev, repair with --fix
  • models — hand-curate the list; deletions are recorded in a hiddenModels ignore list so sync will not undo them, and sync --only <id> restores
  • default — set the default provider / model / thinking level without hand-editing settings.json
  • list --ping — live endpoint reachability and latency, one probe per endpoint

Install

pi install npm:pi-model-config

Then start a new session. Full usage in the README (English) and README.zh-CN (中文).

Safety invariants

Every write is atomic with a backup (5 newest kept); an unparseable models.json aborts before anything is written; a failed probe never deletes models; API keys are never echoed in full; unknown flags are hard errors; removals always ask.

Full changelog: https://github.com/xinghe-labs/pi-model-config/commits/v0.4.0