@oh-my-pi/pi-catalog 18.4.4 → 18.4.6

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 (61) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/types/compat/auth-ids.d.ts +2 -2
  3. package/dist/types/compat/axes.d.ts +3 -1
  4. package/dist/types/compat/factory-droid.d.ts +65 -0
  5. package/dist/types/compat/provider-ids.d.ts +1 -1
  6. package/dist/types/compat/resolve.d.ts +8 -2
  7. package/dist/types/compat/types.d.ts +26 -1
  8. package/dist/types/discovery/cursor-proto.d.ts +284 -0
  9. package/dist/types/discovery/cursor.d.ts +12 -6
  10. package/dist/types/discovery/factory-droid.d.ts +28 -0
  11. package/dist/types/discovery/index.d.ts +1 -0
  12. package/dist/types/discovery/protobuf.d.ts +3 -3
  13. package/dist/types/model-manager.d.ts +10 -0
  14. package/dist/types/models.d.ts +5 -1
  15. package/dist/types/provider-models/cache-provider-id.d.ts +2 -1
  16. package/dist/types/provider-models/descriptor-types.d.ts +2 -1
  17. package/dist/types/provider-models/openai-compat.d.ts +21 -0
  18. package/dist/types/provider-models/special.d.ts +2 -0
  19. package/dist/types/types.d.ts +100 -3
  20. package/dist/types/wire/cursor.d.ts +20 -0
  21. package/dist/types/wire/factory-droid.d.ts +45 -0
  22. package/package.json +4 -4
  23. package/src/build.ts +21 -0
  24. package/src/compat/auth-ids.ts +4 -0
  25. package/src/compat/axes.ts +113 -2
  26. package/src/compat/cascade.ts +8 -1
  27. package/src/compat/collapse.ts +3 -0
  28. package/src/compat/factory-droid.ts +170 -0
  29. package/src/compat/provider-ids.ts +2 -0
  30. package/src/compat/resolve.ts +47 -5
  31. package/src/compat/rules/README.md +18 -8
  32. package/src/compat/rules/auth/_order.kdl +2 -2
  33. package/src/compat/rules/auth/factory-droid.kdl +28 -0
  34. package/src/compat/rules/auth/helmcode.kdl +9 -0
  35. package/src/compat/rules/classes/anthropic.kdl +195 -80
  36. package/src/compat/rules/providers/commandcode.kdl +21 -5
  37. package/src/compat/rules/providers/cursor.kdl +29 -17
  38. package/src/compat/rules/providers/factory-droid.kdl +1166 -0
  39. package/src/compat/rules/providers/helmcode.kdl +120 -0
  40. package/src/compat/rules/runtime/behavior.kdl +65 -4
  41. package/src/compat/rules/taxonomy/_collapse.kdl +36 -14
  42. package/src/compat/rules.json +1 -1
  43. package/src/compat/types.ts +27 -1
  44. package/src/discovery/cursor-models.proto +261 -0
  45. package/src/discovery/cursor-proto.ts +471 -0
  46. package/src/discovery/cursor.ts +817 -88
  47. package/src/discovery/devin.ts +1 -3
  48. package/src/discovery/factory-droid.ts +296 -0
  49. package/src/discovery/index.ts +1 -0
  50. package/src/discovery/protobuf.ts +16 -7
  51. package/src/model-manager.ts +13 -0
  52. package/src/models.json +1 -1
  53. package/src/models.ts +13 -0
  54. package/src/provider-models/cache-provider-id.ts +37 -6
  55. package/src/provider-models/descriptor-types.ts +2 -1
  56. package/src/provider-models/descriptors.ts +4 -0
  57. package/src/provider-models/openai-compat.ts +83 -17
  58. package/src/provider-models/special.ts +26 -2
  59. package/src/types.ts +112 -1
  60. package/src/wire/cursor.ts +32 -0
  61. package/src/wire/factory-droid.ts +130 -0
