pi-provider-qoder-cn 0.2.8 → 0.2.16
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 +70 -17
- package/bin/manifest.json +17 -0
- package/bin/runtime-info.exe +0 -0
- package/bin/sgsdk.dll +0 -0
- package/dist/index.js +1098 -435
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -4,8 +4,11 @@ A [pi](https://shittycodingagent.ai/) provider extension for **Qoder CN** (`qode
|
|
|
4
4
|
with a quota command and enterprise (VPC) endpoint support.
|
|
5
5
|
|
|
6
6
|
This is a focused fork of [`pi-provider-qoder`](https://github.com/simonsmh/pi-provider-qoder)
|
|
7
|
-
(MIT). It registers **
|
|
8
|
-
|
|
7
|
+
(MIT). It registers **both** providers — `qoder-cn` (Domestic) and `qoder`
|
|
8
|
+
(Global) — each with its own credentials, model catalog, quota and check-in
|
|
9
|
+
commands. Because the ids overlap with the upstream package, installing both at
|
|
10
|
+
once double-registers them; pi resolves that field-by-field in `settings.json`
|
|
11
|
+
load order (last wins), so keep this package listed last or uninstall upstream.
|
|
9
12
|
|
|
10
13
|
```bash
|
|
11
14
|
pi install npm:pi-provider-qoder-cn
|
|
@@ -16,24 +19,20 @@ pi install npm:pi-provider-qoder-cn
|
|
|
16
19
|
| Feature | Upstream | This fork |
|
|
17
20
|
|---|---|---|
|
|
18
21
|
| Qoder CN provider (`qoder-cn`) | ✅ | ✅ |
|
|
19
|
-
| Qoder Global provider (`qoder`) | ✅ |
|
|
20
|
-
| `/qoder-cn.usage` quota
|
|
22
|
+
| Qoder Global provider (`qoder`) | ✅ | ✅ (Browser OAuth + PAT with self-healing refresh) |
|
|
23
|
+
| `/qoder-cn.usage` & `/qoder.usage` quota commands | ❌ | ✅ |
|
|
24
|
+
| `/qoder-cn.claim` & `/qoder.claim` daily check-in (100 Credits) | ❌ | ✅ |
|
|
25
|
+
| Seamless token refresh (deviceToken/refresh for drt- & PAT exchange) | ❌ (broken 403) | ✅ |
|
|
21
26
|
| Enterprise (VPC) selection during `/login qoder-cn` | ❌ | ✅ |
|
|
22
27
|
| Current CN model catalog (`qwen3.8-max` / `qwen3.8-flash`, …) | ❌ | ✅ |
|
|
23
28
|
| Stable CN model ids for `enabledModels` | ❌ | ✅ |
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
>
|
|
30
|
-
>
|
|
31
|
-
> `--list-models` once global credentials exist.
|
|
32
|
-
>
|
|
33
|
-
> If you migrated from the upstream package, also remove the old local extension
|
|
34
|
-
> directory if you have one, since a directory at
|
|
35
|
-
> `~/.pi/agent/extensions/pi-provider-qoder/` registers `qoder-cn` as well.
|
|
36
|
-
> Check with `pi list` and inspect `~/.pi/agent/extensions/`.
|
|
30
|
+
Both `qoder` (Global) and `qoder-cn` (Domestic) providers are registered.
|
|
31
|
+
- To use Global: run `/login qoder` and use `/model qoder/<id>`. Commands: `/qoder.usage`, `/qoder.claim`.
|
|
32
|
+
- To use CN: run `/login qoder-cn` and use `/model qoder-cn/<id>`. Commands: `/qoder-cn.usage`, `/qoder-cn.claim`.
|
|
33
|
+
|
|
34
|
+
> Check with `pi list` and inspect `~/.pi/agent/extensions/`: a leftover
|
|
35
|
+
> `pi-provider-qoder` extension directory registers the same provider ids.
|
|
37
36
|
>
|
|
38
37
|
> **Migrating from the upstream package:** model ids change from
|
|
39
38
|
> `Qwen3.8-Flash` to `qwen3.8-flash`. Update `enabledModels` entries in
|
|
@@ -46,12 +45,41 @@ pi install npm:pi-provider-qoder-cn
|
|
|
46
45
|
pi install npm:pi-provider-qoder-cn
|
|
47
46
|
```
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
### Daily check-in on Global: zero desktop dependency
|
|
49
|
+
|
|
50
|
+
`/qoder.claim` works out of the box on Windows: this package vendors the
|
|
51
|
+
official Qoder device-attestation component (`bin/runtime-info.exe` +
|
|
52
|
+
`bin/sgsdk.dll`, ~7.8 MB, sha256-pinned in `bin/manifest.json`) because the
|
|
53
|
+
global gateway hides claim campaigns from requests without device attestation.
|
|
54
|
+
The component is invoked offline with your account id; its output is cached in
|
|
55
|
+
memory for 30 minutes.
|
|
56
|
+
|
|
57
|
+
- Override the component: set `QODER_UMID_EXE` to any `runtime-info.exe`
|
|
58
|
+
(e.g. a fresher copy from a newer desktop install — the same variable works
|
|
59
|
+
for the CN provider with environment code 0).
|
|
60
|
+
- Non-Windows hosts: the vendored binary is win32-x64 only; install the Qoder
|
|
61
|
+
desktop app for your platform and the resolver picks its component from the
|
|
62
|
+
standard install paths automatically.
|
|
63
|
+
- The component is © Qoder and redistributed verbatim; it is not executed
|
|
64
|
+
during `npm install`, only on demand by the claim/usage commands.
|
|
65
|
+
|
|
66
|
+
Then authenticate once — CN:
|
|
50
67
|
|
|
51
68
|
```text
|
|
52
69
|
/login qoder-cn
|
|
53
70
|
```
|
|
54
71
|
|
|
72
|
+
Global (either browser OAuth — the login dialog opens `qoder.com/device/selectAccounts`
|
|
73
|
+
and the extension polls for the token — or a PAT):
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
/login qoder
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
export QODER_PERSONAL_ACCESS_TOKEN="<your global PAT>" # or QODER_API_KEY / QODER_PAT
|
|
81
|
+
```
|
|
82
|
+
|
|
55
83
|
CN supports a Personal Access Token rather than browser OAuth. Create one at
|
|
56
84
|
<https://qoder.com.cn/account/integrations> and paste it when prompted, or export
|
|
57
85
|
it before starting pi:
|
|
@@ -107,6 +135,31 @@ Notes:
|
|
|
107
135
|
- The command uses the same stored token as chat requests, refreshing it first,
|
|
108
136
|
so it reports the same quota the model is actually billed against.
|
|
109
137
|
|
|
138
|
+
### `/qoder-cn.claim`
|
|
139
|
+
|
|
140
|
+
Daily check-in command to claim the 100 free Credits reward on Qoder CN personal
|
|
141
|
+
accounts without having to open the desktop GUI. The event refreshes daily at
|
|
142
|
+
**10:00 UTC+8 (Beijing time)** and grants Add-on Credits valid for 30 days.
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
/qoder-cn.claim
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
If already claimed today, it reports the status idempotently without throwing:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
ℹ️ 今日 100 Credits 已经领取过,无需重复操作
|
|
152
|
+
- 活动名称:每天领 100 Credits
|
|
153
|
+
- 额度说明:100 Credits(全模型通用资源包,30 天有效)
|
|
154
|
+
- 下次刷新:明日 10:00 UTC+8(距刷新约 22小时10分钟)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Append `json` for the untouched API response:
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
/qoder-cn.claim json
|
|
161
|
+
```
|
|
162
|
+
|
|
110
163
|
### Enterprise (VPC) endpoint support
|
|
111
164
|
|
|
112
165
|
Enterprises on a private (VPC) deployment can select their endpoint directly
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"note": "Vendored verbatim from the Qoder desktop app (resources/umid) so /qoder.claim and /qoder.usage work without a desktop install. Override with QODER_UMID_EXE. Copyright © Qoder — all rights reserved by Qoder/Alibaba.",
|
|
3
|
+
"vendoredAt": "2026-10-03",
|
|
4
|
+
"target": "win32-x64",
|
|
5
|
+
"files": [
|
|
6
|
+
{
|
|
7
|
+
"name": "runtime-info.exe",
|
|
8
|
+
"size": 480752,
|
|
9
|
+
"sha256": "e670a041fd0a451c51535ff1b042996737362a30aabd91a583ed92ca4c56e40b"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "sgsdk.dll",
|
|
13
|
+
"size": 7358960,
|
|
14
|
+
"sha256": "37edce6dbdf087abb85cff7687c371268bb13f3eb22517826d665e083e109326"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
Binary file
|
package/bin/sgsdk.dll
ADDED
|
Binary file
|