pi-cliproxyapi-native 0.1.3 → 0.1.4
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 +5 -5
- package/package.json +9 -8
- package/src/catalog.ts +1 -1
- package/src/provider.ts +3 -0
package/README.md
CHANGED
|
@@ -6,15 +6,15 @@ Chat uses Pi's native API adapters and model metadata, with availability from yo
|
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This release targets Pi 0.99.2 and CLIProxyAPI 8.0.7, with Node.js 22.19 or newer. Run CLIProxyAPI with your upstream accounts configured before connecting Pi. The extension uses Pi's host-provided packages, adds no runtime dependencies, and needs no compilation.
|
|
10
10
|
|
|
11
11
|
If you installed `pi-cliproxy-native`, remove it before installing the renamed package. Both register the same `cliproxyapi` provider.
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
pi install npm:pi-cliproxyapi-native@0.1.
|
|
14
|
+
pi install npm:pi-cliproxyapi-native@0.1.4
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
For Git installation, use `pi install git:github.com/hawkff/pi-cliproxyapi-native@v0.1.
|
|
17
|
+
For Git installation, use `pi install git:github.com/hawkff/pi-cliproxyapi-native@v0.1.4`. For a local checkout, use `pi install /path/to/pi-cliproxyapi-native`.
|
|
18
18
|
|
|
19
19
|
The default proxy address is `http://localhost:8317`. For another address, set the [connection](#connection) before logging in. Restart Pi, then run:
|
|
20
20
|
|
|
@@ -112,7 +112,7 @@ GPT Image 1.5 accepts `auto`, `1024x1024`, `1536x1024`, and `1024x1536`. GPT Ima
|
|
|
112
112
|
|
|
113
113
|
Gemini 3 Pro Image supports `1K`, `2K`, and `4K`. Gemini 3.1 Flash Image also supports `512`. Flash Lite Image supports `1K` only. Gemini 2.5 Flash Image has no resolution selector. Use the exact case shown in discovery, including uppercase `K` for Gemini and lowercase `k` for xAI.
|
|
114
114
|
|
|
115
|
-
Aspect ratios vary by model and proxy route. For example, CLIProxyAPI
|
|
115
|
+
Aspect ratios vary by model and proxy route. For example, CLIProxyAPI 8.0.7 accepts `20:9` for xAI images but drops xAI's `21:9` and `auto` values. The extension rejects unsupported controls before authentication or network access instead of substituting another size or shape.
|
|
116
116
|
|
|
117
117
|
```text
|
|
118
118
|
Generate an image with gpt-image-2.5-sunburst at size 2048x2048.
|
|
@@ -207,7 +207,7 @@ Keep the full advertised ID when selecting a backend, for example:
|
|
|
207
207
|
|
|
208
208
|
These examples select media defaults. Chat routes belong in Pi's built-in `/model` picker.
|
|
209
209
|
|
|
210
|
-
Set the CLIProxyAPI auth record's top-level `prefix` to `vertex` or `antigravity` to advertise those routes. With `force-model-prefix: false
|
|
210
|
+
Set the CLIProxyAPI auth record's top-level `prefix` to `vertex` or `antigravity` to advertise those routes. With `routing.force-model-prefix: false` in CLIProxyAPI 8, the proxy retains bare IDs too. Legacy configurations use the top-level `force-model-prefix` setting. This extension does not change proxy configuration or restart it.
|
|
211
211
|
|
|
212
212
|
## Thinking and child sessions
|
|
213
213
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-cliproxyapi-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "CLIProxyAPI chat discovery and image/video generation with Pi's native adapters",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
14
14
|
"pi-package",
|
|
15
|
-
"
|
|
15
|
+
"pi-extension",
|
|
16
|
+
"cliproxyapi"
|
|
16
17
|
],
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|
|
@@ -38,15 +39,15 @@
|
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@biomejs/biome": "^2.5.13",
|
|
41
|
-
"@earendil-works/pi-ai": "^0.
|
|
42
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
43
|
-
"@earendil-works/pi-tui": "^0.
|
|
42
|
+
"@earendil-works/pi-ai": "^0.99.2",
|
|
43
|
+
"@earendil-works/pi-coding-agent": "^0.99.2",
|
|
44
|
+
"@earendil-works/pi-tui": "^0.99.2",
|
|
44
45
|
"@types/node": "^24.13.4",
|
|
45
46
|
"typescript": "5.9.3"
|
|
46
47
|
},
|
|
47
48
|
"peerDependencies": {
|
|
48
|
-
"@earendil-works/pi-ai": "
|
|
49
|
-
"@earendil-works/pi-coding-agent": "
|
|
50
|
-
"@earendil-works/pi-tui": "
|
|
49
|
+
"@earendil-works/pi-ai": "*",
|
|
50
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
51
|
+
"@earendil-works/pi-tui": "*"
|
|
51
52
|
}
|
|
52
53
|
}
|
package/src/catalog.ts
CHANGED
|
@@ -124,7 +124,7 @@ export function mediaControls(id: string) {
|
|
|
124
124
|
aspect_ratio = commonRatios;
|
|
125
125
|
if (capability.purpose === "image") {
|
|
126
126
|
resolution = ["1k", "2k"];
|
|
127
|
-
// CLIProxyAPI
|
|
127
|
+
// CLIProxyAPI 8.0.7 drops other xAI image ratios, including auto.
|
|
128
128
|
aspect_ratio.push("9:20", "20:9");
|
|
129
129
|
} else {
|
|
130
130
|
resolution = ["480p", "720p"];
|
package/src/provider.ts
CHANGED
|
@@ -146,6 +146,9 @@ function route(streams: ProviderStreams, baseUrl: string): ProviderStreams {
|
|
|
146
146
|
...options,
|
|
147
147
|
onPayload,
|
|
148
148
|
onResponse: options?.onResponse ? (response) => options.onResponse?.(response, model) : undefined,
|
|
149
|
+
onProviderStreamEvent: options?.onProviderStreamEvent
|
|
150
|
+
? (event) => options.onProviderStreamEvent?.(event, model)
|
|
151
|
+
: undefined,
|
|
149
152
|
});
|
|
150
153
|
if (!backend) return run();
|
|
151
154
|
return lazyStream(model, async () => ({
|