pi-hypercharm-provider 1.1.5 → 1.2.1

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.
@@ -0,0 +1,20 @@
1
+ {
2
+ "format": 1,
3
+ "entries": {},
4
+ "versions": {
5
+ "topology/hosts/e9758aa8c95305a8d60a8aa2c20fd53195591d479b2460e1273457793d3f1fec": 18,
6
+ "sessions/019fe2c8-1dd2-7435-9fa1-fa664831df18": 17,
7
+ "topology/participants/e9758aa8c95305a8d60a8aa2c20fd53195591d479b2460e1273457793d3f1fec": 18,
8
+ "topology/hosts/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f": 632,
9
+ "sessions/019fe2d3-1ac4-7f63-a2e7-b396c7bb1738": 631,
10
+ "topology/participants/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f": 632
11
+ },
12
+ "tombstoneOrder": [
13
+ "sessions/019fe2c8-1dd2-7435-9fa1-fa664831df18",
14
+ "topology/participants/e9758aa8c95305a8d60a8aa2c20fd53195591d479b2460e1273457793d3f1fec",
15
+ "topology/hosts/e9758aa8c95305a8d60a8aa2c20fd53195591d479b2460e1273457793d3f1fec",
16
+ "sessions/019fe2d3-1ac4-7f63-a2e7-b396c7bb1738",
17
+ "topology/participants/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f",
18
+ "topology/hosts/e0efb9d647e046c355b8bff12785e7805d774e7b89892edb38b4b29667ddc15f"
19
+ ]
20
+ }
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
@@ -27,22 +27,21 @@ _Hyperoptimized coding models — DeepSeek, GLM, Kimi, Qwen, MiniMax, Gemma, GPT
27
27
  | Model | Type | Context | Max Tokens | Input Cost | Output Cost |
28
28
  |-------|------|---------|------------|------------|-------------|
29
29
  | DeepSeek V4 Flash | Text | 1.0M | 384K | $0.20 | $0.40 |
30
- | DeepSeek V4 Flash 0731 | Text | 1.0M | 384K | $0.15 | $0.30 |
30
+ | DeepSeek V4 Flash 0731 | Text | 1.0M | 384K | $0.20 | $0.40 |
31
31
  | DeepSeek V4 Pro | Text | 1.0M | 384K | $2.40 | $4.80 |
32
- | Gemma 4 26B A4B | Text | 256K | 26K | $0.13 | $0.43 |
33
- | GLM-5 | Text | 203K | 20K | $0.85 | $2.62 |
34
- | GLM-5.1 | Text | 203K | 131K | $1.52 | $4.79 |
35
- | GLM-5.2 | Text | 1.0M | 128K | $1.40 | $4.40 |
32
+ | Gemma 4 26B A4B | Text | 256K | 26K | $0.13 | $0.42 |
33
+ | GLM-5.1 | Text | 203K | 3K | $1.52 | $4.79 |
34
+ | GLM-5.2 | Text | 1.0M | 33K | $1.40 | $4.40 |
36
35
  | gpt-oss-120b | Text | 131K | 13K | $0.19 | $0.70 |
37
- | Kimi K2.5 | Text | 262K | 26K | $0.56 | $2.82 |
38
- | Kimi K2.6 | Text + Image | 262K | 262K | $0.95 | $4.00 |
36
+ | Kimi K2.5 | Text | 262K | 26K | $0.53 | $2.80 |
37
+ | Kimi K2.6 | Text + Image | 262K | 26K | $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.51 | $1.04 |
42
- | Llama 4 Maverick 17B 128E Instruct FP8 | Text | 430K | 43K | $0.28 | $0.93 |
43
- | MiniMax M2.7 | Text | 205K | 20K | $0.44 | $1.72 |
40
+ | Llama 3.3 70B Instruct | Text | 128K | 13K | $0.60 | $0.74 |
41
+ | Llama 4 Maverick 17B 128E Instruct FP8 | Text | 430K | 43K | $0.27 | $0.90 |
42
+ | MiniMax M2.7 | Text | 262K | 7K | $0.47 | $1.76 |
44
43
  | MiniMax M3 | Text + Image | 512K | 512K | $0.33 | $1.31 |
45
- | Qwen3 Coder 480B A35B Instruct INT4 Mixed AR | Text | 106K | 11K | $0.57 | $2.13 |
44
+ | Qwen3 Coder 480B A35B Instruct INT4 Mixed AR | Text | 106K | 11K | $0.45 | $2.15 |
46
45
  | Qwen3 Next 80B A3B Instruct | Text | 262K | 26K | $0.12 | $1.14 |
47
46
  | Qwen3.6-Flash | Text + Image | 1.0M | 64K | $1.00 | $4.00 |
48
47
  | Qwen3.6-Max | Text | 256K | 64K | $2.00 | $12.00 |
@@ -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):
@@ -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
+ }