@monotykamary/pi-opencode-provider 1.0.10 → 1.0.12

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,4 @@
1
+ github: monotykamary
2
+ ko_fi: monotykamary
3
+ buy_me_a_coffee: monotykamary
4
+ polar: monotykamary
package/AGENTS.md ADDED
@@ -0,0 +1,57 @@
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.
package/README.md CHANGED
@@ -87,7 +87,6 @@ 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 | — | — |
91
90
  | DeepSeek V4 Pro | Completions | Text | 1.0M | 384K | $1.74 | $3.84 |
92
91
  | Gemini 3 Flash | Gemini | Text + Image | 1.0M | 66K | $0.50 | $3.00 |
93
92
  | Gemini 3 Pro | Gemini | Text + Image | 1.0M | 66K | $1.25 | $10.00 |
@@ -117,7 +116,7 @@ pi
117
116
  | GPT-5.5 | Responses | Text + Image | 1.1M | 128K | $5.00 | $30.00 |
118
117
  | GPT-5.5 Pro | Responses | Text + Image | 1.1M | 128K | $30.00 | $180.00 |
119
118
  | GPT-5.6 Luna | Responses | Text + Image | 1.1M | 128K | $0.20 | $1.20 |
120
- | GPT-5.6 Sol | Responses | Text + Image | 1.1M | 128K | $5.00 | $30.00 |
119
+ | GPT-5.6 Sol (50% Off) | Responses | Text + Image | 1.1M | 128K | $2.50 | $15.00 |
121
120
  | GPT-5.6 Terra | Responses | Text + Image | 1.1M | 128K | $2.50 | $15.00 |
122
121
  | Grok 4.5 | Responses | Text + Image | 500K | 500K | $2.00 | $6.00 |
123
122
  | Grok 4.6 | Responses | Text + Image | 500K | 500K | $2.00 | $6.00 |
@@ -128,14 +127,15 @@ pi
128
127
  | Kimi K2.6 | Completions | Text + Image | 262K | 66K | $0.95 | $4.00 |
129
128
  | Kimi K2.7 Code | Completions | Text + Image | 262K | 262K | $0.95 | $4.00 |
130
129
  | Kimi K3 | Completions | Text + Image | 1.0M | 131K | $3.00 | $15.00 |
131
- | Laguna S 2.1 Free | Completions | Text | 256K | 32K | — | — |
132
130
  | MiMo V2.5 Free | Completions | Text + Image | 200K | 32K | — | — |
133
131
  | MiniMax-M2.5 | Completions | Text | 205K | 131K | $0.30 | $1.20 |
134
132
  | MiniMax-M2.7 | Completions | Text | 205K | 131K | $0.30 | $1.20 |
135
133
  | MiniMax-M3 | Completions | Text + Image | 512K | 128K | $0.30 | $1.20 |
136
134
  | Muse Spark 1.2 | Responses | Text + Image | 1.0M | 131K | $1.25 | $4.25 |
135
+ | Muse Spark 1.2 Free | Responses | Text + Image | 1.0M | 131K | — | — |
137
136
  | Nemotron 3 Ultra Free | Completions | Text | 1.0M | 128K | — | — |
138
137
  | Nemotron 3.5 Lightning Free | Completions | Text | 262K | 262K | — | — |
138
+ | Ox Alpha Free (Unlimited) | Completions | Text + Image | 1.0M | 131K | — | — |
139
139
  | Qwen3.5 Plus | Anthropic | Text + Image | 262K | 66K | $0.20 | $1.20 |
140
140
  | Qwen3.6 Plus | Anthropic | Text + Image | 262K | 66K | $0.50 | $3.00 |
