@magpie-community/opencode-workbuddy-auth 0.2.6 → 0.2.8
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 +12 -0
- package/index.mjs +26 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -286,6 +286,18 @@ client sends it: WorkBuddy doesn't think when a chat names none, so
|
|
|
286
286
|
OpenCode's default variant got answers without thinking. An effort the
|
|
287
287
|
client names, `none` too, goes as it came.
|
|
288
288
|
|
|
289
|
+
One value differs from the config, measured with real requests:
|
|
290
|
+
DeepSeek-V4.1-Flash (and its paid `-sg` id) lists `none`, though the
|
|
291
|
+
config says it only reasons: WorkBuddy answers `reasoning_effort: "none"`
|
|
292
|
+
on it with no thinking at all (since 0.2.7, #563).
|
|
293
|
+
|
|
294
|
+
A model's context is the config's `maxInputTokens` on both sites. 0.2.7
|
|
295
|
+
capped DeepSeek-V4.1-Flash at 100000 on `workbuddy` (copilot.tencent.com)
|
|
296
|
+
from one report's error; China accounts took prompts up to 992,389 tokens
|
|
297
|
+
on it, so 0.2.8 lifted the cap (#561). A prompt WorkBuddy does find too
|
|
298
|
+
long ("prompt is too long: … > … maximum") is answered with its own 400,
|
|
299
|
+
passed on as it came, which magpie takes as the context overflowing.
|
|
300
|
+
|
|
289
301
|
A chat goes gzipped (`Content-Encoding: gzip`), as WorkBuddy's own client
|
|
290
302
|
sends its model requests (`RequestBodyGzip` in both builds' product.json).
|
|
291
303
|
Claude's Messages route goes as it came, and so does anything that isn't a
|
package/index.mjs
CHANGED
|
@@ -28,7 +28,7 @@ const CN_MODELS = [
|
|
|
28
28
|
["hy4-preview-f", "Hy4 preview", 1000000, ["high"]],
|
|
29
29
|
["hy3", "Hy3", 192000, ["low", "high"]],
|
|
30
30
|
["hy3-x", "Hy3-X", 192000, ["low", "high"]],
|
|
31
|
-
["deepseek-v4.1-flash", "Deepseek-V4.1-Flash", 1000000],
|
|
31
|
+
["deepseek-v4.1-flash", "Deepseek-V4.1-Flash", 1000000, ["none", "low", "high", "max"]],
|
|
32
32
|
["glm-5.3", "GLM-5.3", 1000000, ["low", "high", "max"]],
|
|
33
33
|
["glm-5.3-flash", "GLM-5.3-Flash", 1000000, ["low", "high", "max"]],
|
|
34
34
|
["glm-5.2", "GLM-5.2", 1000000, ["high", "xhigh"]],
|
|
@@ -109,6 +109,28 @@ const SITES = {
|
|
|
109
109
|
},
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
// A model's context is its config's maxInputTokens, on both sites. 0.2.7
|
|
113
|
+
// capped deepseek-v4.1-flash at 100000 on copilot.tencent.com from one
|
|
114
|
+
// report's error ("prompt is too long: 100001 tokens > 100000 maximum"),
|
|
115
|
+
// and it was wrong: on 2026-10-31 China Free-plan accounts of three other
|
|
116
|
+
// users took 110,041 to 992,389-token prompts on it there, the whole prompt
|
|
117
|
+
// read (needles recalled), and the vendor's own refusal of 1,157,831 named
|
|
118
|
+
// 1048576 as the maximum (plugins#561). The cap made every client compact at
|
|
119
|
+
// 100k. Where a prompt really is too long, WorkBuddy's 400 says "prompt is
|
|
120
|
+
// too long" and goes to the client as it came (explained), which magpie
|
|
121
|
+
// reads as the context overflowing (context_length_exceeded): the agent is
|
|
122
|
+
// told to compact, and the account isn't rested for it.
|
|
123
|
+
|
|
124
|
+
// OFF_TAKEN are models that turn thinking off for reasoning_effort "none"
|
|
125
|
+
// though the config says onlyReasoning (so WorkBuddy's own client offers no
|
|
126
|
+
// off switch): deepseek-v4.1-flash, and the same model under its paid id.
|
|
127
|
+
// Measured 2026-10-31 on www.workbuddy.ai: "none" answered 200 with 0
|
|
128
|
+
// reasoning tokens on both, where "low" thought 1221 and 1127; and on the
|
|
129
|
+
// China build by the reporter of plugins#563 (0 reasoning tokens, a 30-item
|
|
130
|
+
// prompt in 14s instead of 50s). Without the level magpie sends "low" for
|
|
131
|
+
// a client's "none".
|
|
132
|
+
const OFF_TAKEN = new Set(["deepseek-v4.1-flash", "deepseek-v4.1-flash-sg"])
|
|
133
|
+
|
|
112
134
|
// textOnly says whether site drops the images sent to model, whatever its
|
|
113
135
|
// config says. On 2026-10-13, with a real WorkBuddy AI account (Yirasumi on
|
|
114
136
|
// Discord), www.workbuddy.ai's /v3/config marked every model
|
|
@@ -3132,7 +3154,8 @@ async function liveModels(site, a) {
|
|
|
3132
3154
|
const es = effortsOf(d, site, id)
|
|
3133
3155
|
if (es.length) {
|
|
3134
3156
|
const canOff = d.reasoning?.canDisableThinking
|
|
3135
|
-
|
|
3157
|
+
const off = (!d.onlyReasoning && (canOff == null || canOff)) || OFF_TAKEN.has(id)
|
|
3158
|
+
m.efforts = [...(off ? ["none"] : []), ...es]
|
|
3136
3159
|
const def = defaultEffortOf(d, es)
|
|
3137
3160
|
if (def) m.effort = def
|
|
3138
3161
|
}
|
|
@@ -3759,4 +3782,4 @@ export const WorkBuddyAuthPlugin = makePlugin(SITES.workbuddy)
|
|
|
3759
3782
|
export const WorkBuddyAIAuthPlugin = makePlugin(SITES["workbuddy-ai"])
|
|
3760
3783
|
|
|
3761
3784
|
// for tests
|
|
3762
|
-
export const _internal = { idFor, replyAfterToolsOn, withDefaultEffort, defaultEffortOf, gzipped, FREE_ONLY, PRICE_TTL, keyAccount, remoteConfig, cycleOf, typeUnions, systemAsUser, systemKey, DEFAULT_SYSTEM, EDGE_READS, fitShape, replyAfterTools, AFTER_TOOLS_REFUSED, enterpriseUsageOf, accountName, notDesktop, textOnly, runsOutOf, packagesOf, endOf, enterpriseHeaders, enterpriseOf, liveModels, browserSignIn, withSystem, asReasoning, normalizeToolChoice, fitTools, fitted, renamed, unsaid, FILTER_SAYS, unflagged, usageOf, desktopHeld, explained, REFUSED_HINT, RESTRICTED_HINT, EXHAUSTED_HINT, REFUSED_DOC, commaPaused, commaPausedOn, opened, freeCredits, creditsOf, priceOf, fresh, SITES, renewing, renewed, SESSION, attend, scopeOf, turnKey, conversationKey, signatureOf, isMessages, withoutUnsigned, withoutSignedThinking, prepared, answeredBefore, nativeOf, modelOf, configModels, freeWindowOf, tokensShort, freeWindowRows, freeWindowLedger, readLedgerTail, pinned, rowTime, rowAccount, ofAccount, windowOffset, windowReset, FREE_WINDOW_MODELS, FREE_WINDOW_SPAN, FREE_WINDOW_GAP, FREE_WINDOW_LEAD, checkinOf, API_MESSAGES: NPM_MESSAGES, API_CHAT: NPM }
|
|
3785
|
+
export const _internal = { idFor, OFF_TAKEN, replyAfterToolsOn, withDefaultEffort, defaultEffortOf, gzipped, FREE_ONLY, PRICE_TTL, keyAccount, remoteConfig, cycleOf, typeUnions, systemAsUser, systemKey, DEFAULT_SYSTEM, EDGE_READS, fitShape, replyAfterTools, AFTER_TOOLS_REFUSED, enterpriseUsageOf, accountName, notDesktop, textOnly, runsOutOf, packagesOf, endOf, enterpriseHeaders, enterpriseOf, liveModels, browserSignIn, withSystem, asReasoning, normalizeToolChoice, fitTools, fitted, renamed, unsaid, FILTER_SAYS, unflagged, usageOf, desktopHeld, explained, REFUSED_HINT, RESTRICTED_HINT, EXHAUSTED_HINT, REFUSED_DOC, commaPaused, commaPausedOn, opened, freeCredits, creditsOf, priceOf, fresh, SITES, renewing, renewed, SESSION, attend, scopeOf, turnKey, conversationKey, signatureOf, isMessages, withoutUnsigned, withoutSignedThinking, prepared, answeredBefore, nativeOf, modelOf, configModels, freeWindowOf, tokensShort, freeWindowRows, freeWindowLedger, readLedgerTail, pinned, rowTime, rowAccount, ofAccount, windowOffset, windowReset, FREE_WINDOW_MODELS, FREE_WINDOW_SPAN, FREE_WINDOW_GAP, FREE_WINDOW_LEAD, checkinOf, API_MESSAGES: NPM_MESSAGES, API_CHAT: NPM }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magpie-community/opencode-workbuddy-auth",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "OpenCode provider plugins for WorkBuddy's plans: WorkBuddy (CodeBuddy, copilot.tencent.com) and WorkBuddy AI (www.workbuddy.ai)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.mjs",
|