pi-hypercharm-provider 1.3.42 → 1.3.43

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,114 @@
1
+ name: Publish
2
+
3
+ # Releases of pi-hypercharm-provider go out from here, and only from here.
4
+ #
5
+ # 1. Bump "version" in package.json (the `chore(release): X.Y.Z` commit).
6
+ # 2. Push it to main. This workflow publishes every version that npm does
7
+ # not have yet; any other push is a no-op.
8
+ #
9
+ # Run it from the Actions tab to retry a failed release, or tick "dry_run" to
10
+ # build, check and pack without publishing.
11
+ #
12
+ # Auth is npm Trusted Publishing (OIDC): npm trusts this file, so no npm token
13
+ # is stored anywhere. Registered once with
14
+ # npm trust github pi-hypercharm-provider --repo monotykamary/pi-hypercharm-provider --file publish.yml --allow-publish
15
+ #
16
+ # Bun installs and packs exactly as `bun publish` does; npm uploads the
17
+ # tarballs because only the npm CLI speaks trusted publishing.
18
+
19
+ on:
20
+ push:
21
+ branches: [main]
22
+ paths: [package.json]
23
+ workflow_dispatch:
24
+ inputs:
25
+ dry_run:
26
+ description: Build, check and pack, but do not publish
27
+ type: boolean
28
+ default: false
29
+
30
+ permissions:
31
+ contents: read
32
+ id-token: write
33
+
34
+ concurrency:
35
+ group: publish
36
+ cancel-in-progress: false
37
+
38
+ jobs:
39
+ publish:
40
+ runs-on: ubuntu-latest
41
+ timeout-minutes: 45
42
+ steps:
43
+ - uses: actions/checkout@v5
44
+
45
+ - uses: actions/setup-node@v5
46
+ with:
47
+ node-version: 24
48
+
49
+ - uses: oven-sh/setup-bun@v2
50
+
51
+ - name: Find versions npm does not have
52
+ id: release
53
+ env:
54
+ DRY_RUN: ${{ inputs.dry_run }}
55
+ run: |
56
+ specs=$(
57
+ node -p "const p = require('./package.json'); p.name + '@' + p.version"
58
+ )
59
+ missing=""
60
+ for spec in $specs; do
61
+ # npm runs from outside the checkout so the repo's devEngines do not apply.
62
+ if (cd "$RUNNER_TEMP" && npm view "$spec" version >/dev/null 2>&1); then
63
+ echo "$spec is already on npm"
64
+ else
65
+ missing="$missing $spec"
66
+ fi
67
+ done
68
+ if [ "$DRY_RUN" = "true" ]; then
69
+ mode=dry-run
70
+ elif [ -n "$missing" ]; then
71
+ mode=publish
72
+ echo "::notice::Publishing$missing"
73
+ else
74
+ mode=skip
75
+ echo "::notice::Nothing to publish"
76
+ fi
77
+ echo "mode=$mode" >> "$GITHUB_OUTPUT"
78
+
79
+ - name: Install dependencies
80
+ if: steps.release.outputs.mode != 'skip'
81
+ run: bun install --frozen-lockfile
82
+
83
+ - name: Check
84
+ if: steps.release.outputs.mode != 'skip'
85
+ run: bun run check
86
+
87
+ - name: Pack
88
+ if: steps.release.outputs.mode != 'skip'
89
+ run: |
90
+ bun run --if-present prepublishOnly
91
+ bun pm pack --destination "$RUNNER_TEMP/pack"
92
+
93
+ - name: Publish
94
+ if: steps.release.outputs.mode != 'skip'
95
+ env:
96
+ MODE: ${{ steps.release.outputs.mode }}
97
+ run: |
98
+ # Trusted publishing needs npm 11.5.1 or newer.
99
+ npm install --global npm@latest
100
+ cd "$RUNNER_TEMP"
101
+ # ./ keeps npm from reading pack/name.tgz as a GitHub repo shorthand.
102
+ for tarball in ./pack/*.tgz; do
103
+ spec=$(tar -xOzf "$tarball" package/package.json | node -p "const p = JSON.parse(require('fs').readFileSync(0, 'utf8')); p.name + '@' + p.version")
104
+ echo "::group::$spec"
105
+ tar -tzf "$tarball"
106
+ echo "::endgroup::"
107
+ if [ "$MODE" = "dry-run" ]; then
108
+ echo "Dry run: not publishing $spec"
109
+ elif npm view "$spec" version >/dev/null 2>&1; then
110
+ echo "$spec is already on npm"
111
+ else
112
+ npm publish "$tarball" --access public --provenance
113
+ fi
114
+ done
@@ -5,12 +5,12 @@ on:
5
5
  - cron: "7 0 * * *" # 07:07 Asia/Ho_Chi_Minh
6
6
  workflow_dispatch:
7
7
 
8
- # Publishing uses npm Trusted Publishing (OIDC) bound to this workflow file, so
9
- # no npm token is stored. A version pushed while publishing was unavailable is
10
- # published by the next run that finds it missing from npm.
8
+ # This workflow only syncs the catalog and bumps the version; publish.yml does
9
+ # the releasing. It publishes any version npm does not have yet, so a release
10
+ # that failed earlier goes out with the next hand-off.
11
11
  permissions:
12
12
  contents: write
13
- id-token: write
13
+ actions: write
14
14
 
15
15
  concurrency:
16
16
  group: update-models
@@ -47,14 +47,9 @@ jobs:
47
47
  git commit -am "chore(release): v$version"
48
48
  git push origin HEAD:main
49
49
 
50
- - name: Publish to npm if this version is missing
51
- run: |
52
- name=$(node -p "require('./package.json').name")
53
- version=$(node -p "require('./package.json').version")
54
- if npm view "$name@$version" version >/dev/null 2>&1; then
55
- echo "$name@$version is already on npm."
56
- exit 0
57
- fi
58
- # Trusted publishing needs npm 11.5.1 or newer.
59
- npm install --global npm@latest
60
- npm publish --access public --provenance
50
+ # Pushes made with GITHUB_TOKEN do not start other workflows, so hand the
51
+ # release to publish.yml explicitly.
52
+ - name: Hand off to publish.yml
53
+ env:
54
+ GH_TOKEN: ${{ github.token }}
55
+ run: gh workflow run publish.yml --ref main
package/README.md CHANGED
@@ -20,7 +20,7 @@ Run `bun run test:pi` for offline manifest, catalog, lifecycle and streaming che
20
20
 
21
21
  ## Features
22
22
 
23
- - **23+ AI Models** including DeepSeek V4 Flash/Pro, GLM 5/5.1, Kimi K2.5/K2.6, Qwen3.6/3.7, MiniMax M2.7, Gemma 4, GPT-OSS, and Llama
23
+ - **24+ AI Models** including DeepSeek V4 Flash/Pro, GLM 5/5.1, Kimi K2.5/K2.6, Qwen3.6/3.7, MiniMax M2.7, Gemma 4, GPT-OSS, and Llama
24
24
  - **DeepSeek Native Thinking** — Uses the `deepseek` thinking format for Charm Hyper requests, with native `reasoning_effort` on models that publish levels
25
25
  - **OpenAI-compatible API** via Charm Hyper's `/v1/chat/completions` endpoint
26
26
  - **OAuth Device Flow** — sign in with `/login` under the `hypercharm` provider (independent of the official provider's `hyper` registration)
@@ -48,6 +48,7 @@ Run `bun run test:pi` for offline manifest, catalog, lifecycle and streaming che
48
48
  | Kimi K3 | Text + Image | 1.0M | 16K | $3.27 | $16.33 |
49
49
  | MiniMax M2.7 | Text | 262K | 7K | $0.48 | $1.85 |
50
50
  | MiniMax M3 | Text + Image | 512K | 512K | $0.33 | $1.31 |
51
+ | Prism | Text + Image | 1.0M | 16K | $3.27 | $16.33 |
51
52
  | Qwen3.7-Flash | Text + Image | 1.0M | 64K | $0.20 | $0.80 |
52
53
  | Qwen3.7-Max | Text | 1.0M | 64K | $2.50 | $7.50 |
53
54
  | Qwen3.7-Plus | Text + Image | 1.0M | 64K | $1.20 | $4.80 |
package/models.json CHANGED
@@ -421,6 +421,29 @@
421
421
  "maxTokensField": "max_tokens"
422
422
  }
423
423
  },
424
+ {
425
+ "id": "prism",
426
+ "name": "Prism",
427
+ "reasoning": false,
428
+ "input": [
429
+ "text",
430
+ "image"
431
+ ],
432
+ "cost": {
433
+ "input": 3.2664,
434
+ "output": 16.332,
435
+ "cacheRead": 0.32664,
436
+ "cacheWrite": 0
437
+ },
438
+ "contextWindow": 1000000,
439
+ "maxTokens": 16000,
440
+ "compat": {
441
+ "supportsStore": false,
442
+ "supportsReasoningEffort": false,
443
+ "thinkingFormat": "deepseek",
444
+ "maxTokensField": "max_tokens"
445
+ }
446
+ },
424
447
  {
425
448
  "id": "qwen3.7-flash",
426
449
  "name": "Qwen3.7-Flash",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-hypercharm-provider",
3
- "version": "1.3.42",
3
+ "version": "1.3.43",
4
4
  "description": "HyperCharm provider extension for pi - Access DeepSeek, GLM, Kimi, Qwen, MiniMax, Gemma, and GPT-OSS models through the Charm Hyper API",
5
5
  "type": "module",
6
6
  "main": "index.ts",