@diegopetrucci/pi-oracle 0.1.5 → 0.1.7

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.
Files changed (3) hide show
  1. package/README.md +3 -3
  2. package/index.ts +154 -21
  3. package/package.json +5 -3
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![oracle preview](https://raw.githubusercontent.com/diegopetrucci/pi-extensions/main/assets/oracle-preview.svg)
4
4
 
5
- An Amp-style oracle for [pi](https://github.com/badlogic/pi-mono).
5
+ An Amp-style oracle for [pi](https://github.com/earendil-works/pi-mono).
6
6
 
7
7
  It adds an `oracle` tool that spins up a separate read-only pi subprocess and sends it to the strongest reasoning model available on the **same provider/subscription** the user is currently using.
8
8
 
@@ -27,7 +27,7 @@ By default, the extension:
27
27
  4. tries a provider-specific hardcoded priority list first
28
28
  5. falls back to a heuristic that favors stronger tiers like `opus`, `pro`, newer versions, and penalizes `mini`, `flash`, `haiku`, `spark`, etc.
29
29
 
30
- The hardcoded rankings now cover pi's built-in provider set, including OpenAI/Codex, Anthropic, Google variants, GitHub Copilot, Bedrock, Azure OpenAI Responses, Groq, Hugging Face, Kimi, MiniMax, Mistral, OpenCode, OpenRouter, Vercel AI Gateway, xAI, ZAI, and Cerebras.
30
+ The hardcoded rankings now cover pi's built-in provider set, including OpenAI/Codex, Anthropic, Google variants, GitHub Copilot, Bedrock, Azure OpenAI Responses, Cloudflare, DeepSeek, Fireworks, Groq, Hugging Face, Kimi/Moonshot, MiniMax, Mistral, OpenCode, OpenRouter, Vercel AI Gateway, xAI, ZAI, and Cerebras.
31
31
 
32
32
  If no reasoning model exists on the current provider, it falls back to the best available model on that provider.
33
33
 
@@ -43,7 +43,7 @@ Use `/oracle-model` inside pi to see what it would pick right now.
43
43
 
44
44
  See also:
45
45
  - [Oracle provider matrix](../../docs/oracle-provider-matrix.md)
46
- - [v0.1.5 release notes](../../docs/release-notes-v0.1.5.md)
46
+ - [v0.1.12 release notes](../../docs/release-notes-v0.1.12.md)
47
47
 
48
48
  ## Install
49
49
 
package/index.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { existsSync } from "node:fs";
3
3
  import { basename } from "node:path";
4
- import { StringEnum } from "@mariozechner/pi-ai";
5
- import { getMarkdownTheme, type ExtensionAPI } from "@mariozechner/pi-coding-agent";
6
- import { Container, Markdown, Spacer, Text } from "@mariozechner/pi-tui";
7
- import { Type } from "@sinclair/typebox";
4
+ import { StringEnum } from "@earendil-works/pi-ai";
5
+ import { getMarkdownTheme, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
6
+ import { Container, Markdown, Spacer, Text } from "@earendil-works/pi-tui";
7
+ import { Type } from "typebox";
8
8
 
9
9
  type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
10
10
 
@@ -72,11 +72,16 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
72
72
  "claude-sonnet-4-6",
73
73
  "claude-sonnet-4-5",
74
74
  "claude-sonnet-4",
75
+ "deepseek.v3.2",
75
76
  "deepseek.r1",
76
77
  "kimi-k2.5",
78
+ "minimax-m2.5",
77
79
  "minimax-m2.1",
80
+ "zai.glm-5",
78
81
  ],
79
82
  anthropic: [
83
+ "claude-opus-4-7",
84
+ "claude-opus-4.7",
80
85
  "claude-opus-4-6",
81
86
  "claude-opus-4.6",
82
87
  "claude-opus-4-5",
@@ -94,8 +99,13 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
94
99
  "claude-3-7-sonnet",
95
100
  ],
96
101
  "azure-openai-responses": [
102
+ "gpt-5.5-pro",
103
+ "gpt-5.5",
97
104
  "gpt-5.4-pro",
105
+ "gpt-5.4",
106
+ "gpt-5.3-codex",
98
107
  "gpt-5-pro",
108
+ "gpt-5.2-pro",
99
109
  "gpt-5.2",
100
110
  "gpt-5.2-codex",
101
111
  "gpt-5.1-codex-max",
@@ -106,20 +116,53 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
106
116
  "gpt-5.4-mini",
107
117
  "gpt-5-mini",
108
118
  ],
109
- cerebras: ["zai-glm-4.7", "llama3.1-8b"],
119
+ cerebras: ["gpt-oss-120b", "zai-glm-4.7", "llama3.1-8b"],
120
+ "cloudflare-ai-gateway": [
121
+ "claude-opus-4-7",
122
+ "claude-opus-4-6",
123
+ "claude-opus-4-5",
124
+ "gpt-5.5",
125
+ "gpt-5.4",
126
+ "gpt-5.3-codex",
127
+ "workers-ai/@cf/moonshotai/kimi-k2.6",
128
+ "workers-ai/@cf/nvidia/nemotron-3-120b-a12b",
129
+ "workers-ai/@cf/zai-org/glm-4.7-flash",
130
+ ],
131
+ "cloudflare-workers-ai": [
132
+ "@cf/moonshotai/kimi-k2.6",
133
+ "@cf/nvidia/nemotron-3-120b-a12b",
134
+ "@cf/moonshotai/kimi-k2.5",
135
+ "@cf/openai/gpt-oss-120b",
136
+ "@cf/zai-org/glm-4.7-flash",
137
+ ],
138
+ deepseek: ["deepseek-v4-pro", "deepseek-v4-flash"],
139
+ fireworks: [
140
+ "accounts/fireworks/models/deepseek-v4-pro",
141
+ "accounts/fireworks/models/kimi-k2p6",
142
+ "accounts/fireworks/models/glm-5p1",
143
+ "accounts/fireworks/models/minimax-m2p7",
144
+ "accounts/fireworks/models/qwen3p6-plus",
145
+ "accounts/fireworks/models/gpt-oss-120b",
146
+ ],
110
147
  "github-copilot": [
111
148
  "claude-opus-4.7",
149
+ "claude-opus-4.6",
112
150
  "claude-opus-4.5",
151
+ "gpt-5.5",
152
+ "gpt-5.4",
153
+ "gpt-5.3-codex",
113
154
  "gpt-5.2",
114
155
  "gpt-5.1-codex-max",
115
156
  "gpt-5.1",
116
157
  "gpt-5",
117
- "gpt-5.3-codex",
158
+ "gemini-3.1-pro-preview",
118
159
  "gemini-3-pro-preview",
160
+ "claude-sonnet-4.6",
119
161
  "claude-sonnet-4.5",
120
162
  "gemini-2.5-pro",
121
163
  ],
122
164
  google: [
165
+ "gemini-3.1-pro-preview-customtools",
123
166
  "gemini-3.1-pro-preview",
124
167
  "gemini-3-pro-preview",
125
168
  "gemini-2.5-pro-preview",
@@ -128,16 +171,9 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
128
171
  "gemini-2.5-flash-lite-preview",
129
172
  "gemini-2.5-flash-lite",
130
173
  ],
131
- "google-antigravity": [
132
- "claude-opus-4-6-thinking",
133
- "claude-sonnet-4-5-thinking",
134
- "gemini-3.1-pro-low",
135
- "gemini-3-flash",
136
- "gemini-2.0-flash",
137
- ],
138
- "google-gemini-cli": ["gemini-3-pro-preview", "gemini-2.5-pro", "gemini-1.5-flash"],
139
174
  "google-vertex": [
140
175
  "gemini-3.1-pro-preview-customtools",
176
+ "gemini-3.1-pro-preview",
141
177
  "gemini-3-pro-preview",
142
178
  "gemini-2.5-pro",
143
179
  "gemini-2.5-flash-lite",
@@ -152,16 +188,23 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
152
188
  ],
153
189
  huggingface: [
154
190
  "zai-org/GLM-5.1",
191
+ "deepseek-ai/DeepSeek-V4-Pro",
192
+ "moonshotai/Kimi-K2.6",
193
+ "MiniMaxAI/MiniMax-M2.7",
194
+ "Qwen/Qwen3.5-397B-A17B",
155
195
  "Qwen/Qwen3-235B-A22B-Thinking-2507",
156
196
  "moonshotai/Kimi-K2.5",
157
197
  "deepseek-ai/DeepSeek-V3.2",
158
198
  "MiniMaxAI/MiniMax-M2.5",
159
199
  "Qwen/Qwen3-Coder-Next",
160
200
  ],
161
- "kimi-coding": ["kimi-k2-thinking"],
162
- minimax: ["MiniMax-M2.7-highspeed"],
163
- "minimax-cn": ["MiniMax-M2.7-highspeed"],
201
+ "kimi-coding": ["k2p6", "kimi-k2-thinking", "kimi-for-coding"],
202
+ minimax: ["MiniMax-M2.7-highspeed", "MiniMax-M2.7"],
203
+ "minimax-cn": ["MiniMax-M2.7-highspeed", "MiniMax-M2.7"],
164
204
  mistral: [
205
+ "mistral-medium-2604",
206
+ "mistral-medium-3.5",
207
+ "mistral-medium-latest",
165
208
  "magistral-medium-latest",
166
209
  "devstral-medium-latest",
167
210
  "mistral-large-latest",
@@ -171,8 +214,13 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
171
214
  "devstral-2512",
172
215
  ],
173
216
  openai: [
217
+ "gpt-5.5-pro",
218
+ "gpt-5.5",
174
219
  "gpt-5.4-pro",
220
+ "gpt-5.4",
221
+ "gpt-5.3-codex",
175
222
  "gpt-5-pro",
223
+ "gpt-5.2-pro",
176
224
  "gpt-5.2",
177
225
  "gpt-5.2-codex",
178
226
  "gpt-5.1-codex-max",
@@ -184,6 +232,7 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
184
232
  "gpt-5-mini",
185
233
  ],
186
234
  "openai-codex": [
235
+ "gpt-5.5",
187
236
  "gpt-5.4",
188
237
  "gpt-5.3-codex",
189
238
  "gpt-5.2",
@@ -193,42 +242,126 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
193
242
  "big-pickle",
194
243
  ],
195
244
  opencode: [
245
+ "gpt-5.5-pro",
246
+ "gpt-5.5",
247
+ "gpt-5.4-pro",
196
248
  "gpt-5.4",
197
249
  "claude-opus-4-7",
250
+ "claude-opus-4-6",
198
251
  "claude-opus-4-5",
252
+ "gpt-5.3-codex",
199
253
  "gpt-5.2-codex",
200
254
  "gpt-5.1-codex",
255
+ "gemini-3.1-pro",
256
+ "glm-5.1",
201
257
  "glm-5",
258
+ "kimi-k2.6",
202
259
  "kimi-k2.5",
260
+ "qwen3.6-plus",
203
261
  "qwen3.5-plus",
262
+ "minimax-m2.7",
204
263
  "minimax-m2.5-free",
205
264
  ],
206
- "opencode-go": ["qwen3.6-plus", "minimax-m2.7", "mimo-v2-pro", "kimi-k2.5"],
265
+ "opencode-go": [
266
+ "deepseek-v4-pro",
267
+ "glm-5.1",
268
+ "qwen3.6-plus",
269
+ "mimo-v2.5-pro",
270
+ "mimo-v2-pro",
271
+ "minimax-m2.7",
272
+ "kimi-k2.6",
273
+ "kimi-k2.5",
274
+ ],
207
275
  openrouter: [
276
+ "anthropic/claude-opus-4.7",
208
277
  "anthropic/claude-opus-4.6-fast",
278
+ "anthropic/claude-opus-4.6",
209
279
  "anthropic/claude-opus-4.5",
210
280
  "anthropic/claude-opus-4",
281
+ "openai/gpt-5.5-pro",
282
+ "openai/gpt-5.5",
283
+ "openai/gpt-5.4-pro",
284
+ "openai/gpt-5.4",
211
285
  "google/gemini-3.1-pro-preview-customtools",
286
+ "google/gemini-3.1-pro-preview",
212
287
  "google/gemini-2.5-pro",
288
+ "moonshotai/kimi-k2.6",
213
289
  "moonshotai/kimi-k2-thinking",
290
+ "deepseek/deepseek-v4-pro",
214
291
  "deepseek/deepseek-r1",
215
292
  "deepseek/deepseek-v3.2",
293
+ "minimax/minimax-m2.7",
216
294
  "minimax/minimax-m2.1",
295
+ "z-ai/glm-5.1",
217
296
  ],
218
297
  "vercel-ai-gateway": [
298
+ "anthropic/claude-opus-4.7",
219
299
  "anthropic/claude-opus-4.6",
300
+ "anthropic/claude-opus-4.5",
220
301
  "anthropic/claude-opus-4.1",
221
302
  "anthropic/claude-sonnet-4.6",
303
+ "openai/gpt-5.5-pro",
304
+ "openai/gpt-5.5",
305
+ "openai/gpt-5.4-pro",
306
+ "openai/gpt-5.4",
222
307
  "openai/gpt-5.1-codex",
223
308
  "openai/gpt-5-codex",
309
+ "moonshotai/kimi-k2.6",
224
310
  "moonshotai/kimi-k2-thinking",
311
+ "deepseek/deepseek-v4-pro",
225
312
  "deepseek/deepseek-v3.2-thinking",
313
+ "alibaba/qwen3.5-plus",
226
314
  "alibaba/qwen3-max-thinking",
315
+ "google/gemini-3.1-pro-preview",
227
316
  "google/gemini-3-flash",
317
+ "xai/grok-4.3",
318
+ "zai/glm-5.1",
319
+ ],
320
+ xai: [
321
+ "grok-4.3",
322
+ "grok-4.20-0309-reasoning",
323
+ "grok-4-1-fast",
324
+ "grok-4-fast",
325
+ "grok-4",
326
+ "grok-3-mini-latest",
327
+ "grok-3-mini-fast",
328
+ "grok-3-latest",
329
+ ],
330
+ xiaomi: ["mimo-v2.5-pro", "mimo-v2.5", "mimo-v2-pro", "mimo-v2-omni", "mimo-v2-flash"],
331
+ "xiaomi-token-plan-ams": [
332
+ "mimo-v2.5-pro",
333
+ "mimo-v2.5",
334
+ "mimo-v2-pro",
335
+ "mimo-v2-omni",
336
+ "mimo-v2-flash",
337
+ ],
338
+ "xiaomi-token-plan-cn": [
339
+ "mimo-v2.5-pro",
340
+ "mimo-v2.5",
341
+ "mimo-v2-pro",
342
+ "mimo-v2-omni",
343
+ "mimo-v2-flash",
344
+ ],
345
+ "xiaomi-token-plan-sgp": [
346
+ "mimo-v2.5-pro",
347
+ "mimo-v2.5",
348
+ "mimo-v2-pro",
349
+ "mimo-v2-omni",
350
+ "mimo-v2-flash",
351
+ ],
352
+ zai: [
353
+ "glm-5.1",
354
+ "glm-5-turbo",
355
+ "glm-5v-turbo",
356
+ "glm-5",
357
+ "glm-4.7",
358
+ "glm-4.7-flash",
359
+ "glm-4.6v",
360
+ "glm-4.5v",
361
+ "glm-4.5-air",
228
362
  ],
229
- xai: ["grok-4-1-fast", "grok-4-fast", "grok-3-mini-latest", "grok-3-mini-fast", "grok-3-latest"],
230
- zai: ["glm-5.1", "glm-5", "glm-4.7-flash", "glm-4.6v", "glm-4.5v", "glm-4.5-air"],
231
- "gemini-cli": ["gemini-3-pro-preview", "gemini-2.5-pro", "gemini-1.5-flash"],
363
+ moonshotai: ["kimi-k2.6", "kimi-k2-thinking-turbo", "kimi-k2-thinking", "kimi-k2.5"],
364
+ "moonshotai-cn": ["kimi-k2.6", "kimi-k2-thinking-turbo", "kimi-k2-thinking", "kimi-k2.5"],
232
365
  };
233
366
 
234
367
  const ORACLE_SYSTEM_PROMPT = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegopetrucci/pi-oracle",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "An Amp-style oracle extension for pi that consults the strongest reasoning model on your current provider.",
5
5
  "keywords": ["pi-package", "pi", "oracle", "reasoning", "subagent"],
6
6
  "license": "MIT",
@@ -23,7 +23,9 @@
23
23
  "image": "https://raw.githubusercontent.com/diegopetrucci/pi-extensions/main/assets/oracle-preview.svg"
24
24
  },
25
25
  "peerDependencies": {
26
- "@mariozechner/pi-coding-agent": "*",
27
- "@mariozechner/pi-tui": "*"
26
+ "@earendil-works/pi-ai": "*",
27
+ "@earendil-works/pi-coding-agent": "*",
28
+ "@earendil-works/pi-tui": "*",
29
+ "typebox": "*"
28
30
  }
29
31
  }