@@ -0,0 +1,120 @@
1
+ // Provider-wire compat for "helmcode": Helmcode is an OpenAI-compatible gateway
2
+ // for private EU inference (helmcode.com/docs). One base URL serves three
3
+ // plan-covered open-weight chat models, the per-key GLM 5.3 add-on, and nine
4
+ // resold frontier models (Claude/GPT/Gemini). Non-chat rows on `/v1/models`
5
+ // (embeddings, rerank, kokoro TTS, whisper STT) are excluded via
6
+ // runtime/behavior.kdl.
7
+
8
+ provider "helmcode" {
9
+ default-model "deepseek-v4-flash"
10
+ env "HELMCODE_API_KEY"
11
+ dynamic-models-authoritative #true
12
+ // Helmcode's own endpoint and docs are the deployment truth: same-id rows on
13
+ // other hosts carry different output ceilings and effort ladders, so the
14
+ // generator must not backfill names, limits, or capabilities from them.
15
+ // Runtime discovery still resolves resold frontier ids (Claude, GPT,
16
+ // Gemini) against the first-party vendor's bundled row for context, output
17
+ // cap, modalities, and list price; Helmcode passes that list price through
18
+ // with no markup, converted to EUR (helmcode.com/docs/models, "Frontier
19
+ // models"), so the surfaced USD cost is the vendor's rate card.
20
+ skip-cross-provider-reference-fills #true
21
+ discovery label="Helmcode"
22
+
23
+ // Bundled fallback so the provider is usable before the first authoritative
24
+ // discovery call. The open-weight chat models are flat-rate under the plan
25
+ // and GLM 5.3 is a per-key monthly add-on, so neither has a per-token price
26
+ // (surfaced as 0). Resold frontier models are priced per token in the
27
+ // console only; they arrive through runtime discovery.
28
+ seed api="openai-completions" base-url="https://api.helmcode.com/v1" bundle="fallback" {
29
+ model "deepseek-v4-flash" name="DeepSeek V4 Flash" {
30
+ reasoning #true
31
+ input "text"
32
+ cost input=0 output=0 cache-read=0 cache-write=0
33
+ limits context=1000000
34
+ }
35
+ model "qwen3.6" name="Qwen3.6" {
36
+ reasoning #true
37
+ input "text" "image"
38
+ cost input=0 output=0 cache-read=0 cache-write=0
39
+ limits context=262144
40
+ }
41
+ model "gemma4" name="Gemma 4" {
42
+ reasoning #true
43
+ input "text" "image"
44
+ cost input=0 output=0 cache-read=0 cache-write=0
45
+ limits context=262144
46
+ }
47
+ model "glm5.3" name="GLM 5.3" {
48
+ reasoning #true
49
+ input "text"
50
+ cost input=0 output=0 cache-read=0 cache-write=0
51
+ limits context=1000000
52
+ }
53
+ }
54
+
55
+ // `reasoning_effort` ladders per helmcode.com/docs/models ("Controlling
56
+ // reasoning"). Provider-scoped rather than seed-only so rows discovered at
57
+ // runtime resolve the same ladder, and no class-level host ladder (which
58
+ // sends `xhigh`, a value Helmcode does not document) applies. `/v1/models`
59
+ // carries no capability data, so a discovered id with no bundled row, no
60
+ // vendor row, and no ladder below arrives as non-reasoning.
61
+ thinking-mode "effort"
62
+ // residue: taxonomy extracts no revision from Helmcode's dotless ids.
63
+ // `minimal` through `max` only steer this adaptive model; `none` is the
64
+ // one value that skips reasoning, so thinking-off sends it.
65
+ models "deepseek-v4-flash" {
66
+ thinking-upgrade-neutral #true
67
+ thinking-efforts "minimal" "low" "medium" "high" "max"
68
+ reasoning-disable-mode "none-effort"
69
+ }
70
+ // residue: taxonomy extracts no revision from Helmcode's dotless ids.
71
+ // Helmcode serves Qwen3.6 on the OpenAI `reasoning_effort` field, not the
72
+ // Qwen class's `enable_thinking` toggle, which would drop the chosen tier.
73
+ // `none` and `minimal` both skip reasoning, so `minimal` is not a tier and
74
+ // thinking-off sends `none`. With no field both default to a 16,384 token
75
+ // budget, which is the `high` tier.
76
+ models "qwen3.6" "gemma4" {
77
+ thinking-upgrade-neutral #true
78
+ thinking-efforts "low" "medium" "high" "max"
79
+ thinking-default-level "high"
80
+ thinking-format "openai"
81
+ reasoning-disable-mode "none-effort"
82
+ }
83
+ // residue: taxonomy extracts no revision from Helmcode's dotless ids.
84
+ models "glm5.3" "glm5.3-flash" "glm5.2" {
85
+ thinking-upgrade-neutral #true
86
+ thinking-efforts "low" "medium" "high" "max"
87
+ thinking-default-level "max"
88
+ }
89
+
90
+ // The resold frontier models run on their vendors behind this same
91
+ // chat-completions surface, and Helmcode documents no `reasoning_effort`
92
+ // values for them. Keep them to the core low/medium/high tiers of that
93
+ // field so the inherited vendor ladders never send `minimal`, `xhigh`, or
94
+ // `max`, nor a vendor-native thinking shape, to this host. priority=1
95
+ // outranks the equally scoped lineage ladders in classes/*.kdl; Gemini's
96
+ // ladders are family-scoped there, so the override is too.
97
+ class "anthropic" priority=1 {
98
+ thinking-mode "effort"
99
+ thinking-efforts "low" "medium" "high"
100
+ }
101
+ // Helmcode bills cache writes only for Anthropic models; OpenAI and Google
102
+ // cache creation is free there, so the inherited OpenAI write rate is zeroed.
103
+ class "openai" priority=1 {
104
+ thinking-mode "effort"
105
+ thinking-efforts "low" "medium" "high"
106
+ cost-patch {
107
+ cache-write 0.0
108
+ }
109
+ }
110
+ class "gemini" {
111
+ family "flash" priority=1 {
112
+ thinking-mode "effort"
113
+ thinking-efforts "low" "medium" "high"
114
+ }
115
+ family "lite" priority=1 {
116
+ thinking-mode "effort"
117
+ thinking-efforts "low" "medium" "high"
118
+ }
119
+ }
120
+ }
@@ -89,6 +89,23 @@ behavior {
89
89
  fallback "spark" substring="-spark"
90
90
  fallback "chat" substring="gpt-"
91
91
  }
