@haoyiyin/9router 0.1.1 → 0.1.3
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 +10 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
# @haoyiyin/9router
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Pi extension — a **9Router provider** (including OpenCode Free `oc/` models) plus `fetch`, `search`, and `transcribe` tools.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A fork of [`@xynogen/pix-9router`](https://www.npmjs.com/package/@xynogen/pix-9router) that fixes the issue where 9router's `/v1/models` never lists OpenCode Free `-free` models — this extension exposes those `oc/` models directly.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Install
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
pi install npm:@haoyiyin/9router
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Configure
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
There is no built-in default endpoint. Run `/9router`, enter the 9Router base URL and API key, and they are saved to `~/.pi/agent/haoyiyin/9router.json` (mode `0600`). Leave the key empty to keep the currently configured key.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Environment variables are supported as a fallback: `ROUTER_API_BASE` / `ROUTER_API_KEY` (the config file takes precedence).
|
|
18
18
|
|
|
19
|
-
## oc
|
|
19
|
+
## oc models
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Every 30 minutes the extension fetches models from `opencode.ai/zen/v1/models` whose ids end in `-free`, and registers them under the 9router provider as `oc/<id>`. Changes to the upstream list are picked up automatically. Cache file: `~/.cache/pi/zen-oc-models.json`.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Tools
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
pi remove npm:@xynogen/pix-9router
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
并(可选)删除 `~/.zshrc` 里的 `ROUTER_API_KEY` / `ROUTER_API_BASE` export。
|
|
32
|
-
|
|
33
|
-
## 工具
|
|
34
|
-
|
|
35
|
-
`fetch` / `search` / `transcribe` 与 `pix-9router` 一致;collapse 配置仍在 `~/.pi/agent/pix.json`。
|
|
25
|
+
`fetch` / `search` / `transcribe` behave the same as `pix-9router`; collapse config still lives in `~/.pi/agent/pix.json`.
|
|
36
26
|
|
|
37
27
|
## License
|
|
38
28
|
|
package/package.json
CHANGED