From fe5631c1cb0bd5b8da1e4a757dc3b4c8a96c1567 Mon Sep 17 00:00:00 2001 From: yetone Date: Fri, 16 Oct 2026 16:59:02 +0800 Subject: [PATCH] zen-free 0.1.10: the sign-in says a personal OpenCode key belongs in the built-in OpenCode Zen (TradingLife on Discord) A user typed keys made under several OpenCode accounts into Zen Free's key field and expected several accounts. The method's authorize() always returns key "public", and magpie's host stores result.key over the typed key (host.js save), so every such sign-in is the same shared credential and the typed key is dropped. The label and README now say so and point own keys to magpie's built-in OpenCode Zen provider (several keys, rotation and failover). Run: bun test in packages/zen-free, 174 pass 0 fail. Read host.js apiKey/save on magpie 63be47717 to confirm the stored key is "public". Not tried: a sign-in through magpie's GUI with the new label. --- packages/zen-free/README.md | 6 ++++++ packages/zen-free/package.json | 2 +- packages/zen-free/provider.mjs | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/zen-free/README.md b/packages/zen-free/README.md index 4a420bb..0e5809b 100644 --- a/packages/zen-free/README.md +++ b/packages/zen-free/README.md @@ -19,6 +19,12 @@ magpie plugin login opencode-zen-free ## Sign in Enter `public` in the key field. No personal API key is needed. + +Whatever is typed in the key field, the plugin signs in with the one +shared `public` credential: a key made under your own OpenCode account +does nothing here, and several of them don't make several accounts. Your +own Zen keys go in magpie's built-in OpenCode Zen provider (or OpenCode's +`opencode` provider), which takes several keys. The credential is kept in OpenCode's `auth.json` or magpie's `plugin-auth.json`. diff --git a/packages/zen-free/package.json b/packages/zen-free/package.json index f6515ad..fc9c2e3 100644 --- a/packages/zen-free/package.json +++ b/packages/zen-free/package.json @@ -1,6 +1,6 @@ { "name": "@magpie-community/opencode-zen-free-auth", - "version": "0.1.9", + "version": "0.1.10", "description": "OpenCode Zen free models through the public credential, with native streaming protocols", "type": "module", "main": "./index.mjs", diff --git a/packages/zen-free/provider.mjs b/packages/zen-free/provider.mjs index 2495854..a5d604d 100644 --- a/packages/zen-free/provider.mjs +++ b/packages/zen-free/provider.mjs @@ -257,7 +257,7 @@ async function server(_input, options = {}) { methods: [ { type: "api", - label: "Zen 免费访问(密钥填写 public)", + label: "Zen 免费访问(密钥填 public;自己的 OpenCode Key 请加到内置的 OpenCode Zen)", placeholder: "public", async authorize() { return { type: "success", key: "public" };