pi-opencode-go-provider 1.1.26 → 1.1.27
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/.github/workflows/publish.yml +114 -0
- package/.github/workflows/update-models.yml +10 -15
- package/README.md +2 -4
- package/deprecated-models.json +77 -0
- package/models.json +29 -75
- package/package.json +1 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
# Releases of pi-opencode-go-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-opencode-go-provider --repo monotykamary/pi-opencode-go-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
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
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
|
-
|
|
13
|
+
actions: write
|
|
14
14
|
|
|
15
15
|
concurrency:
|
|
16
16
|
group: update-models
|
|
@@ -45,14 +45,9 @@ jobs:
|
|
|
45
45
|
git commit -am "chore(release): v$version"
|
|
46
46
|
git push origin HEAD:main
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
exit 0
|
|
55
|
-
fi
|
|
56
|
-
# Trusted publishing needs npm 11.5.1 or newer.
|
|
57
|
-
npm install --global npm@latest
|
|
58
|
-
npm publish --access public --provenance
|
|
48
|
+
# Pushes made with GITHUB_TOKEN do not start other workflows, so hand the
|
|
49
|
+
# release to publish.yml explicitly.
|
|
50
|
+
- name: Hand off to publish.yml
|
|
51
|
+
env:
|
|
52
|
+
GH_TOKEN: ${{ github.token }}
|
|
53
|
+
run: gh workflow run publish.yml --ref main
|
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ pi
|
|
|
76
76
|
|
|
77
77
|
| Model | API | Type | Context | Max Tokens | Input Cost | Output Cost |
|
|
78
78
|
|-------|-----|------|---------|------------|------------|-------------|
|
|
79
|
-
| Cat Jam Free | Completions | Text |
|
|
79
|
+
| Cat Jam Free | Completions | Text | 1.0M | 131K | — | — |
|
|
80
80
|
| Claude Haiku 5.5 | Anthropic | Text + Image | 1.0M | 128K | $0.10 | $0.50 |
|
|
81
81
|
| DeepSeek V4 Pro (New) | Completions | Text | 1.0M | 384K | $0.66 | $1.98 |
|
|
82
82
|
| DeepSeek V4.1 Flash | Completions | Text + Image | 1.0M | 384K | $0.15 | $0.60 |
|
|
@@ -86,7 +86,6 @@ pi
|
|
|
86
86
|
| GLM-5.3-Flash | Completions | Text + Image | 1.0M | 131K | $0.15 | $0.50 |
|
|
87
87
|
| GPT-5.6 Luna | Responses | Text + Image | 1.1M | 128K | $0.20 | $1.20 |
|
|
88
88
|
| GPT-6 Luna | Completions | Text + Image | 1.1M | 128K | $0.10 | $0.50 |
|
|
89
|
-
| Grok 4.6 | Completions | Text + Image | 500K | 500K | $2.00 | $6.00 |
|
|
90
89
|
| Grok 4.7 | Completions | Text + Image | 500K | 500K | $2.00 | $6.00 |
|
|
91
90
|
| Hy3 | Completions | Text | 256K | 128K | $0.14 | $0.58 |
|
|
92
91
|
| Hy4 preview | Completions | Text | 1.0M | 64K | $0.83 | $2.50 |
|
|
@@ -98,7 +97,6 @@ pi
|
|
|
98
97
|
| MiMo V2.5 Pro | Completions | Text | 1.0M | 128K | $0.43 | $0.87 |
|
|
99
98
|
| MiMo-V2.6-Flash | Completions | Text + Image | 1.0M | 131K | $0.14 | $0.28 |
|
|
100
99
|
| MiMo-V2.6-Pro | Completions | Text + Image | 1.0M | 131K | $0.43 | $0.87 |
|
|
101
|
-
| MiniMax-M2.7 | Completions | Text | 205K | 131K | $0.30 | $1.20 |
|
|
102
100
|
| MiniMax-M3 | Anthropic | Text + Image | 1.0M | 131K | $0.30 | $1.20 |
|
|
103
101
|
| Muse Spark 1.2 Contributor | Responses | Text + Image | 1.0M | 131K | $0.10 | $0.20 |
|
|
104
102
|
| Muse Spark 1.3 Contributor | Responses | Text + Image | 1.0M | 131K | $0.10 | $0.20 |
|
|
@@ -106,7 +104,7 @@ pi
|
|
|
106
104
|
| Qwen3.8 Flash | Anthropic | Text + Image | 1.0M | 131K | $0.15 | $0.47 |
|
|
107
105
|
| Qwen3.8 Max | Anthropic | Text + Image | 1.0M | 131K | $2.00 | $6.00 |
|
|
108
106
|
| Space Bunny | Completions | Text + Image | 1.0M | 524K | $0.15 | $0.60 |
|
|
109
|
-
| Step 5 Preview
|
|
107
|
+
| Step 5 Preview | Completions | Text + Image | 1.0M | 66K | $1.00 | $2.70 |
|
|
110
108
|
*Costs are per million tokens. Prices subject to change - check [opencode.ai](https://opencode.ai) for current pricing.*
|
|
111
109
|
|
|
112
110
|
## Usage
|
package/deprecated-models.json
CHANGED
|
@@ -84,5 +84,82 @@
|
|
|
84
84
|
"contextWindow": 1000000,
|
|
85
85
|
"maxTokens": 384000,
|
|
86
86
|
"deprecatedAt": "2026-10-15T04:29:21.599Z"
|
|
87
|
+
},
|
|
88
|
+
"minimax-m2.7": {
|
|
89
|
+
"id": "minimax-m2.7",
|
|
90
|
+
"name": "MiniMax-M2.7",
|
|
91
|
+
"api": "anthropic-messages",
|
|
92
|
+
"baseUrl": "https://opencode.ai/zen/go",
|
|
93
|
+
"reasoning": true,
|
|
94
|
+
"input": [
|
|
95
|
+
"text"
|
|
96
|
+
],
|
|
97
|
+
"cost": {
|
|
98
|
+
"input": 0.3,
|
|
99
|
+
"output": 1.2,
|
|
100
|
+
"cacheRead": 0.06,
|
|
101
|
+
"cacheWrite": 0.375
|
|
102
|
+
},
|
|
103
|
+
"contextWindow": 204800,
|
|
104
|
+
"maxTokens": 131072,
|
|
105
|
+
"deprecatedAt": "2026-10-16T04:24:15.416Z"
|
|
106
|
+
},
|
|
107
|
+
"step-5-preview-free": {
|
|
108
|
+
"id": "step-5-preview-free",
|
|
109
|
+
"name": "Step 5 Preview Free",
|
|
110
|
+
"api": "openai-completions",
|
|
111
|
+
"baseUrl": "https://opencode.ai/zen/go/v1",
|
|
112
|
+
"reasoning": true,
|
|
113
|
+
"thinkingLevelMap": {
|
|
114
|
+
"off": null,
|
|
115
|
+
"minimal": null,
|
|
116
|
+
"low": "low",
|
|
117
|
+
"medium": "medium",
|
|
118
|
+
"high": "high",
|
|
119
|
+
"xhigh": null,
|
|
120
|
+
"max": null
|
|
121
|
+
},
|
|
122
|
+
"input": [
|
|
123
|
+
"text",
|
|
124
|
+
"image"
|
|
125
|
+
],
|
|
126
|
+
"cost": {
|
|
127
|
+
"input": 0,
|
|
128
|
+
"output": 0,
|
|
129
|
+
"cacheRead": 0,
|
|
130
|
+
"cacheWrite": 0
|
|
131
|
+
},
|
|
132
|
+
"contextWindow": 1000000,
|
|
133
|
+
"maxTokens": 65536,
|
|
134
|
+
"deprecatedAt": "2026-10-16T04:24:15.416Z"
|
|
135
|
+
},
|
|
136
|
+
"grok-4.6": {
|
|
137
|
+
"id": "grok-4.6",
|
|
138
|
+
"name": "Grok 4.6",
|
|
139
|
+
"api": "openai-completions",
|
|
140
|
+
"baseUrl": "https://opencode.ai/zen/go/v1",
|
|
141
|
+
"reasoning": true,
|
|
142
|
+
"thinkingLevelMap": {
|
|
143
|
+
"off": null,
|
|
144
|
+
"minimal": null,
|
|
145
|
+
"low": "low",
|
|
146
|
+
"medium": "medium",
|
|
147
|
+
"high": "high",
|
|
148
|
+
"xhigh": "xhigh",
|
|
149
|
+
"max": null
|
|
150
|
+
},
|
|
151
|
+
"input": [
|
|
152
|
+
"text",
|
|
153
|
+
"image"
|
|
154
|
+
],
|
|
155
|
+
"cost": {
|
|
156
|
+
"input": 2,
|
|
157
|
+
"output": 6,
|
|
158
|
+
"cacheRead": 0.5,
|
|
159
|
+
"cacheWrite": 0
|
|
160
|
+
},
|
|
161
|
+
"contextWindow": 500000,
|
|
162
|
+
"maxTokens": 500000,
|
|
163
|
+
"deprecatedAt": "2026-10-16T04:24:15.416Z"
|
|
87
164
|
}
|
|
88
165
|
}
|
package/models.json
CHANGED
|
@@ -224,6 +224,34 @@
|
|
|
224
224
|
"contextWindow": 1000000,
|
|
225
225
|
"maxTokens": 384000
|
|
226
226
|
},
|
|
227
|
+
{
|
|
228
|
+
"id": "step-5-preview",
|
|
229
|
+
"name": "Step 5 Preview",
|
|
230
|
+
"api": "openai-completions",
|
|
231
|
+
"baseUrl": "https://opencode.ai/zen/go/v1",
|
|
232
|
+
"reasoning": true,
|
|
233
|
+
"thinkingLevelMap": {
|
|
234
|
+
"off": null,
|
|
235
|
+
"minimal": null,
|
|
236
|
+
"low": "low",
|
|
237
|
+
"medium": "medium",
|
|
238
|
+
"high": "high",
|
|
239
|
+
"xhigh": null,
|
|
240
|
+
"max": null
|
|
241
|
+
},
|
|
242
|
+
"input": [
|
|
243
|
+
"text",
|
|
244
|
+
"image"
|
|
245
|
+
],
|
|
246
|
+
"cost": {
|
|
247
|
+
"input": 1,
|
|
248
|
+
"output": 2.7,
|
|
249
|
+
"cacheRead": 0.1,
|
|
250
|
+
"cacheWrite": 0
|
|
251
|
+
},
|
|
252
|
+
"contextWindow": 1000000,
|
|
253
|
+
"maxTokens": 65536
|
|
254
|
+
},
|
|
227
255
|
{
|
|
228
256
|
"id": "longcat-2.0",
|
|
229
257
|
"name": "LongCat-2.0",
|
|
@@ -266,7 +294,7 @@
|
|
|
266
294
|
"cacheRead": 0,
|
|
267
295
|
"cacheWrite": 0
|
|
268
296
|
},
|
|
269
|
-
"contextWindow":
|
|
297
|
+
"contextWindow": 1048576,
|
|
270
298
|
"maxTokens": 131072
|
|
271
299
|
},
|
|
272
300
|
{
|
|
@@ -297,24 +325,6 @@
|
|
|
297
325
|
"contextWindow": 1048576,
|
|
298
326
|
"maxTokens": 524288
|
|
299
327
|
},
|
|
300
|
-
{
|
|
301
|
-
"id": "minimax-m2.7",
|
|
302
|
-
"name": "MiniMax-M2.7",
|
|
303
|
-
"api": "anthropic-messages",
|
|
304
|
-
"baseUrl": "https://opencode.ai/zen/go",
|
|
305
|
-
"reasoning": true,
|
|
306
|
-
"input": [
|
|
307
|
-
"text"
|
|
308
|
-
],
|
|
309
|
-
"cost": {
|
|
310
|
-
"input": 0.3,
|
|
311
|
-
"output": 1.2,
|
|
312
|
-
"cacheRead": 0.06,
|
|
313
|
-
"cacheWrite": 0.375
|
|
314
|
-
},
|
|
315
|
-
"contextWindow": 204800,
|
|
316
|
-
"maxTokens": 131072
|
|
317
|
-
},
|
|
318
328
|
{
|
|
319
329
|
"id": "mimo-v2.5-pro",
|
|
320
330
|
"name": "MiMo V2.5 Pro",
|
|
@@ -647,34 +657,6 @@
|
|
|
647
657
|
"contextWindow": 1048576,
|
|
648
658
|
"maxTokens": 131072
|
|
649
659
|
},
|
|
650
|
-
{
|
|
651
|
-
"id": "step-5-preview-free",
|
|
652
|
-
"name": "Step 5 Preview Free",
|
|
653
|
-
"api": "openai-completions",
|
|
654
|
-
"baseUrl": "https://opencode.ai/zen/go/v1",
|
|
655
|
-
"reasoning": true,
|
|
656
|
-
"thinkingLevelMap": {
|
|
657
|
-
"off": null,
|
|
658
|
-
"minimal": null,
|
|
659
|
-
"low": "low",
|
|
660
|
-
"medium": "medium",
|
|
661
|
-
"high": "high",
|
|
662
|
-
"xhigh": null,
|
|
663
|
-
"max": null
|
|
664
|
-
},
|
|
665
|
-
"input": [
|
|
666
|
-
"text",
|
|
667
|
-
"image"
|
|
668
|
-
],
|
|
669
|
-
"cost": {
|
|
670
|
-
"input": 0,
|
|
671
|
-
"output": 0,
|
|
672
|
-
"cacheRead": 0,
|
|
673
|
-
"cacheWrite": 0
|
|
674
|
-
},
|
|
675
|
-
"contextWindow": 1000000,
|
|
676
|
-
"maxTokens": 65536
|
|
677
|
-
},
|
|
678
660
|
{
|
|
679
661
|
"id": "glm-5.3",
|
|
680
662
|
"name": "GLM-5.3",
|
|
@@ -721,34 +703,6 @@
|
|
|
721
703
|
"contextWindow": 262144,
|
|
722
704
|
"maxTokens": 262144
|
|
723
705
|
},
|
|
724
|
-
{
|
|
725
|
-
"id": "grok-4.6",
|
|
726
|
-
"name": "Grok 4.6",
|
|
727
|
-
"api": "openai-completions",
|
|
728
|
-
"baseUrl": "https://opencode.ai/zen/go/v1",
|
|
729
|
-
"reasoning": true,
|
|
730
|
-
"thinkingLevelMap": {
|
|
731
|
-
"off": null,
|
|
732
|
-
"minimal": null,
|
|
733
|
-
"low": "low",
|
|
734
|
-
"medium": "medium",
|
|
735
|
-
"high": "high",
|
|
736
|
-
"xhigh": "xhigh",
|
|
737
|
-
"max": null
|
|
738
|
-
},
|
|
739
|
-
"input": [
|
|
740
|
-
"text",
|
|
741
|
-
"image"
|
|
742
|
-
],
|
|
743
|
-
"cost": {
|
|
744
|
-
"input": 2,
|
|
745
|
-
"output": 6,
|
|
746
|
-
"cacheRead": 0.5,
|
|
747
|
-
"cacheWrite": 0
|
|
748
|
-
},
|
|
749
|
-
"contextWindow": 500000,
|
|
750
|
-
"maxTokens": 500000
|
|
751
|
-
},
|
|
752
706
|
{
|
|
753
707
|
"id": "qwen3.7-plus",
|
|
754
708
|
"name": "Qwen3.7 Plus",
|
package/package.json
CHANGED