dsh-provider-qoder 0.4.2 → 0.5.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 +12 -8
- package/README_CN.md +12 -8
- package/lib/client.js +1355 -384
- package/lib/index.d.ts +69 -24
- package/lib/index.js +2669 -635
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -14,17 +14,18 @@ This project is a community adapter plugin and is not affiliated with Qoder or D
|
|
|
14
14
|
|
|
15
15
|
## Features
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- Access your subscription through Qoder website sign-in or a Personal Access Token (PAT).
|
|
18
18
|
- Supports both Global (`global`) and China (`china`) services.
|
|
19
19
|
- Automatically fetches available models for your account, supports selecting enabled models, and displays pricing multipliers and reasoning effort options when reported by the service.
|
|
20
20
|
- Supports multimodality, web search, and tool calls.
|
|
21
21
|
- View account information, quota, and reset dates in Settings.
|
|
22
|
+
- Supports Qoder model queues with cancellable polling and visible waiting progress.
|
|
22
23
|
|
|
23
24
|
## Installation
|
|
24
25
|
|
|
25
26
|
### Prerequisites
|
|
26
27
|
|
|
27
|
-
- An active Qoder subscription
|
|
28
|
+
- An active Qoder subscription matching the selected service region.
|
|
28
29
|
- The DSH profile running the plugin must provide a managed credentials service; when configuring via the settings page, the credential storage must also be writable.
|
|
29
30
|
- Requirements: DSH `>=0.1.7-rc.2`.
|
|
30
31
|
|
|
@@ -38,30 +39,33 @@ dsh plugin --profile web add dsh-provider-qoder
|
|
|
38
39
|
|
|
39
40
|
## Configuration & Usage
|
|
40
41
|
|
|
41
|
-
### 1.
|
|
42
|
+
### 1. Select a Service Region and Sign In
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
In DSH Web, open **Settings → Models → Qoder account** and select your service region:
|
|
44
45
|
|
|
45
46
|
| Service Region | Account Domain |
|
|
46
47
|
| --- | --- |
|
|
47
48
|
| Global (default) | `qoder.com` |
|
|
48
49
|
| China (CN) | `qoder.com.cn` |
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
Click **Sign in with Qoder** and complete authorization on the website. Return to DSH to select a model available to your account.
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
Alternatively, choose **Use PAT**, enter a token and click **Save and use PAT**, or use a saved PAT. **Manage account** or **Manage credentials** lets you change accounts, switch authentication methods or remove authorization.
|
|
54
|
+
|
|
55
|
+
Browser authorization is stored per region, shared across the DSH instance and renewed automatically. Expired authorization requires sign-in again, without automatic PAT fallback. Removing authorization does not sign you out of the Qoder website.
|
|
53
56
|
|
|
54
57
|
### 2. View Account & Manage Models
|
|
55
58
|
|
|
56
|
-
Open **Settings → Qoder** to view account and quota details, configure
|
|
59
|
+
Open **Settings → Qoder** to view account and quota details, configure web search, and adjust enabled models.
|
|
57
60
|
|
|
58
61
|
<p align="center">
|
|
59
62
|
<img src="./assets/account-quota.png" alt="Qoder account quota and model settings" width="650" />
|
|
60
63
|
</p>
|
|
61
64
|
|
|
65
|
+
For advanced YAML options (queue wait limits, request timeouts, and historical reasoning preservation), see [Configuration](./docs/wiki/configuration.md).
|
|
66
|
+
|
|
62
67
|
## Upcoming Features
|
|
63
68
|
|
|
64
|
-
- [ ] Request rate-limiting queue mechanism
|
|
65
69
|
- [ ] Connect with Qoder's Protobuf protocol
|
|
66
70
|
|
|
67
71
|
## References
|
package/README_CN.md
CHANGED
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
|
|
15
15
|
## 功能
|
|
16
16
|
|
|
17
|
-
- 通过 Qoder Personal Access Token(PAT
|
|
17
|
+
- 通过 Qoder 官网浏览器授权或 Personal Access Token(PAT,个人访问令牌)访问订阅。
|
|
18
18
|
- 支持国际版(`global`)和中国区(`china`)服务。
|
|
19
19
|
- 自动拉取账号可用模型,支持选择启用的模型,并在服务支持时显示价格倍率和推理强度选项。
|
|
20
20
|
- 支持多模态、搜索以及工具调用。
|
|
21
21
|
- 在设置中查看账号信息、额度和重置时间。
|
|
22
|
+
- 支持 Qoder 模型排队:可取消轮询、显示等待进度。
|
|
22
23
|
|
|
23
24
|
## 安装
|
|
24
25
|
|
|
25
26
|
### 使用前提
|
|
26
27
|
|
|
27
|
-
-
|
|
28
|
+
- 拥有与所选服务区域匹配的可用 Qoder 订阅。
|
|
28
29
|
- 运行插件的 DSH profile 必须提供托管凭据服务;通过设置页面配置时,凭据存储还需可写。
|
|
29
30
|
- 环境要求:DSH `>=0.1.7-rc.2`。
|
|
30
31
|
|
|
@@ -38,30 +39,33 @@ dsh plugin --profile web add dsh-provider-qoder
|
|
|
38
39
|
|
|
39
40
|
## 配置与使用
|
|
40
41
|
|
|
41
|
-
### 1.
|
|
42
|
+
### 1. 选择服务区域并登录
|
|
42
43
|
|
|
43
|
-
打开 DSH Web 的 **设置 →
|
|
44
|
+
打开 DSH Web 的 **设置 → 模型 → Qoder 账号**,选择对应服务区域:
|
|
44
45
|
|
|
45
46
|
| 服务区域 | 对应账号 |
|
|
46
47
|
| --- | --- |
|
|
47
48
|
| 国际版(Global,默认) | `qoder.com` |
|
|
48
49
|
| 中国区(CN) | `qoder.com.cn` |
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
点击 **通过 Qoder 登录**,在官网完成授权。返回 DSH 后即可选择账号支持的模型。
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
也可选择 **使用 PAT**,填写令牌后点击 **保存并使用 PAT**,或使用已保存的 PAT。通过 **管理账号** 或 **管理凭据** 更换账号、切换鉴权方式或移除授权。
|
|
54
|
+
|
|
55
|
+
浏览器授权按区域保存、由当前 DSH 实例共享,并自动续期。授权失效后需重新登录,不会自动回退到 PAT;移除授权不会退出 Qoder 官网。
|
|
53
56
|
|
|
54
57
|
### 2. 查看账号与设置模型
|
|
55
58
|
|
|
56
|
-
打开 **设置 → Qoder**
|
|
59
|
+
打开 **设置 → Qoder** 查看账号额度,并可切换联网搜索策略与调整启用的模型。
|
|
57
60
|
|
|
58
61
|
<p align="center">
|
|
59
62
|
<img src="./assets/account-quota_CN.png" alt="Qoder 账号额度与模型设置" width="650" />
|
|
60
63
|
</p>
|
|
61
64
|
|
|
65
|
+
高级 YAML 配置(排队等待上限、请求超时与历史推理内容保留)见 [配置说明](./docs/wiki/configuration_CN.md)。
|
|
66
|
+
|
|
62
67
|
## 后续计划
|
|
63
68
|
|
|
64
|
-
- [ ] 请求限流排队机制
|
|
65
69
|
- [ ] 接入 Qoder 的 Protobuf 协议
|
|
66
70
|
|
|
67
71
|
## 参考项目
|