@tduyng/pi-commandcode 0.0.2 → 0.0.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 +34 -16
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# pi-commandcode
|
|
2
2
|
|
|
3
|
-
Command Code models in
|
|
3
|
+
Command Code models in pi through the documented Provider API, with pi's own prompt, tools, and approvals. Unofficial: not made or endorsed by Command Code.
|
|
4
|
+
|
|
5
|
+
## What it costs
|
|
6
|
+
|
|
7
|
+
No tools, no prompt block, no schema. It is a model provider, so it adds nothing to the context and nothing to the cold start.
|
|
8
|
+
|
|
9
|
+
Streaming, tool calls, and message conversion are pi's own adapters, so the transport adds no round trip of its own.
|
|
4
10
|
|
|
5
11
|
## Requirements
|
|
6
12
|
|
|
7
|
-
-
|
|
13
|
+
- An API key from a plan with API access: GOAT, Pro, Max, Team, or Provider. The Go and $1 plans have no API access.
|
|
8
14
|
- Pi 1.4 or newer.
|
|
9
15
|
|
|
10
16
|
## Use
|
|
@@ -14,7 +20,7 @@ export COMMAND_CODE_API_KEY="user_..."
|
|
|
14
20
|
pi --provider commandcode --model claude-opus-5
|
|
15
21
|
```
|
|
16
22
|
|
|
17
|
-
Inside
|
|
23
|
+
Inside pi, `/model` lists every `commandcode` model. The list is fetched from `https://api.commandcode.ai/provider/v1/models` at startup and again each time the selector opens.
|
|
18
24
|
|
|
19
25
|
## How it works
|
|
20
26
|
|
|
@@ -23,27 +29,39 @@ Inside Pi, `/model` lists every `commandcode` model. The list is fetched from `h
|
|
|
23
29
|
| `claude-*` | Anthropic Messages, `/provider/v1/messages` | `https://api.commandcode.ai/provider` |
|
|
24
30
|
| everything else | OpenAI Chat Completions, `/provider/v1/chat/completions` | `https://api.commandcode.ai/provider/v1` |
|
|
25
31
|
|
|
26
|
-
|
|
32
|
+
The key goes as a Bearer token for Chat Completions and as `x-api-key` for Messages, as the Provider API documents. `typesafe/*` decision models are left out because they run on a separate endpoint and never stream.
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
## Limits
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
- The catalog carries no image or price metadata, so every model is text-only and shows zero cost in pi.
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
| --- | --- |
|
|
34
|
-
| `COMMAND_CODE_API_KEY` | Provider API key. Required for requests. |
|
|
35
|
-
| `CMD_ZDR=1` | Sends `x-cmd-zdr: 1`, so requests go only to zero-data-retention upstreams. A model without one fails with HTTP 422. |
|
|
38
|
+
- Thinking is on for every model. Pi levels map to `reasoning_effort`, and `minimal` sends `low`. `off` is offered only for the DeepSeek ids that accept it, because a model that cannot stop thinking rejects `off` with HTTP 400.
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
- Claude 4.6 and newer use adaptive thinking, and the 4.5 models take a thinking budget.
|
|
41
|
+
|
|
42
|
+
- Every model gets a 32768 output limit, the smallest in the Command Code CLI catalog, because per-model limits are not in the Provider API.
|
|
38
43
|
|
|
39
|
-
- The catalog has no image or price metadata, so every model is text-only and shows zero cost in Pi.
|
|
40
|
-
- Thinking is on for every model. Pi levels map to the gateway's `reasoning_effort` values, `minimal` sends `low`. `off` is offered only for the DeepSeek ids that accept it, because a model that cannot stop thinking rejects `off` with HTTP 400 and leaves the level out everywhere else.
|
|
41
|
-
- Claude 4.6 and newer use adaptive thinking, the 4.5 models take a thinking budget.
|
|
42
|
-
- Every model gets a 32768 output limit, the smallest limit in the Command Code CLI catalog. Per-model limits are not in the Provider API.
|
|
43
44
|
- Chat Completions is used for every non-Claude model, as the docs say. A model that rejects that wire returns its own error.
|
|
44
|
-
|
|
45
|
+
|
|
46
|
+
- Messages requests carry pi's `?beta=true` query string, added by the Anthropic SDK.
|
|
47
|
+
|
|
45
48
|
- If no models appear, check the network and the key, then open `/model` again.
|
|
46
49
|
|
|
50
|
+
## Configure
|
|
51
|
+
|
|
52
|
+
| Variable | Meaning |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `COMMAND_CODE_API_KEY` | Provider API key, required for requests |
|
|
55
|
+
| `CMD_ZDR=1` | Sends `x-cmd-zdr: 1`, so requests go only to zero-data-retention upstreams. A model without one fails with HTTP 422 |
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pi install npm:@tduyng/pi-commandcode
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Local checkout: `pi install /path/to/dotfiles/pi/agent/extensions/pi-commandcode`
|
|
64
|
+
|
|
47
65
|
## Tests
|
|
48
66
|
|
|
49
67
|
```sh
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tduyng/pi-commandcode",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Command Code models in Pi through the documented Provider API, with Pi's own prompt and tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi",
|
|
7
7
|
"pi-package",
|