141
141
  *Costs are per million tokens. Prices subject to change - check [opencode.ai](https://opencode.ai) for current pricing.*
@@ -0,0 +1,24 @@
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
+ ]
@@ -0,0 +1,116 @@
1
+ {
2
+ "ling-3.0-flash-free": {
3
+ "id": "ling-3.0-flash-free",
4
+ "name": "Ling-3.0-flash Free",
5
+ "api": "openai-completions",
6
+ "baseUrl": "https://opencode.ai/zen/v1",
7
+ "reasoning": true,
8
+ "input": [
9
+ "text"
10
+ ],
11
+ "cost": {
12
+ "input": 0,
13
+ "output": 0,
14
+ "cacheRead": 0,
15
+ "cacheWrite": 0
16
+ },
17
+ "contextWindow": 262144,
18
+ "maxTokens": 32768,
19
+ "deprecatedAt": "2026-08-08T02:00:18.268Z"
20
+ },
21
+ "north-mini-code-free": {
22
+ "id": "north-mini-code-free",
23
+ "name": "North Mini Code Free",
24
+ "api": "openai-completions",
25
+ "baseUrl": "https://opencode.ai/zen/v1",
26
+ "reasoning": true,
27
+ "input": [
28
+ "text"
29
+ ],
30
+ "cost": {
31
+ "input": 0,
32
+ "output": 0,
33
+ "cacheRead": 0,
34
+ "cacheWrite": 0
35
+ },
36
+ "contextWindow": 256000,
37
+ "maxTokens": 64000,
38
+ "deprecatedAt": "2026-08-12T02:00:24.970Z"
39
+ },
40
+ "longcat-2.0-free": {
41
+ "id": "longcat-2.0-free",
42
+ "name": "LongCat-2.0 Free",
43
+ "api": "openai-completions",
44
+ "baseUrl": "https://opencode.ai/zen/v1",
45
+ "reasoning": true,
46
+ "input": [
47
+ "text"
48
+ ],
49
+ "cost": {
50
+ "input": 0,
51
+ "output": 0,
52
+ "cacheRead": 0,
53
+ "cacheWrite": 0
54
+ },
55
+ "contextWindow": 1000000,
56
+ "maxTokens": 131072,
57
+ "deprecatedAt": "2026-08-12T06:38:24.559Z"
58
+ },
59
+ "ling-3.0-tiny-free": {
60
+ "id": "ling-3.0-tiny-free",
61
+ "name": "Ling-3.0-tiny Free",
62
+ "api": "openai-completions",
63
+ "baseUrl": "https://opencode.ai/zen/v1",
64
+ "reasoning": true,
65
+ "input": [
66
+ "text"
67
+ ],
68
+ "cost": {
69
+ "input": 0,
70
+ "output": 0,
71
+ "cacheRead": 0,
72
+ "cacheWrite": 0
73
+ },
74
+ "contextWindow": 262144,
75
+ "maxTokens": 32768,
76
+ "deprecatedAt": "2026-08-14T02:00:20.260Z"
77
+ },
78
+ "laguna-s-2.1-free": {
79
+ "id": "laguna-s-2.1-free",
80
+ "name": "Laguna S 2.1 Free",
81
+ "api": "openai-completions",
82
+ "baseUrl": "https://opencode.ai/zen/v1",
83
+ "reasoning": true,
84
+ "input": [
85
+ "text"
86
+ ],
87
+ "cost": {
88
+ "input": 0,
89
+ "output": 0,
90
+ "cacheRead": 0,
91
+ "cacheWrite": 0
92
+ },
93
+ "contextWindow": 256000,
94
+ "maxTokens": 32000,
95
+ "deprecatedAt": "2026-08-21T02:00:22.698Z"
96
+ },
97
+ "deepseek-v4-flash-free": {
98
+ "id": "deepseek-v4-flash-free",
99
+ "name": "DeepSeek V4 Flash Free",
100
+ "api": "openai-completions",
101
+ "baseUrl": "https://opencode.ai/zen/v1",
102
+ "reasoning": true,
103
+ "input": [
104
+ "text"
105
+ ],
106
+ "cost": {
107
+ "input": 0,
108
+ "output": 0,
109
+ "cacheRead": 0,
110
+ "cacheWrite": 0
111
+ },
112
+ "contextWindow": 200000,
113
+ "maxTokens": 128000,
114
+ "deprecatedAt": "2026-08-21T02:00:22.698Z"
115
+ }
116
+ }