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.
This commit is contained in:
@@ -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`.
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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" };
|
||||
|
||||
Reference in New Issue
Block a user