pi-hypercharm-provider 1.1.5 → 1.2.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/.pi/fabric/mesh/state.json +106 -0
- package/AGENTS.md +2 -1
- package/README.md +52 -7
- package/deprecated-models.json +34 -1
- package/index.ts +936 -265
- package/models.json +49 -48
- package/package.json +9 -2
- package/pnpm-workspace.yaml +15 -0
- package/scripts/update-models.js +108 -2
- package/status.ts +305 -0
- package/tests/status.smoke.ts +146 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": 1,
|
|
3
|
+
"entries": {
|
|
4
|
+
"topology/hosts/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f": {
|
|
5
|
+
"key": "topology/hosts/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f",
|
|
6
|
+
"value": {
|
|
7
|
+
"format": 1,
|
|
8
|
+
"id": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
9
|
+
"rootId": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
10
|
+
"identity": {
|
|
11
|
+
"id": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
12
|
+
"name": "main",
|
|
13
|
+
"kind": "main",
|
|
14
|
+
"sessionId": "019fe2d3-1ac4-7f63-a2e7-b396c7bb1738"
|
|
15
|
+
},
|
|
16
|
+
"startedAt": 1786216915272,
|
|
17
|
+
"updatedAt": 1786219071101,
|
|
18
|
+
"expiresAt": 1786219086101
|
|
19
|
+
},
|
|
20
|
+
"version": 603,
|
|
21
|
+
"updatedAt": 1786219071102,
|
|
22
|
+
"updatedBy": {
|
|
23
|
+
"id": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
24
|
+
"name": "main",
|
|
25
|
+
"kind": "main",
|
|
26
|
+
"sessionId": "019fe2d3-1ac4-7f63-a2e7-b396c7bb1738"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"sessions/019fe2d3-1ac4-7f63-a2e7-b396c7bb1738": {
|
|
30
|
+
"key": "sessions/019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
31
|
+
"value": {
|
|
32
|
+
"id": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
33
|
+
"name": "Peer 019fe2d3",
|
|
34
|
+
"kind": "peer",
|
|
35
|
+
"status": "running",
|
|
36
|
+
"runner": "pi",
|
|
37
|
+
"transport": "host",
|
|
38
|
+
"cwd": "/Users/monotykamary/VCS/working-remote/open-source/pi-hypercharm-provider",
|
|
39
|
+
"sessionId": "019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
40
|
+
"model": "neuralwatt/kimi-k3",
|
|
41
|
+
"thinking": "max",
|
|
42
|
+
"startedAt": 1786216915272,
|
|
43
|
+
"updatedAt": 1786219071101,
|
|
44
|
+
"pendingMessages": false,
|
|
45
|
+
"local": false
|
|
46
|
+
},
|
|
47
|
+
"version": 603,
|
|
48
|
+
"updatedAt": 1786219071103,
|
|
49
|
+
"updatedBy": {
|
|
50
|
+
"id": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
51
|
+
"name": "main",
|
|
52
|
+
"kind": "main",
|
|
53
|
+
"sessionId": "019fe2d3-1ac4-7f63-a2e7-b396c7bb1738"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"topology/participants/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f": {
|
|
57
|
+
"key": "topology/participants/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f",
|
|
58
|
+
"value": {
|
|
59
|
+
"format": 1,
|
|
60
|
+
"id": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
61
|
+
"kind": "root",
|
|
62
|
+
"rootId": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
63
|
+
"ownerHostId": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
64
|
+
"ownerIdentityId": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
65
|
+
"name": "main",
|
|
66
|
+
"status": "running",
|
|
67
|
+
"runner": "pi",
|
|
68
|
+
"transport": "host",
|
|
69
|
+
"capabilities": [
|
|
70
|
+
"steer",
|
|
71
|
+
"followUp",
|
|
72
|
+
"fabric"
|
|
73
|
+
],
|
|
74
|
+
"cwd": "/Users/monotykamary/VCS/working-remote/open-source/pi-hypercharm-provider",
|
|
75
|
+
"sessionId": "019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
76
|
+
"model": "neuralwatt/kimi-k3",
|
|
77
|
+
"thinking": "max",
|
|
78
|
+
"startedAt": 1786216915272,
|
|
79
|
+
"updatedAt": 1786219071101,
|
|
80
|
+
"pendingMessages": false,
|
|
81
|
+
"controlProtocol": "v1"
|
|
82
|
+
},
|
|
83
|
+
"version": 603,
|
|
84
|
+
"updatedAt": 1786219071103,
|
|
85
|
+
"updatedBy": {
|
|
86
|
+
"id": "session:019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
|
|
87
|
+
"name": "main",
|
|
88
|
+
"kind": "main",
|
|
89
|
+
"sessionId": "019fe2d3-1ac4-7f63-a2e7-b396c7bb1738"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"versions": {
|
|
94
|
+
"topology/hosts/e9758aa8c95305a8d60a8aa2c20fd53195591d479b2460e1273457793d3f1fec": 18,
|
|
95
|
+
"sessions/019fe2c8-1dd2-7435-9fa1-fa664831df18": 17,
|
|
96
|
+
"topology/participants/e9758aa8c95305a8d60a8aa2c20fd53195591d479b2460e1273457793d3f1fec": 18,
|
|
97
|
+
"topology/hosts/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f": 603,
|
|
98
|
+
"sessions/019fe2d3-1ac4-7f63-a2e7-b396c7bb1738": 603,
|
|
99
|
+
"topology/participants/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f": 603
|
|
100
|
+
},
|
|
101
|
+
"tombstoneOrder": [
|
|
102
|
+
"sessions/019fe2c8-1dd2-7435-9fa1-fa664831df18",
|
|
103
|
+
"topology/participants/e9758aa8c95305a8d60a8aa2c20fd53195591d479b2460e1273457793d3f1fec",
|
|
104
|
+
"topology/hosts/e9758aa8c95305a8d60a8aa2c20fd53195591d479b2460e1273457793d3f1fec"
|
|
105
|
+
]
|
|
106
|
+
}
|
package/AGENTS.md
CHANGED
|
@@ -18,7 +18,8 @@ When a model needs overrides, new properties, or corrections, edit the appropria
|
|
|
18
18
|
|------|---------|
|
|
19
19
|
| `patch.json` | Per-model overrides keyed by model ID. Add reasoning flags, compat settings, pricing corrections, thinking level maps, etc. Applied on top of `models.json` at runtime and for README generation. |
|
|
20
20
|
| `custom-models.json` | Models that don't exist in the provider API (hidden models, router endpoints, cross-provider aliases). Merged after patch. Format: array of full model objects (same schema as `models.json` entries). |
|
|
21
|
-
| `index.ts` | Provider extension code. |
|
|
21
|
+
| `index.ts` | Provider extension code: model sync, streaming wrapper, footer-status wiring. |
|
|
22
|
+
| `status.ts` | Footer-status presentation: config schema, hypercredit/rate-limit formatters, progressive-disclosure tiers, width-aware widget. Pure module — no pi imports; exercised by `tests/status.smoke.ts`. |
|
|
22
23
|
| `scripts/update-models.js` | The sync script itself (edit only if changing how models are fetched/transformed). |
|
|
23
24
|
|
|
24
25
|
## Data Flow
|
package/README.md
CHANGED
|
@@ -29,18 +29,17 @@ _Hyperoptimized coding models — DeepSeek, GLM, Kimi, Qwen, MiniMax, Gemma, GPT
|
|
|
29
29
|
| DeepSeek V4 Flash | Text | 1.0M | 384K | $0.20 | $0.40 |
|
|
30
30
|
| DeepSeek V4 Flash 0731 | Text | 1.0M | 384K | $0.15 | $0.30 |
|
|
31
31
|
| DeepSeek V4 Pro | Text | 1.0M | 384K | $2.40 | $4.80 |
|
|
32
|
-
| Gemma 4 26B A4B | Text | 256K | 26K | $0.
|
|
33
|
-
| GLM-5 | Text | 203K | 20K | $0.85 | $2.62 |
|
|
32
|
+
| Gemma 4 26B A4B | Text | 256K | 26K | $0.12 | $0.42 |
|
|
34
33
|
| GLM-5.1 | Text | 203K | 131K | $1.52 | $4.79 |
|
|
35
34
|
| GLM-5.2 | Text | 1.0M | 128K | $1.40 | $4.40 |
|
|
36
|
-
| gpt-oss-120b | Text | 131K | 13K | $0.
|
|
37
|
-
| Kimi K2.5 | Text | 262K | 26K | $0.
|
|
35
|
+
| gpt-oss-120b | Text | 131K | 13K | $0.18 | $0.71 |
|
|
36
|
+
| Kimi K2.5 | Text | 262K | 26K | $0.55 | $2.89 |
|
|
38
37
|
| Kimi K2.6 | Text + Image | 262K | 262K | $0.95 | $4.00 |
|
|
39
38
|
| Kimi K2.7 Code | Text + Image | 256K | 16K | $0.95 | $4.00 |
|
|
40
39
|
| Kimi K3 | Text + Image | 1.0M | 131K | $3.27 | $16.33 |
|
|
41
|
-
| Llama 3.3 70B Instruct | Text | 128K | 13K | $0.
|
|
42
|
-
| Llama 4 Maverick 17B 128E Instruct FP8 | Text | 430K | 43K | $0.
|
|
43
|
-
| MiniMax M2.7 | Text |
|
|
40
|
+
| Llama 3.3 70B Instruct | Text | 128K | 13K | $0.61 | $1.04 |
|
|
41
|
+
| Llama 4 Maverick 17B 128E Instruct FP8 | Text | 430K | 43K | $0.27 | $0.90 |
|
|
42
|
+
| MiniMax M2.7 | Text | 262K | 7K | $0.44 | $1.72 |
|
|
44
43
|
| MiniMax M3 | Text + Image | 512K | 512K | $0.33 | $1.31 |
|
|
45
44
|
| Qwen3 Coder 480B A35B Instruct INT4 Mixed AR | Text | 106K | 11K | $0.57 | $2.13 |
|
|
46
45
|
| Qwen3 Next 80B A3B Instruct | Text | 262K | 26K | $0.12 | $1.14 |
|
|
@@ -50,6 +49,7 @@ _Hyperoptimized coding models — DeepSeek, GLM, Kimi, Qwen, MiniMax, Gemma, GPT
|
|
|
50
49
|
| Qwen3.7-Flash | Text + Image | 1.0M | 64K | $0.20 | $0.80 |
|
|
51
50
|
| Qwen3.7-Max | Text | 1.0M | 64K | $2.50 | $7.50 |
|
|
52
51
|
| Qwen3.7-Plus | Text + Image | 1.0M | 64K | $1.20 | $4.80 |
|
|
52
|
+
| Qwen3.8-Max | Text + Image | 1.0M | 66K | $2.00 | $6.00 |
|
|
53
53
|
*Costs are per million tokens. Prices subject to change — check [hyper.charm.land](https://hyper.charm.land) for current pricing.*
|
|
54
54
|
|
|
55
55
|
## Installation
|
|
@@ -125,6 +125,51 @@ Supported levels are model-specific and come from Charm's `/v1/provider` catalog
|
|
|
125
125
|
|
|
126
126
|
DeepSeek V4 models use the `deepseek` thinking format — the same native format as the [pi-deepseek-provider](https://github.com/monotykamary/pi-deepseek-provider). This sends `thinking: {type: "enabled/disabled"}` plus `reasoning_effort` mapped via `thinkingLevelMap` (`high` → `"high"`, `max` → `"max"`). Replayed assistant messages include empty `reasoning_content` as required by DeepSeek's API.
|
|
127
127
|
|
|
128
|
+
## Footer Status
|
|
129
|
+
|
|
130
|
+
A Neuralwatt-style status line sits below the editor. It appears after the
|
|
131
|
+
session's first HyperCharm turn completes (never before — no half-empty line
|
|
132
|
+
on fresh sessions or other providers), refreshes its balance when the agent
|
|
133
|
+
run fully settles, and makes no status-related API calls in sessions that
|
|
134
|
+
never use HyperCharm:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
⚡ 1.24 hc · 7 req Xu's Team ◆ 249 hc · 996/1k/h · 29d
|
|
138
|
+
└─ session spend+requests ─┘ └─ team · balance · rate limits ──┘
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
The left side tracks what the current session has sent/spent, read from
|
|
142
|
+
Hyper's `usage.cost.hypercredits` extension on each response (no polling).
|
|
143
|
+
The right side shows the team name (`/v1/teams` — works for API-key auth),
|
|
144
|
+
the Hypercredit balance (`/v1/credits`), the per-hour and per-day request
|
|
145
|
+
rate limits captured from response headers, and days until the OAuth device
|
|
146
|
+
session expires when signed in with OAuth. The right side compresses
|
|
147
|
+
progressively as the terminal narrows, and turns to a warning color at/below
|
|
148
|
+
the `lowBalanceHc` threshold.
|
|
149
|
+
|
|
150
|
+
### Configuration
|
|
151
|
+
|
|
152
|
+
Edit `~/.pi/agent/extensions/hypercharm.json` or run `/hypercharm-status`:
|
|
153
|
+
|
|
154
|
+
| Setting | Values | Default |
|
|
155
|
+
|---------|--------|---------|
|
|
156
|
+
| `session` | `widget` \| `statusbar` \| `off` | `widget` |
|
|
157
|
+
| `account` | `widget` \| `statusbar` \| `off` | `widget` |
|
|
158
|
+
| `hideOnOtherProvider` | `true` \| `false` | `true` |
|
|
159
|
+
| `lowBalanceHc` | number \| `null` | `25` |
|
|
160
|
+
|
|
161
|
+
Non-interactive toggles:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
/hypercharm-status session widget|statusbar|off
|
|
165
|
+
/hypercharm-status account widget|statusbar|off
|
|
166
|
+
/hypercharm-status hide true|false
|
|
167
|
+
/hypercharm-status lowBalance 50|off
|
|
168
|
+
/hypercharm-status refresh
|
|
169
|
+
/hypercharm-status reset
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
|
|
128
173
|
## Authentication
|
|
129
174
|
|
|
130
175
|
The HyperCharm API key can be configured in multiple ways (resolved in this order):
|
package/deprecated-models.json
CHANGED
|
@@ -1 +1,34 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"glm-5": {
|
|
3
|
+
"id": "glm-5",
|
|
4
|
+
"name": "GLM-5",
|
|
5
|
+
"reasoning": true,
|
|
6
|
+
"thinkingLevelMap": {
|
|
7
|
+
"off": "off",
|
|
8
|
+
"minimal": null,
|
|
9
|
+
"low": null,
|
|
10
|
+
"medium": null,
|
|
11
|
+
"high": null,
|
|
12
|
+
"xhigh": null,
|
|
13
|
+
"max": "max"
|
|
14
|
+
},
|
|
15
|
+
"input": [
|
|
16
|
+
"text"
|
|
17
|
+
],
|
|
18
|
+
"cost": {
|
|
19
|
+
"input": 0.85,
|
|
20
|
+
"output": 2.742,
|
|
21
|
+
"cacheRead": 0.425,
|
|
22
|
+
"cacheWrite": 0
|
|
23
|
+
},
|
|
24
|
+
"contextWindow": 202752,
|
|
25
|
+
"maxTokens": 20275,
|
|
26
|
+
"compat": {
|
|
27
|
+
"supportsStore": false,
|
|
28
|
+
"supportsReasoningEffort": false,
|
|
29
|
+
"thinkingFormat": "deepseek",
|
|
30
|
+
"maxTokensField": "max_tokens"
|
|
31
|
+
},
|
|
32
|
+
"deprecatedAt": "2026-08-08T02:00:08.813Z"
|
|
33
|
+
}
|
|
34
|
+
}
|