dsh-model-allowance 1.1.0 → 1.2.0

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 CHANGED
@@ -8,6 +8,12 @@ conversation model.
8
8
  The card also switches the session: the button next to the console link
9
9
  lists the provider's models and moves the conversation to the one you pick.
10
10
 
11
+ A model covered by a running usage promotion carries a small multiplier
12
+ badge in that list; hovering the badge reads the vendor's one-line
13
+ announcement. Offers show only while they run — a night offer badges only
14
+ at night. Zhipu's offers are declared with the plugin; Qwen Token Plan's
15
+ are read live from its public model catalog, no credential needed.
16
+
11
17
  ## Usage
12
18
 
13
19
  ![Usage demo](docs/screenshots/demo.gif)
@@ -15,6 +21,18 @@ lists the provider's models and moves the conversation to the one you pick.
15
21
  The card shows the provider's remaining balance or allowance and the model
16
22
  of the current conversation, next to the input box.
17
23
 
24
+ ## Configure credentials
25
+
26
+ Open **Settings → Model Allowance** to store the vendor credentials the
27
+ balance queries need, such as the Alibaba Cloud AccessKey ID/Secret behind
28
+ Qwen Token Plan readings. A testable pair is verified against the vendor's
29
+ own endpoints before it is saved; stored values can be edited or removed
30
+ later. Values live in DSH's credential store: they are never written into
31
+ configuration, never shown back, and reach nothing but the vendor's own
32
+ query endpoint. The guide under
33
+ [docs/qwen-token-plen-cn](docs/qwen-token-plen-cn/README.md) walks obtaining
34
+ the AccessKey pair.
35
+
18
36
  ## Supported
19
37
 
20
38
  - DeepSeek
@@ -23,6 +41,8 @@ of the current conversation, next to the input box.
23
41
  - Kimi for Coding
24
42
  - OpenCode Go
25
43
  - Xiaomi MiMo (pay-as-you-go balance and Token Plan)
44
+ - Qwen Token Plan (CN personal plan; needs the Alibaba Cloud AccessKey pair
45
+ from **Settings → Model Allowance**)
26
46
 
27
47
  ### Not supported
28
48
 
@@ -30,8 +50,6 @@ These vendors publish no balance API. As long as they are configured here,
30
50
  they still appear in the card: the panel says there is no balance API, and
31
51
  their models stay switchable.
32
52
 
33
- - Qwen Token Plan: the vendor publishes no balance API
34
-
35
53
  ## Installation
36
54
 
37
55
  ### Install from npm (recommended)
@@ -40,10 +58,10 @@ their models stay switchable.
40
58
  2. Choose **Install** and enter:
41
59
 
42
60
  ```
43
- dsh-model-allowance@1.1.0
61
+ dsh-model-allowance@1.2.0
44
62
  ```
45
63
 
46
- Use the latest published version instead of `1.1.0` when a newer one
64
+ Use the latest published version instead of `1.2.0` when a newer one
47
65
  exists.
48
66
  3. Confirm the installation. If DSH reports **restart required**, restart
49
67
  DSH; otherwise refresh the page.
@@ -53,7 +71,7 @@ The npm installation is eligible for the Plugin Manager's **Update** action.
53
71
  ### Install from GitHub
54
72
 
55
73
  ```
56
- git+https://github.com/MeiK2333/dsh-model-allowance.git#v1.1.0
74
+ git+https://github.com/MeiK2333/dsh-model-allowance.git#v1.2.0
57
75
  ```
58
76
 
59
77
  Git installations are not covered by the Plugin Manager's **Update** action;
package/README.zh.md CHANGED
@@ -7,12 +7,25 @@
7
7
  卡片同时负责切换:控制台链接旁边的按钮会列出该厂商的模型,选中哪一个,
8
8
  会话就切到哪一个。
9
9
 
10
+ 正在生效的用量活动会在列表里对应模型旁标出一枚小倍率徽章;鼠标移到徽章上
11
+ 即可读到厂商的一句话说明。活动只在生效时段内展示——夜间优惠只在夜间出现。
12
+ 智谱的活动随插件声明;千问 Token Plan 的活动从其公开模型目录活读,无需凭据。
13
+
10
14
  ## 使用
11
15
 
12
16
  ![使用演示](docs/screenshots/demo.gif)
13
17
 
14
18
  卡片显示厂商的余额或剩余额度,以及当前会话所用的模型,位于输入框旁。
15
19
 
20
+ ## 配置凭据
21
+
22
+ 打开 **设置 → Model Allowance**,即可录入余额查询所需的厂商凭据(例如千问
23
+ Token Plan 用量查询用的阿里云 AccessKey ID/Secret)。可测试的凭据在保存前会
24
+ 先经过厂商自己的接口验证,通过后才会落库;已保存的凭据支持修改和删除。密钥
25
+ 保存在 DSH 的凭据存储中:不写入配置文件、不会回显,也不会发往除厂商查询接口
26
+ 外的任何地方。获取 AccessKey 的步骤见
27
+ [配置指南](docs/qwen-token-plen-cn/README.md)。
28
+
16
29
  ## 支持
17
30
 
18
31
  - DeepSeek
@@ -21,14 +34,13 @@
21
34
  - Kimi for Coding
22
35
  - OpenCode Go
23
36
  - Xiaomi MiMo(按量付费余额与 Token Plan)
37
+ - 千问 Token Plan(国内个人版;需在 **设置 → Model Allowance** 配置阿里云 AccessKey)
24
38
 
25
39
  ### 不支持
26
40
 
27
41
  以下厂商没有余额接口,但只要本地配置了它们,它们依然会出现在卡片里:
28
42
  面板会提示“目前无余额接口”,模型列表照常可以切换。
29
43
 
30
- - 千问 Token Plan:官方未提供余额接口
31
-
32
44
  ## 安装
33
45
 
34
46
  ### 从 npm 安装(推荐)
@@ -37,10 +49,10 @@
37
49
  2. 点击 **Install(安装)**,填入:
38
50
 
39
51
  ```
40
- dsh-model-allowance@1.1.0
52
+ dsh-model-allowance@1.2.0
41
53
  ```
42
54
 
43
- 如果已有更新版本,请把 `1.1.0` 换成最新的精确版本。
55
+ 如果已有更新版本,请把 `1.2.0` 换成最新的精确版本。
44
56
  3. 确认安装。如果 DSH 提示需要重启,重启 DSH;否则刷新页面即可。
45
57
 
46
58
  通过 npm 安装的版本可以在 Plugin Manager 中使用 **Update** 更新。
@@ -48,7 +60,7 @@
48
60
  ### 从 GitHub 安装
49
61
 
50
62
  ```
51
- git+https://github.com/MeiK2333/dsh-model-allowance.git#v1.1.0
63
+ git+https://github.com/MeiK2333/dsh-model-allowance.git#v1.2.0
52
64
  ```
53
65
 
54
66
  Git 安装不受 Plugin Manager 的 **Update** 管理;更新时需要先移除旧版本,