@monotykamary/pi-opencode-provider 1.0.8 → 1.0.10

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 CHANGED
@@ -15,7 +15,7 @@ _GPT, Claude, Gemini, GLM, MiniMax, Kimi, DeepSeek — unified API for [pi](http
15
15
 
16
16
  ## Features
17
17
 
18
- - **62+ AI Models** including GPT-5.x Codex, Claude Opus/Sonnet/Haiku, Gemini 3.x, GLM, MiniMax, Kimi K2.5, and more
18
+ - **64+ AI Models** including GPT-5.x Codex, Claude Opus/Sonnet/Haiku, Gemini 3.x, GLM, MiniMax, Kimi K2.5, and more
19
19
  - **Multi-API Support** — uses the correct API protocol per model (Anthropic, OpenAI Responses, OpenAI Completions, Gemini)
20
20
  - **Cost Tracking** with per-model pricing for budget management
21
21
  - **Reasoning Models** with thinking level maps for proper effort control
@@ -74,7 +74,7 @@ pi
74
74
 
75
75
  | Model | API | Type | Context | Max Tokens | Input Cost | Output Cost |
76
76
  |-------|-----|------|---------|------------|------------|-------------|
77
- | Big Pickle | Completions | Text | 200K | 32K | Free | Free |
77
+ | Big Pickle | Completions | Text | 200K | 32K | | |
78
78
  | Claude Fable 5 | Anthropic | Text + Image | 1.0M | 128K | $10.00 | $50.00 |
79
79
  | Claude Haiku 4.5 | Anthropic | Text + Image | 200K | 64K | $1.00 | $5.00 |
80
80
  | Claude Opus 4.5 | Anthropic | Text + Image | 200K | 64K | $5.00 | $25.00 |
@@ -87,7 +87,7 @@ pi
87
87
  | Claude Sonnet 4.6 | Anthropic | Text + Image | 1.0M | 64K | $3.00 | $15.00 |
88
88
  | Claude Sonnet 5 | Anthropic | Text + Image | 1.0M | 128K | $2.00 | $10.00 |
89
89
  | DeepSeek V4 Flash | Completions | Text | 1.0M | 384K | $0.14 | $0.28 |
90
- | DeepSeek V4 Flash Free | Completions | Text | 200K | 128K | Free | Free |
90
+ | DeepSeek V4 Flash Free | Completions | Text | 200K | 128K | | |
91
91
  | DeepSeek V4 Pro | Completions | Text | 1.0M | 384K | $1.74 | $3.84 |
92
92
  | Gemini 3 Flash | Gemini | Text + Image | 1.0M | 66K | $0.50 | $3.00 |
93
93
  | Gemini 3 Pro | Gemini | Text + Image | 1.0M | 66K | $1.25 | $10.00 |
@@ -95,6 +95,7 @@ pi
95
95
  | Gemini 3.5 Flash | Gemini | Text + Image | 1.0M | 66K | $1.50 | $9.00 |
96
96
  | Gemini 3.5 Flash Lite | Gemini | Text + Image | 1.0M | 66K | $0.30 | $2.50 |
97
97
  | Gemini 3.6 Flash | Gemini | Text + Image | 1.0M | 66K | $1.50 | $7.50 |
98
+ | Gemini 3.7 Flash | Gemini | Text + Image | 1.0M | 66K | $1.50 | $7.50 |
98
99
  | GLM-5 | Completions | Text | 205K | 131K | $1.00 | $3.20 |
99
100
  | GLM-5.1 | Completions | Text | 205K | 131K | $1.40 | $4.40 |
100
101
  | GLM-5.2 | Completions | Text | 1.0M | 131K | $1.40 | $4.40 |
@@ -119,21 +120,22 @@ pi
119
120
  | GPT-5.6 Sol | Responses | Text + Image | 1.1M | 128K | $5.00 | $30.00 |
120
121
  | GPT-5.6 Terra | Responses | Text + Image | 1.1M | 128K | $2.50 | $15.00 |
121
122
  | Grok 4.5 | Responses | Text + Image | 500K | 500K | $2.00 | $6.00 |
123
+ | Grok 4.6 | Responses | Text + Image | 500K | 500K | $2.00 | $6.00 |
122
124
  | Grok Build 0.1 | Completions | Text + Image | 256K | 256K | $1.00 | $2.00 |
123
125
  | Grok Code | Completions | Text + Image | 256K | 256K | $1.00 | $2.00 |
124
- | Hy3 Free | Completions | Text | 190K | 64K | Free | Free |
126
+ | Hy3 Free | Completions | Text | 190K | 64K | | |
125
127
  | Kimi K2.5 | Completions | Text + Image | 262K | 66K | $0.60 | $3.00 |
126
128
  | Kimi K2.6 | Completions | Text + Image | 262K | 66K | $0.95 | $4.00 |
127
129
  | Kimi K2.7 Code | Completions | Text + Image | 262K | 262K | $0.95 | $4.00 |
128
130
  | Kimi K3 | Completions | Text + Image | 1.0M | 131K | $3.00 | $15.00 |
129
- | Laguna S 2.1 Free | Completions | Text | 256K | 32K | Free | Free |
130
- | Ling-3.0-tiny Free | Completions | Text | 262K | 33K | Free | Free |
131
- | MiMo V2.5 Free | Completions | Text + Image | 200K | 32K | Free | Free |
131
+ | Laguna S 2.1 Free | Completions | Text | 256K | 32K | | |
132
+ | MiMo V2.5 Free | Completions | Text + Image | 200K | 32K | | |
132
133
  | MiniMax-M2.5 | Completions | Text | 205K | 131K | $0.30 | $1.20 |
133
134
  | MiniMax-M2.7 | Completions | Text | 205K | 131K | $0.30 | $1.20 |
134
135
  | MiniMax-M3 | Completions | Text + Image | 512K | 128K | $0.30 | $1.20 |
135
- | Nemotron 3 Ultra Free | Completions | Text | 1.0M | 128K | Free | Free |
136
- | Nemotron 3.5 Lightning Free | Completions | Text | 262K | 262K | Free | Free |
136
+ | Muse Spark 1.2 | Responses | Text + Image | 1.0M | 131K | $1.25 | $4.25 |
137
+ | Nemotron 3 Ultra Free | Completions | Text | 1.0M | 128K | | |
138
+ | Nemotron 3.5 Lightning Free | Completions | Text | 262K | 262K | — | — |
137
139
  | Qwen3.5 Plus | Anthropic | Text + Image | 262K | 66K | $0.20 | $1.20 |
138
140
  | Qwen3.6 Plus | Anthropic | Text + Image | 262K | 66K | $0.50 | $3.00 |
139
141
  *Costs are per million tokens. Prices subject to change - check [opencode.ai](https://opencode.ai) for current pricing.*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monotykamary/pi-opencode-provider",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Opencode provider extension for pi - Access GPT, Claude, Gemini, GLM, MiniMax, Kimi and more through the opencode.ai API",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -25,6 +25,10 @@
25
25
  "./index.ts"
26
26
  ]
27
27
  },