92
+ // Factory Droid bills each model from one subscription pool: Droid Core
93
+ // (flat rate) or Standard Credits. Unknown ids have no inferred entitlement.
94
+ quota-tiers provider="factory-droid" {
95
+ tier "core" "inkling" "mistral-medium-3.5" "glm-5.3-flash" "glm-5.3" "glm-5.2" "glm-5.2-fast" \
96
+ "kimi-k3" "qwen3.8-max" "nemotron-3-ultra" "deepseek-v4.1-flash" "deepseek-v4-flash-0731" \
97
+ "deepseek-v4-pro" "minimax-m3" "minimax-m2.7"
98
+ tier "standard" "claude-fable-5.1" "claude-fable-5" "claude-opus-5-5" "claude-opus-5-5-fast" \
99
+ "claude-opus-5" "claude-opus-5-fast" "claude-opus-4-8" "claude-opus-4-8-fast" "claude-opus-4-7" \
100
+ "claude-opus-4-6" "claude-opus-4-5-20251101" "claude-sonnet-5-5" "claude-sonnet-5" \
101
+ "claude-sonnet-4-6" "claude-sonnet-4-5-20250929" "claude-haiku-4-5-20251001" "gpt-6-astra" \
102
+ "gpt-6.1-sol" "gpt-6-sol" "gpt-6-luna" "gpt-5.6-sol" "gpt-5.6-sol-fast" "gpt-5.6-terra" \
103
+ "gpt-5.6-luna" "gpt-5.5" "gpt-5.5-fast" "gpt-5.5-pro" "gpt-5.4" "gpt-5.4-fast" "gpt-5.4-mini" \
104
+ "gpt-5.4-mini-fast" "gpt-5.3-codex" "gpt-5.3-codex-fast" "gpt-5.2" "garnet-07-15" \
105
+ "gemini-3.1-pro-preview" "gemini-3.8-flash" "gemini-3.7-flash" "gemini-3.6-flash" \
106
+ "gemini-3.5-flash" "gemini-3-flash-preview" "grok-4.7" "grok-4.6" "grok-4.5" "atlas-07-21" \
107
+ "aster-07-15"
108
+ }
92
109
  // Subscription eligibility for model-aware Codex credential routing.
