@magpie-community/opencode-workbuddy-auth 0.2.8 → 0.2.10
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 +9 -1
- package/index.mjs +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -260,7 +260,9 @@ through as it came.
|
|
|
260
260
|
When you are signed in, the models are the ones WorkBuddy's product config
|
|
261
261
|
gives its CLI agent (`GET /v3/config`), with their context, image input and
|
|
262
262
|
reasoning levels. Until then, or if WorkBuddy doesn't answer, the list below
|
|
263
|
-
is used.
|
|
263
|
+
is used. Since 0.2.9 its models take images, as the config says of every
|
|
264
|
+
model, except WorkBuddy AI's GLM models, whose images WorkBuddy AI drops
|
|
265
|
+
(#572).
|
|
264
266
|
|
|
265
267
|
`workbuddy`:
|
|
266
268
|
- Auto
|
|
@@ -327,6 +329,12 @@ provider settings in magpie, off by default (#430). When it is on:
|
|
|
327
329
|
|
|
328
330
|
The price list is read again at most once a minute for requests.
|
|
329
331
|
|
|
332
|
+
The switch gives its label and description in magpie's other languages
|
|
333
|
+
(`labels`, `descriptions`: Chinese, Traditional Chinese, Japanese, German),
|
|
334
|
+
and says `filtersModels`, so while it is on magpie says under the models
|
|
335
|
+
that the list is filtered (#590). Both are magpie's own fields; an older
|
|
336
|
+
magpie shows the English words and no note.
|
|
337
|
+
|
|
330
338
|
## Credits in magpie
|
|
331
339
|
|
|
332
340
|
magpie's usage card shows the account's credits from the resource summary.
|
package/index.mjs
CHANGED
|
@@ -2949,11 +2949,19 @@ function variants(efforts) {
|
|
|
2949
2949
|
|
|
2950
2950
|
// configModels is the site's own list as a provider's models, each on the
|
|
2951
2951
|
// API it is served on: a Claude model on Messages, the rest on chat.
|
|
2952
|
+
// A model declared here (before an account's list is read, for a key
|
|
2953
|
+
// whose CLI reads no config, or when /v3/config can't be read) takes images
|
|
2954
|
+
// unless textOnly says the site drops them: both sites' configs mark every
|
|
2955
|
+
// model supportsImages (read 2026-11-01), and a chat to WorkBuddy AI's
|
|
2956
|
+
// kimi-k3 with a two-colour PNG named both colours (plugins#572). Declared
|
|
2957
|
+
// text-only, as before, every model read as one that can't see.
|
|
2952
2958
|
function configModels(site) {
|
|
2953
2959
|
return Object.fromEntries(site.models.map(([id, name, context, efforts]) => [id, {
|
|
2954
2960
|
name,
|
|
2955
2961
|
limit: { context, output: 0 },
|
|
2956
2962
|
tool_call: true,
|
|
2963
|
+
attachment: !textOnly(site, id),
|
|
2964
|
+
modalities: { input: textOnly(site, id) ? ["text"] : ["text", "image"], output: ["text"] },
|
|
2957
2965
|
// OpenCode (and magpie's host) read a config model's package and URL
|
|
2958
2966
|
// from provider: { npm, api }, not api
|
|
2959
2967
|
...(nativeOf(site, id) ? { provider: { npm: NPM_MESSAGES, api: apiMessages(site) } } : {}),
|
|
@@ -3379,6 +3387,17 @@ function makePlugin(site) {
|
|
|
3379
3387
|
key: FREE_ONLY,
|
|
3380
3388
|
label: "Free models only",
|
|
3381
3389
|
description: `Lists only the models ${site.name} serves at no cost, and turns away a request for any other here instead of sending it, so no credits are spent. A model free only at night counts as paid.`,
|
|
3390
|
+
// the same words in magpie's other languages, and that the list
|
|
3391
|
+
// leaves models out while it is on (plugins#590); magpie's own
|
|
3392
|
+
// fields, which an older magpie and OpenCode leave alone
|
|
3393
|
+
labels: { zh: "仅免费模型", "zh-TW": "僅免費模型", ja: "無料モデルのみ", de: "Nur kostenlose Modelle" },
|
|
3394
|
+
descriptions: {
|
|
3395
|
+
zh: `只列出 ${site.name} 免费提供的模型;其他模型的请求在这里就被拒绝、不会发出,因此不消耗积分。只在夜间免费的模型按付费算。`,
|
|
3396
|
+
"zh-TW": `只列出 ${site.name} 免費提供的模型;其他模型的請求在這裡就被拒絕、不會送出,因此不消耗積分。只在夜間免費的模型以付費計。`,
|
|
3397
|
+
ja: `${site.name} が無料で提供するモデルだけを表示し、ほかのモデルへのリクエストは送信せずここで断るので、クレジットを消費しません。夜間だけ無料のモデルは有料として扱います。`,
|
|
3398
|
+
de: `Listet nur die Modelle, die ${site.name} kostenlos anbietet, und weist eine Anfrage an jedes andere hier ab, statt sie zu senden, sodass keine Credits verbraucht werden. Ein Modell, das nur nachts kostenlos ist, gilt als kostenpflichtig.`,
|
|
3399
|
+
},
|
|
3400
|
+
filtersModels: true,
|
|
3382
3401
|
},
|
|
3383
3402
|
],
|
|
3384
3403
|
async loader(getAuth) {
|
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.10",
|
|
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",
|