@magpie-community/opencode-zcode-auth 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/index.mjs +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -145,8 +145,10 @@ declares — `maxConcurrency` on the auth hook, and `magpie.maxConcurrency`
|
|
|
145
145
|
in its `package.json`, both three. A request the vendor refuses anyway
|
|
146
146
|
waits a moment (a quarter of a second, then longer — about ten seconds of
|
|
147
147
|
waits in all) and asks again, the same request byte for byte. A cap that
|
|
148
|
-
outlasts the waits goes on as
|
|
149
|
-
|
|
148
|
+
outlasts the waits goes on as a 429, ZCode's words followed by what they
|
|
149
|
+
mean, so the agent reads why. magpie still reads it as a rate limit: the
|
|
150
|
+
account rests a minute and the request goes to the next member of its
|
|
151
|
+
routing group, as it did before.
|
|
150
152
|
|
|
151
153
|
Three is a default, not a cap the plugin enforces. A plan's real cap
|
|
152
154
|
follows its tier — Z.ai serves a Max plan more at once than a Pro, and a
|
package/index.mjs
CHANGED
|
@@ -2006,7 +2006,11 @@ export async function ZCodeAuthPlugin({ client }) {
|
|
|
2006
2006
|
id: PROVIDER,
|
|
2007
2007
|
// the account's plan's models, as ZCode's config lists them now
|
|
2008
2008
|
async models(provider, { auth } = {}) {
|
|
2009
|
-
|
|
2009
|
+
// a ZCode 3.16 sign-in holds only where its key is: read the key
|
|
2010
|
+
// first, as a request does, or plansOf takes the keyless sign-in
|
|
2011
|
+
// for a Start Plan one and lists that plan's models (#439). A key
|
|
2012
|
+
// that can't be read throws, and magpie keeps the list it had.
|
|
2013
|
+
const s = await located(stateOf(auth))
|
|
2010
2014
|
if (!s) return provider.models
|
|
2011
2015
|
const { start, gift: known } = await plansOf(s).catch(() => ({ start: false, gift: null }))
|
|
2012
2016
|
const gift = start ? await startPlan(s.jwt, s.device).catch(() => null) : known
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magpie-community/opencode-zcode-auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "OpenCode provider plugin: signs in to Z.ai's or BigModel's (智谱) GLM Coding Plan as ZCode does, including team seats and ZCode's Start Plan",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|