Skip to content

zcode-cli 3.8.1-31

Pre-release
Pre-release

Choose a tag to compare

@xhqing xhqing released this 06 Sep 03:59
· 14 commits to main since this release

⚠️ Known issue in this version: while signed out (no stored login, custom-provider.env only), picking a model from the /model list fails to connect to the upstream — the deduplicated list keeps official-slot entries that carry no credential in that state. Fixed in 3.8.1-32; until then, use 3.8.1-30.

The /model picker no longer lists env-file slot entries (env-<provider>/<model>) when the official prefix-free twin (<provider>/<model>) is also listed.

Why: A user reported (with a screenshot) that the /model list showed six entries: the three prefixed ones (env-bigmodel/glm-5.3, env-bigmodel/glm-5-turbo, env-bigmodel/glm-5.3-flash) duplicated the three prefix-free ones (bigmodel/glm-5.3, …), pointing at the same models; the user ruled the prefixed variants redundant. Root cause: the user was signed in through the official bigmodel slot (API key) while the same provider was also configured in custom-provider.env — the launcher writes the latter into the env-bigmodel slot of config.json, and the upstream runtime's listModels() reports both slots, so every model appeared twice in the picker.

What changed:

  • selectors.ts gains officialTwinId() (computes the prefix-free twin id of an env-file slot entry) and withoutEnvSlotTwins() (drops env-file slot entries whose official twin is listed; env-only entries without a twin stay — they are the only selectable path while signed out with just a custom provider).
  • Both modelPicker() (shared by the /model list and the quick cycle toggle) and providerModelPicker() (the /settings → Model providers cascade) pass through this filter; in the cascade, a provider group whose env-slot models are all shadowed disappears entirely.
  • The dual-slot config.json structure, the sign-in / sign-out flows (switchModelBlockToOfficialProvider etc.), and runtime behavior are untouched.
  • Version bumped to 3.8.1-31 (VERSION, package.json, test/update.test.ts, version badges and install URLs in all three READMEs).

Compatibility assessment: Since 3.8.1-26, displayProviderId() / displayModelRef() have only affected the display of the current model name (status bar, banner); /model list entries still used the raw ids. This change extends the same "the env- prefix is configuration plumbing, not for users to see" principle to the picker — same direction, not a regression. Env-only entries (no official twin) are kept, so the /model list of signed-out custom-provider users is unaffected (pinned by a unit test). The existing same-id dedup of modelPicker and the per-group dedup of providerModelPicker are unchanged — entries are deduplicated first, then twins filtered.

Verification: tsc --noEmit passes; three new selector unit tests (dual-slot listing drops env entries with the current marker on the official entry, env-only entries are kept, a fully shadowed env group disappears from the cascade); full bun test 696 pass / 0 fail (78 files); all 5 TUI smoke tests pass (after build:tui, the vendored @zcode/tui copy was synced manually following the same steps as installLocalTui).

Install

npm install -g https://github.com/xhqing/zcode-cli/releases/download/v3.8.1-31/zcode-cli-3.8.1-31.tgz