93
110
  plan-requirement provider="openai-codex" {
94
111
  tier "pro" substring="-spark"
@@ -149,6 +166,9 @@ behavior {
149
166
  // Text-chat transports cannot serve StepFun's audio-only and image-editing
150
167
  // SKUs, which its /v1/models roster interleaves with the chat models.
151
168
  exclude-models provider="stepfun" prefix="stepaudio-" prefix="step-image-" prefix="step-tts-" prefix="step-2x-large"
169
+ // Helmcode's /v1/models roster lists embedding, rerank, TTS, and STT models
170
+ // beside the chat models (helmcode.com/docs/models).
171
+ exclude-models provider="helmcode" exact="qwen3-embedding" exact="rerank" exact="kokoro" exact="whisper"
152
172
  // SuperGrok's roster interleaves media models the chat picker cannot
153
173
  // serve; the dedicated tool surfaces route them instead.
154
174
  exclude-models provider="xai-oauth" exact="grok-imagine-image-quality" exact="grok-imagine-image-2.0" \
@@ -192,14 +212,31 @@ behavior {
192
212
  route "openai-responses" prefix="grok-4." prefix="gpt-5" prefix="gpt-6" prefix="oswe" prefix="mai-"
193
213
  }
194
214
  // Command Code serves Claude ids through its Anthropic-compatible Messages
195
- // endpoint, its ten GPT ids (the same set command-code@1.67.0 marks
196
- // `spec: "responses"`) through its Responses endpoint, and every other id
197
- // through chat completions.
215
+ // endpoint and everything else through chat completions or Responses
216
+ // (`supported_endpoints` on /provider/v1/models). Chat completions rejects
217
+ // `reasoning_effort: "none"` (low|medium|high|xhigh|max only), while
218
+ // Responses accepts `reasoning.effort: "none"`. Every id with a reviewed
219
+ // effort ladder that lists `/responses` therefore rides Responses, so
220
+ // thinking-off actually disables reasoning instead of clamping to the
221
+ // lowest effort. Ladder ids without `/responses` (deepseek-v4-flash-fast,
222
+ // gemini-3.7-flash, Qwen3.8-Flash, Qwen3.8-Max-0902, hy4-preview,
223
+ // space-bunny-alpha), the Qwen3.8 ids (chat already disables them through
224
+ // `enable_thinking: false`), and non-reasoning ids stay on chat completions.
198
225
  api-routes provider="commandcode" default="openai-completions" {
199
226
  route "anthropic-messages" prefix="claude-"
200
227
  route "openai-responses" exact="gpt-5.3-codex" exact="gpt-5.4" exact="gpt-5.4-mini" exact="gpt-5.5" \
201
228
  exact="gpt-5.6-luna" exact="gpt-5.6-sol" exact="gpt-5.6-terra" exact="gpt-6-astra" \
202
- exact="gpt-6-luna" exact="gpt-6-sol"
229
+ exact="gpt-6-luna" exact="gpt-6-sol" \
230
+ exact="deepseek/deepseek-v4-flash" exact="deepseek/deepseek-v4-flash-vision-exp" \
231
+ exact="deepseek/deepseek-v4-pro" exact="deepseek/deepseek-v4.1-flash" \
232
+ exact="deepseek/deepseek-v4.1-flash-fast" exact="moonshotai/Kimi-K3" \
233
+ exact="z-ai/glm-5.3-flash" exact="z-ai/glm-5.3-flashx" exact="zai-org/GLM-5.2" \
234
+ exact="zai-org/GLM-5.3" exact="google/gemini-3.1-flash-lite" exact="google/gemini-3.5-flash" \
235
+ exact="google/gemini-3.5-flash-lite" exact="google/gemini-3.6-flash" \
236
+ exact="google/gemini-3.8-flash" exact="MiniMaxAI/MiniMax-M3" exact="stepfun/Step-5-Preview" \
237
+ exact="xai/grok-4.5" exact="xai/grok-4.6" exact="xai/grok-4.7" exact="meta/muse-spark-1.1" \
238
+ exact="meta/muse-spark-1.2" exact="meta/muse-spark-1.2-contributor" exact="meta/muse-spark-1.3" \
239
+ exact="meta/muse-spark-1.3-contributor" exact="stealth/pixel-canary" exact="sakana/fugu-ultra"
203
240
  }
204
241
  // ZenMux fronts Anthropic ids on a dedicated Messages endpoint; every
205
242
  // other namespace stays on chat completions.
@@ -232,6 +269,30 @@ behavior {
232
269
  route "openai-completions" exact="minimax-m2.7" exact="minimax-m3" exact="minimax-m3-free" \
233
270
  exact="qwen3.5-plus" exact="qwen3.6-plus"
234
271
  }
272
+ // Factory Droid's proxy multiplexes four wires behind one client identity
273
+ // (packages/ai/src/providers/factory-droid.ts); `google-generate` is its
274
+ // native Gemini client. The registry names each model's wire, so every
275
+ // roster id routes exactly; unknown ids fall back to chat completions.
276
+ api-routes provider="factory-droid" default="openai-completions" {
277
+ route "anthropic-messages" exact="claude-fable-5.1" exact="claude-fable-5" exact="claude-opus-5-5" \
278
+ exact="claude-opus-5-5-fast" exact="claude-opus-5" exact="claude-opus-5-fast" \
279
+ exact="claude-opus-4-8" exact="claude-opus-4-8-fast" exact="claude-opus-4-7" \
280
+ exact="claude-opus-4-6" exact="claude-opus-4-5-20251101" exact="claude-sonnet-5-5" \
281
+ exact="claude-sonnet-5" exact="claude-sonnet-4-6" exact="claude-sonnet-4-5-20250929" \
282
+ exact="claude-haiku-4-5-20251001" exact="atlas-07-21" exact="aster-07-15" exact="minimax-m2.7"
283
+ route "openai-responses" exact="gpt-6-astra" exact="gpt-6.1-sol" exact="gpt-6-sol" exact="gpt-6-luna" \
284
+ exact="gpt-5.6-sol" exact="gpt-5.6-sol-fast" exact="gpt-5.6-terra" exact="gpt-5.6-luna" \
285
+ exact="gpt-5.5" exact="gpt-5.5-fast" exact="gpt-5.5-pro" exact="gpt-5.4" exact="gpt-5.4-fast" \
286
+ exact="gpt-5.4-mini" exact="gpt-5.4-mini-fast" exact="gpt-5.3-codex" exact="gpt-5.3-codex-fast" \
287
+ exact="gpt-5.2" exact="grok-4.7" exact="grok-4.6" exact="grok-4.5"
288
+ route "google-generate" exact="garnet-07-15" exact="gemini-3.1-pro-preview" exact="gemini-3.8-flash" \
289
+ exact="gemini-3.7-flash" exact="gemini-3.6-flash" exact="gemini-3.5-flash" \
290
+ exact="gemini-3-flash-preview"
291
+ route "openai-completions" exact="inkling" exact="mistral-medium-3.5" exact="glm-5.3-flash" \
292
+ exact="glm-5.3" exact="glm-5.2" exact="glm-5.2-fast" exact="kimi-k3" exact="qwen3.8-max" \
293
+ exact="nemotron-3-ultra" exact="deepseek-v4.1-flash" exact="deepseek-v4-flash-0731" \
294
+ exact="deepseek-v4-pro" exact="minimax-m3"
295
+ }
235
296
 
236
297
  // Copilot serves these models with tighter effective limits than its
237
298
  // /models metadata reports.
@@ -659,27 +659,49 @@ collapse {
659
659
  requires-effort #true
660
660
  default-member "cursor-grok-4.5-medium-fast"
661
661
  }
662
- variant-family "cursor" "cursor-grok-4.6" name="Grok 4.6" {
663
- members "cursor-grok-4.6-low" "cursor-grok-4.6-medium" "cursor-grok-4.6-high" "cursor-grok-4.6-xhigh"
664
- route "low" "cursor-grok-4.6-low"
665
- route "medium" "cursor-grok-4.6-medium"
666
- route "high" "cursor-grok-4.6-high"
667
- route "xhigh" "cursor-grok-4.6-xhigh"
662
+ variant-family "cursor" "cursor-grok-{rev}" name="Grok {rev}" revision=">=4.6" {
663
+ members "cursor-grok-{rev}-low" "cursor-grok-{rev}-medium" "cursor-grok-{rev}-high" "cursor-grok-{rev}-xhigh"
664
+ route "low" "cursor-grok-{rev}-low"
665
+ route "medium" "cursor-grok-{rev}-medium"
666
+ route "high" "cursor-grok-{rev}-high"
667
+ route "xhigh" "cursor-grok-{rev}-xhigh"
668
668
  mode "effort"
669
669
  efforts "low" "medium" "high" "xhigh"
670
670
  requires-effort #true
671
- default-member "cursor-grok-4.6-medium"
671
+ default-member "cursor-grok-{rev}-medium"
672
672
  }
673
- variant-family "cursor" "cursor-grok-4.6-fast" name="Grok 4.6 Fast" {
674
- members "cursor-grok-4.6-low-fast" "cursor-grok-4.6-medium-fast" "cursor-grok-4.6-high-fast" "cursor-grok-4.6-xhigh-fast"
675
- route "low" "cursor-grok-4.6-low-fast"
676
- route "medium" "cursor-grok-4.6-medium-fast"
677
- route "high" "cursor-grok-4.6-high-fast"
678
- route "xhigh" "cursor-grok-4.6-xhigh-fast"
673
+ variant-family "cursor" "cursor-grok-{rev}-fast" name="Grok {rev} Fast" revision=">=4.6" {
674
+ members "cursor-grok-{rev}-low-fast" "cursor-grok-{rev}-medium-fast" "cursor-grok-{rev}-high-fast" "cursor-grok-{rev}-xhigh-fast"
675
+ route "low" "cursor-grok-{rev}-low-fast"
676
+ route "medium" "cursor-grok-{rev}-medium-fast"
677
+ route "high" "cursor-grok-{rev}-high-fast"
678
+ route "xhigh" "cursor-grok-{rev}-xhigh-fast"
679
679
  mode "effort"
680
680
  efforts "low" "medium" "high" "xhigh"
681
681
  requires-effort #true
682
- default-member "cursor-grok-4.6-medium-fast"
682
+ default-member "cursor-grok-{rev}-medium-fast"
683
+ }
684
+ variant-family "cursor" "grok-{rev}" name="Grok {rev}" revision=">=4.7" {
685
+ members "grok-{rev}-low" "grok-{rev}-medium" "grok-{rev}-high" "grok-{rev}-xhigh"
686
+ route "low" "grok-{rev}-low"
687
+ route "medium" "grok-{rev}-medium"
688
+ route "high" "grok-{rev}-high"
689
+ route "xhigh" "grok-{rev}-xhigh"
690
+ mode "effort"
691
+ efforts "low" "medium" "high" "xhigh"
692
+ requires-effort #true
693
+ default-member "grok-{rev}-medium"
694
+ }
695
+ variant-family "cursor" "grok-{rev}-fast" name="Grok {rev} Fast" revision=">=4.7" {
696
+ members "grok-{rev}-low-fast" "grok-{rev}-medium-fast" "grok-{rev}-high-fast" "grok-{rev}-xhigh-fast"
697
+ route "low" "grok-{rev}-low-fast"
698
+ route "medium" "grok-{rev}-medium-fast"
699
+ route "high" "grok-{rev}-high-fast"
700
+ route "xhigh" "grok-{rev}-xhigh-fast"
701
+ mode "effort"
702
+ efforts "low" "medium" "high" "xhigh"
703
+ requires-effort #true
704
+ default-member "grok-{rev}-medium-fast"
683
705
  }
684
706
  variant-family "cursor" "gpt-5.6-luna" name="GPT-5.6 Luna" {
685
707
  members "gpt-5.6-luna-none" "gpt-5.6-luna-low" "gpt-5.6-luna-medium" "gpt-5.6-luna-high" "gpt-5.6-luna-xhigh" "gpt-5.6-luna-max"