28
+ "files": [
29
+ "README.md",
30
+ "LICENSE"
31
+ ],
28
32
  "scripts": {
29
33
  "clean": "echo 'nothing to clean'",
30
34
  "build": "echo 'nothing to build'",
@@ -1,4 +0,0 @@
1
- github: monotykamary
2
- ko_fi: monotykamary
3
- buy_me_a_coffee: monotykamary
4
- polar: monotykamary
package/AGENTS.md DELETED
@@ -1,57 +0,0 @@
1
- # AGENTS.md
2
-
3
- ## DO NOT EDIT — Auto-generated Files
4
-
5
- The following files are **idempotent** and regenerated by `scripts/update-models.js`. Never edit them directly — your changes will be overwritten on the next model sync.
6
-
7
- | File | Why it's auto-generated |
8
- |------|------------------------|
9
- | `models.json` | Built from the provider API. `update-models.js` fetches models, preserves curated data for known IDs, and writes this file. |
10
- | `deprecated-models.json` | Graveyard for models the API delisted. update-models.js stamps them with deprecatedAt and pi keeps serving them for a 2-week grace period, then evicts them. Never edit by hand. |
11
- | `README.md` (model table) | The table under `## Available Models` is replaced in-place by `update-models.js` after merging base models → patch → custom models. |
12
-
13
- ## Correct Files to Edit
14
-
15
- When a model needs overrides, new properties, or corrections, edit the appropriate source file below. These are the **source of truth** that the update script reads but never writes.
16
-
17
- | File | Purpose |
18
- |------|---------|
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
- | `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. |
22
- | `scripts/update-models.js` | The sync script itself (edit only if changing how models are fetched/transformed). |
23
-
24
- ## Data Flow
25
-
26
- ```
27
- Provider API ──fetch──► models.json ──apply──► patch.json ──merge──► custom-models.json
28
- │ │ │
29
- └────────────────────────────┴──────────────────────┘
30
-
31
- README model table
32
- ```
33
-
34
- 1. `models.json` — base data from the provider API (auto-generated, DO NOT EDIT)
35
- 2. `patch.json` — overrides applied on top (EDIT THIS for corrections/enrichments)
36
- 3. `custom-models.json` — additional models not in the API (EDIT THIS for new models)
37
- 4. README table — rendered from the merged result of all three (auto-generated, DO NOT EDIT)
38
-
39
- ## Common Tasks
40
-
41
- ### Add a compat setting or override pricing for an existing model
42
- → Edit `patch.json`. Add an entry keyed by the model's `id`.
43
-
44
- ### Add a model not available in the provider API
45
- → Edit `custom-models.json`. Add a full model object to the array.
46
-
47
- ### Update models from the provider API
48
- → Run `node scripts/update-models.js` (may require an API key env var).
49
-
50
- ### Regenerate the README model table
51
- → Run `node scripts/update-models.js` — it updates both `models.json` and the README table.
52
-
53
- ## TL;DR
54
-
55
- - **Never edit `models.json`** — edit `patch.json` instead.
56
- - **Never edit the README model table** — run the update script instead.
57
- - `patch.json` and `custom-models.json` are the source files you should modify.
@@ -1,24 +0,0 @@
1
- [
2
- {
3
- "id": "gemini-3-pro",
4
- "name": "Gemini 3 Pro",
5
- "api": "google-generative-ai",
6
- "baseUrl": "https://opencode.ai/zen/v1",
7
- "reasoning": true,
8
- "input": ["text", "image"],
9
- "cost": { "input": 1.25, "output": 10, "cacheRead": 0.125, "cacheWrite": 0 },
10
- "contextWindow": 1048576,
11
- "maxTokens": 65536
12
- },
13
- {
14
- "id": "grok-code",
15
- "name": "Grok Code",
16
- "api": "openai-completions",
17
- "baseUrl": "https://opencode.ai/zen/v1",
18
- "reasoning": true,
19
- "input": ["text", "image"],
20
- "cost": { "input": 1, "output": 2, "cacheRead": 0.2, "cacheWrite": 0 },
21
- "contextWindow": 256000,
22
- "maxTokens": 256000
23
- }
24
- ]
@@ -1,79 +0,0 @@
1
- {
2
- "claude-opus-4-1": {
3
- "id": "claude-opus-4-1",
4
- "name": "Claude Opus 4.1",
5
- "api": "anthropic-messages",
6
- "baseUrl": "https://opencode.ai/zen",
7
- "reasoning": true,
8
- "input": [
9
- "text",
10
- "image"
11
- ],
12
- "cost": {
13
- "input": 15,
14
- "output": 75,
15
- "cacheRead": 1.5,
16
- "cacheWrite": 18.75
17
- },
18
- "contextWindow": 200000,
19
- "maxTokens": 32000,
20
- "deprecatedAt": "2026-08-07T02:00:18.924Z"
21
- },
22
- "ling-3.0-flash-free": {
23
- "id": "ling-3.0-flash-free",
24
- "name": "Ling-3.0-flash Free",
25
- "api": "openai-completions",
26
- "baseUrl": "https://opencode.ai/zen/v1",
27
- "reasoning": true,
28
- "input": [
29
- "text"
30
- ],
31
- "cost": {
32
- "input": 0,
33
- "output": 0,
34
- "cacheRead": 0,
35
- "cacheWrite": 0
36
- },
37
- "contextWindow": 262144,
38
- "maxTokens": 32768,
39
- "deprecatedAt": "2026-08-08T02:00:18.268Z"
40
- },
41
- "north-mini-code-free": {
42
- "id": "north-mini-code-free",
43
- "name": "North Mini Code Free",
44
- "api": "openai-completions",
45
- "baseUrl": "https://opencode.ai/zen/v1",
46
- "reasoning": true,
47
- "input": [
48
- "text"
49
- ],
50
- "cost": {
51
- "input": 0,
52
- "output": 0,
53
- "cacheRead": 0,
54
- "cacheWrite": 0
55
- },
56
- "contextWindow": 256000,
57
- "maxTokens": 64000,
58
- "deprecatedAt": "2026-08-12T02:00:24.970Z"
59
- },
60
- "longcat-2.0-free": {
61
- "id": "longcat-2.0-free",
62
- "name": "LongCat-2.0 Free",
63
- "api": "openai-completions",
64
- "baseUrl": "https://opencode.ai/zen/v1",
65
- "reasoning": true,
66
- "input": [
67
- "text"
68
- ],
69
- "cost": {
70
- "input": 0,
71
- "output": 0,
72
- "cacheRead": 0,
73
- "cacheWrite": 0
74
- },
75
- "contextWindow": 1000000,
76
- "maxTokens": 131072,
77
- "deprecatedAt": "2026-08-12T06:38:24.559Z"
78
- }
79
- }