@linxiraos/pi-catalog 1.4.6 → 1.4.9

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 (104) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/README.md +3 -3
  3. package/dist/types/build.d.ts +12 -4
  4. package/dist/types/compat/auth-ids.d.ts +2 -2
  5. package/dist/types/compat/catalog-policy.d.ts +6 -4
  6. package/dist/types/compat/factory-droid.d.ts +7 -1
  7. package/dist/types/compat/provider-ids.d.ts +1 -1
  8. package/dist/types/compat/resolve.d.ts +1 -1
  9. package/dist/types/compat/revision.d.ts +2 -0
  10. package/dist/types/compat/server-side-fallback.d.ts +6 -4
  11. package/dist/types/compat/types.d.ts +6 -2
  12. package/dist/types/discovery/codex.d.ts +4 -5
  13. package/dist/types/discovery/cursor-proto.d.ts +8 -0
  14. package/dist/types/discovery/openai-compatible.d.ts +6 -0
  15. package/dist/types/model-cache.d.ts +8 -0
  16. package/dist/types/model-catalog-format.d.ts +37 -0
  17. package/dist/types/model-manager.d.ts +11 -1
  18. package/dist/types/model-thinking.d.ts +4 -0
  19. package/dist/types/models.d.ts +22 -3
  20. package/dist/types/pricing.d.ts +66 -6
  21. package/dist/types/provider-models/openai-compat.d.ts +18 -13
  22. package/dist/types/types.d.ts +14 -19
  23. package/dist/types/utils.d.ts +8 -0
  24. package/dist/types/wire/codex.d.ts +1 -1
  25. package/package.json +6 -10
  26. package/src/build.d.ts +12 -4
  27. package/src/build.ts +50 -3
  28. package/src/compat/auth-ids.ts +5 -0
  29. package/src/compat/axes.ts +27 -9
  30. package/src/compat/catalog-policy.d.ts +9 -0
  31. package/src/compat/catalog-policy.ts +14 -10
  32. package/src/compat/collapse.ts +1 -1
  33. package/src/compat/factory-droid.d.ts +7 -1
  34. package/src/compat/factory-droid.ts +9 -1
  35. package/src/compat/provider-ids.d.ts +1 -1
  36. package/src/compat/provider-ids.ts +2 -0
  37. package/src/compat/resolve.d.ts +1 -1
  38. package/src/compat/resolve.ts +4 -5
  39. package/src/compat/revision.d.ts +2 -0
  40. package/src/compat/revision.ts +10 -0
  41. package/src/compat/rules/README.md +14 -12
  42. package/src/compat/rules/auth/_order.kdl +1 -1
  43. package/src/compat/rules/auth/mistral.kdl +4 -0
  44. package/src/compat/rules/auth/modular.kdl +9 -0
  45. package/src/compat/rules/auth/scaleway.kdl +17 -0
  46. package/src/compat/rules/auth/typesafe.kdl +2 -1
  47. package/src/compat/rules/classes/anthropic.kdl +5 -0
  48. package/src/compat/rules/classes/deepseek.kdl +3 -2
  49. package/src/compat/rules/classes/gemini.kdl +1 -1
  50. package/src/compat/rules/classes/openai.kdl +2 -2
  51. package/src/compat/rules/classes/xai.kdl +1 -1
  52. package/src/compat/rules/providers/anthropic.kdl +8 -4
  53. package/src/compat/rules/providers/cursor.kdl +10 -0
  54. package/src/compat/rules/providers/deepseek.kdl +2 -2
  55. package/src/compat/rules/providers/factory-droid.kdl +243 -13
  56. package/src/compat/rules/providers/google-vertex.kdl +3 -0
  57. package/src/compat/rules/providers/kimi-code.kdl +6 -0
  58. package/src/compat/rules/providers/mistral.kdl +8 -0
  59. package/src/compat/rules/providers/modular.kdl +35 -0
  60. package/src/compat/rules/providers/openai-codex.kdl +1 -1
  61. package/src/compat/rules/providers/sambanova.kdl +2 -0
  62. package/src/compat/rules/providers/scaleway.kdl +179 -0
  63. package/src/compat/rules/runtime/behavior.kdl +22 -6
  64. package/src/compat/rules.json +1 -1
  65. package/src/compat/server-side-fallback.d.ts +9 -0
  66. package/src/compat/server-side-fallback.ts +7 -5
  67. package/src/compat/types.d.ts +6 -2
  68. package/src/compat/types.ts +6 -2
  69. package/src/discovery/codex.d.ts +4 -5
  70. package/src/discovery/codex.ts +7 -15
  71. package/src/discovery/cursor-proto.d.ts +8 -0
  72. package/src/discovery/cursor-proto.ts +12 -1
  73. package/src/discovery/factory-droid.ts +35 -11
  74. package/src/discovery/openai-compatible.d.ts +6 -0
  75. package/src/discovery/openai-compatible.ts +1 -1
  76. package/src/model-cache.d.ts +8 -0
  77. package/src/model-cache.ts +83 -61
  78. package/src/model-catalog-format.d.ts +37 -0
  79. package/src/model-catalog-format.ts +296 -0
  80. package/src/model-manager.d.ts +11 -1
  81. package/src/model-manager.ts +85 -143
  82. package/src/model-thinking.d.ts +4 -0
  83. package/src/model-thinking.ts +10 -0
  84. package/src/model-tokenizer.ts +13 -12
  85. package/src/models.d.ts +22 -3
  86. package/src/models.json +1 -1
  87. package/src/models.ts +48 -11
  88. package/src/pricing.d.ts +66 -6
  89. package/src/pricing.ts +59 -94
  90. package/src/provider-models/cache-provider-id.ts +23 -6
  91. package/src/provider-models/catalog-snapshot.json.zst +0 -0
  92. package/src/provider-models/catalog-snapshot.json.zst.d.ts +3 -0
  93. package/src/provider-models/descriptors.ts +2 -0
  94. package/src/provider-models/openai-compat.d.ts +18 -13
  95. package/src/provider-models/openai-compat.ts +203 -94
  96. package/src/provider-models/special.ts +5 -6
  97. package/src/types.d.ts +14 -19
  98. package/src/types.ts +11 -18
  99. package/src/utils.d.ts +8 -0
  100. package/src/utils.ts +18 -0
  101. package/src/wire/codex.d.ts +1 -1
  102. package/src/wire/codex.ts +1 -1
  103. package/src/wire/factory-droid.ts +4 -3
  104. package/src/models.json.d.ts +0 -9
@@ -0,0 +1,179 @@
1
+ // Provider-wire compat for "scaleway": Scaleway Generative APIs, an
2
+ // OpenAI-compatible gateway at https://api.scaleway.ai/v1 serving serverless
3
+ // open-weight chat models. Verified live 2026-10-21: /v1/models returns bare
4
+ // OpenAI rows with no capability metadata, reasoning traces stream back on
5
+ // the message `reasoning` field, and reasoning_effort accepts `max`, `xhigh`,
6
+ // and `none` (the request-schema enum is stale; `none` answers with
7
+ // reasoning_tokens 0), so the ladders below follow the model cards, not the
8
+ // schema.
9
+ // Docs: https://www.scaleway.com/en/docs/generative-apis/reference-content/supported-models/
10
+ // Pricing (EUR/Mtok, pre-tax): https://www.scaleway.com/en/pricing/model-as-a-service/
11
+
12
+ provider "scaleway" {
13
+ default-model "glm-5.3"
14
+ env "SCW_SECRET_KEY" "SCW_API_KEY"
15
+ // The key-protected `/v1/models` roster is the serverless catalog: a
16
+ // successful fetch prunes bundled rows Scaleway has retired (glm-5.2 is
17
+ // routed to glm-5.3 after 2026-11-16). Same-id rows on other hosts carry
18
+ // other deployments' limits and modalities (zai serves glm-5.3 at
19
+ // 1M/131k), so the generator must never backfill from them.
20
+ dynamic-models-authoritative #true
21
+ skip-cross-provider-reference-fills #true
22
+ discovery label="Scaleway"
23
+
24
+ // Documented serverless catalog (supported-models + pricing pages,
25
+ // 2026-11-02). `/v1/models` carries ids only, so these rows are the
26
+ // bundle in every regeneration and outrank the bare discovered rows; at
27
+ // runtime they are the reference discovery merges names, modalities,
28
+ // prices, and limits from. Prices are EUR list rates converted at the
29
+ // 2026-10-21 ECB reference rate (1 EUR = 1.1234 USD); Scaleway publishes
30
+ // no cache-write rate and cache-read only where listed. Limits read the
31
+ // documented "k" as 1,000 tokens, never overstating a serverless cap.
32
+ seed api="openai-completions" base-url="https://api.scaleway.ai/v1" bundle="always" precedence="seed" {
33
+ model "glm-5.3" name="GLM 5.3" {
34
+ reasoning #true
35
+ input "text"
36
+ cost input=2.02 output=6.18 cache-read=0 cache-write=0
37
+ limits context=256000 max-tokens=16000
38
+ }
39
+ model "glm-5.2" name="GLM 5.2" {
40
+ reasoning #true
41
+ input "text"
42
+ cost input=2.02 output=6.18 cache-read=0 cache-write=0
43
+ limits context=256000 max-tokens=16000
44
+ }
45
+ model "deepseek-v4.1-flash" name="DeepSeek V4.1 Flash" {
46
+ reasoning #true
47
+ input "text" "image"
48
+ cost input=0.67 output=2.02 cache-read=0.13 cache-write=0
49
+ limits context=256000 max-tokens=32000
50
+ }
51
+ model "deepseek-v4-flash-0731" name="DeepSeek V4 Flash 0731" {
52
+ reasoning #true
53
+ input "text"
54
+ cost input=0.45 output=0.9 cache-read=0.09 cache-write=0
55
+ limits context=256000 max-tokens=32000
56
+ }
57
+ model "qwen3.8-27b" name="Qwen3.8 27B" {
58
+ reasoning #true
59
+ input "text" "image"
60
+ cost input=0.67 output=3.71 cache-read=0.13 cache-write=0
61
+ limits context=256000 max-tokens=32000
62
+ }
63
+ model "qwen3.6-35b-a3b" name="Qwen3.6 35B A3B" {
64
+ reasoning #true
65
+ input "text" "image"
66
+ cost input=0.28 output=1.69 cache-read=0 cache-write=0
67
+ limits context=256000 max-tokens=32000
68
+ }
69
+ model "qwen3.5-397b-a17b" name="Qwen3.5 397B A17B" {
70
+ reasoning #true
71
+ input "text" "image"
72
+ cost input=0.67 output=4.04 cache-read=0 cache-write=0
73
+ limits context=250000 max-tokens=16000
74
+ }
75
+ model "qwen3-235b-a22b-instruct-2507" name="Qwen3 235B A22B Instruct 2507" {
76
+ reasoning #false
77
+ input "text"
78
+ cost input=0.84 output=2.53 cache-read=0 cache-write=0
79
+ limits context=250000 max-tokens=16000
80
+ }
81
+ model "gemma-4-26b-a4b-it" name="Gemma 4 26B A4B IT" {
82
+ reasoning #true
83
+ input "text" "image"
84
+ cost input=0.28 output=0.56 cache-read=0 cache-write=0
85
+ limits context=256000 max-tokens=32000
86
+ }
87
+ model "mistral-medium-3.5-128b" name="Mistral Medium 3.5 128B" {
88
+ reasoning #true
89
+ input "text" "image"
90
+ cost input=1.69 output=8.43 cache-read=0 cache-write=0
91
+ limits context=180000 max-tokens=16000
92
+ }
93
+ model "mistral-small-3.2-24b-instruct-2506" name="Mistral Small 3.2 24B Instruct 2506" {
94
+ reasoning #false
95
+ input "text" "image"
96
+ cost input=0.17 output=0.39 cache-read=0 cache-write=0
97
+ limits context=128000 max-tokens=32000
98
+ }
99
+ model "llama-3.3-70b-instruct" name="Llama 3.3 70B Instruct" {
100
+ reasoning #false
101
+ input "text"
102
+ cost input=1.01 output=1.01 cache-read=0 cache-write=0
103
+ limits context=100000 max-tokens=16000
104
+ }
105
+ }
106
+
107
+ thinking-mode "effort"
108
+
109
+ // Scaleway takes OpenAI reasoning_effort on every lineage it serves —
110
+ // never Qwen-native enable_thinking — and documents `none` as the off
111
+ // value on every reasoning model it serves over Chat Completions, so
112
+ // thinking-off must send `none`: omitting the field would fall back to
113
+ // the server default (medium) and keep reasoning on.
114
+ class "qwen" {
115
+ thinking-format "openai"
116
+ reasoning-disable-mode "none-effort"
117
+ }
118
+ class "glm" {
119
+ reasoning-disable-mode "none-effort"
120
+ }
121
+ class "deepseek" {
122
+ reasoning-disable-mode "none-effort"
123
+ }
124
+ class "gemma" {
125
+ reasoning-disable-mode "none-effort"
126
+ }
127
+ class "mistral" {
128
+ reasoning-disable-mode "none-effort"
129
+ }
130
+
131
+ // The ladders below are cascade rules rather than seed thinking so they
132
+ // also reach bare discovered rows that have no bundled reference yet.
133
+ // GLM 5.3 diverges from the lineage glob (classes/glm.kdl priority=10:
134
+ // low/high/max, thinking cannot be disabled): Scaleway's card documents
135
+ // none/low/high/max and `none` is verified to disable reasoning, so this
136
+ // residue outranks the glob; the default effort stays the lineage's `max`.
137
+ models "glm-5.3" priority=20 {
138
+ thinking-upgrade-neutral #true
139
+ thinking-efforts "low" "high" "max"
140
+ thinking-requires-effort #false
141
+ }
142
+ // GLM 5.2 documents none/high/max, dropping the lineage's
143
+ // minimal/low/medium tiers.
144
+ models "glm-5.2" priority=20 {
145
+ thinking-upgrade-neutral #true
146
+ thinking-efforts "high" "max"
147
+ thinking-default-level "max"
148
+ thinking-requires-effort #false
149
+ }
150
+ // DeepSeek Flash ladders match the lineage's wire-exact low/high/max;
151
+ // `none` is documented on both cards. Restated here because the
152
+ // vendor-suffixed -v4.1-flash and dated -0731 ids have no same-id census
153
+ // row the family ladder could ride in on.
154
+ models "deepseek-v4.1-flash" "deepseek-v4-flash-0731" {
155
+ thinking-upgrade-neutral #true
156
+ thinking-efforts "low" "high" "max"
157
+ }
158
+ // Qwen cards: 3.8 keeps its native xhigh tier; 3.6 and 3.5 stop at high.
159
+ models "qwen3.8-27b" {
160
+ thinking-upgrade-neutral #true
161
+ thinking-efforts "low" "medium" "xhigh"
162
+ }
163
+ models "qwen3.6-35b-a3b" "qwen3.5-397b-a17b" {
164
+ thinking-upgrade-neutral #true
165
+ thinking-efforts "low" "medium" "high"
166
+ }
167
+ // Gemma 4 documents none/low/medium/high.
168
+ models "gemma-4-26b-a4b-it" {
169
+ thinking-upgrade-neutral #true
170
+ thinking-efforts "low" "medium" "high"
171
+ }
172
+ // Mistral Medium 3.5 documents none/high only; the server default
173
+ // (medium) is not a valid tier, so the omp default pins high.
174
+ models "mistral-medium-3.5-128b" {
175
+ thinking-upgrade-neutral #true
176
+ thinking-efforts "high"
177
+ thinking-default-level "high"
178
+ }
179
+ }
@@ -100,13 +100,16 @@ behavior {
100
100
  // (flat rate) or Standard Credits. Unknown ids have no inferred entitlement.
101
101
  quota-tiers provider="factory-droid" {
102
102
  tier "core" "inkling" "mistral-large-4" "mistral-medium-3.5" "glm-5.3-flash" "glm-5.3" "glm-5.2" "glm-5.2-fast" \
103
- "kimi-k3" "qwen3.8-max" "nemotron-3-ultra" "deepseek-v4.1-flash" "deepseek-v4-flash-0731" \
104
- "deepseek-v4-pro" "minimax-m3" "minimax-m2.7"
103
+ "kimi-k3" "qwen3.8-max" "nemotron-3-ultra" "deepseek-v4.1-flash" "deepseek-v4.1-flash-1017" \
104
+ "nemotron-3.5-super" "beam-1.0" \
105
+ "deepseek-v4-flash-0731" "deepseek-v4-pro" "minimax-m3" "minimax-m2.7"
105
106
  tier "standard" "claude-fable-5.1" "claude-fable-5" "claude-opus-5-5" "claude-opus-5-5-fast" \
106
107
  "claude-opus-5" "claude-opus-5-fast" "claude-opus-4-8" "claude-opus-4-8-fast" "claude-opus-4-7" \
107
108
  "claude-opus-4-6" "claude-opus-4-5-20251101" "claude-sonnet-5-5" "claude-sonnet-5" \
108
109
  "claude-sonnet-4-6" "claude-sonnet-4-5-20250929" "claude-haiku-5-5" "claude-haiku-4-5-20251001" "gpt-6-astra" \
109
110
  "gpt-6.1-sol" "gpt-6-sol" "gpt-6-luna" "gpt-5.6-sol" "gpt-5.6-sol-fast" "gpt-5.6-terra" \
111
+ "gpt-6-astra-ultrafast" "gpt-6.1-sol-ultrafast" "gpt-6.1-terra" "gpt-6-sol-fast" "gpt-6-luna-fast" \
112
+ "muse-spark-open" "muse-spark-1.2" \
110
113
  "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" \
111
114
  "gpt-5.4-mini-fast" "gpt-5.3-codex" "gpt-5.3-codex-fast" "gpt-5.2" "garnet-07-15" \
112
115
  "gemini-3.1-pro-preview" "gemini-3.8-flash" "gemini-3.7-flash" "gemini-3.6-flash" \
@@ -181,6 +184,13 @@ behavior {
181
184
  // Helmcode's /v1/models roster lists embedding, rerank, TTS, and STT models
182
185
  // beside the chat models (helmcode.com/docs/models).
183
186
  exclude-models provider="helmcode" exact="qwen3-embedding" exact="rerank" exact="kokoro" exact="whisper"
187
+ // Scaleway's /v1/models roster lists transcription, embedding, and OCR
188
+ // models beside the chat models (scaleway.com/docs/generative-apis/
189
+ // reference-content/supported-models). gpt-oss-120b is listed as chat, but
190
+ // Scaleway's Chat Completions route does not support its tool calling
191
+ // (reference-content/openai-compatibility recommends the Responses API).
192
+ exclude-models provider="scaleway" prefix="whisper-" prefix="qwen3-embedding-" prefix="bge-" prefix="lightonocr-" \
193
+ exact="gpt-oss-120b"
184
194
  // SuperGrok's roster interleaves media models the chat picker cannot
185
195
  // serve; the dedicated tool surfaces route them instead.
186
196
  exclude-models provider="xai-oauth" exact="grok-imagine-image-quality" exact="grok-imagine-image-2.0" \
@@ -305,6 +315,8 @@ behavior {
305
315
  exact="claude-haiku-5-5" exact="claude-haiku-4-5-20251001" exact="atlas-07-21" exact="aster-07-15" \
306
316
  exact="minimax-m2.7"
307
317
  route "openai-responses" exact="gpt-6-astra" exact="gpt-6.1-sol" exact="gpt-6-sol" exact="gpt-6-luna" \
318
+ exact="gpt-6-astra-ultrafast" exact="gpt-6.1-sol-ultrafast" exact="gpt-6.1-terra" exact="gpt-6-sol-fast" \
319
+ exact="gpt-6-luna-fast" \
308
320
  exact="gpt-5.6-sol" exact="gpt-5.6-sol-fast" exact="gpt-5.6-terra" exact="gpt-5.6-luna" \
309
321
  exact="gpt-5.5" exact="gpt-5.5-fast" exact="gpt-5.5-pro" exact="gpt-5.4" exact="gpt-5.4-fast" \
310
322
  exact="gpt-5.4-mini" exact="gpt-5.4-mini-fast" exact="gpt-5.3-codex" exact="gpt-5.3-codex-fast" \
@@ -315,8 +327,9 @@ behavior {
315
327
  exact="gemini-3-flash-preview" exact="gemini-3-pro-image-preview"
316
328
  route "openai-completions" exact="inkling" exact="mistral-large-4" exact="mistral-medium-3.5" exact="glm-5.3-flash" \
317
329
  exact="glm-5.3" exact="glm-5.2" exact="glm-5.2-fast" exact="kimi-k3" exact="qwen3.8-max" \
318
- exact="nemotron-3-ultra" exact="deepseek-v4.1-flash" exact="deepseek-v4-flash-0731" \
319
- exact="deepseek-v4-pro" exact="minimax-m3"
330
+ exact="nemotron-3-ultra" exact="deepseek-v4.1-flash" exact="deepseek-v4.1-flash-1017" \
331
+ exact="nemotron-3.5-super" exact="muse-spark-open" exact="muse-spark-1.2" exact="beam-1.0" \
332
+ exact="deepseek-v4-flash-0731" exact="deepseek-v4-pro" exact="minimax-m3"
320
333
  }
321
334
 
322
335
  // Copilot serves these models with tighter effective limits than its
@@ -428,7 +441,6 @@ behavior {
428
441
  model "oss-120b"
429
442
  model "cerebras/zai-glm-4.7"
430
443
  model "cerebras/zai-glm-4.6"
431
- model "cerebras/zai-glm"
432
444
  model "claude-haiku-4-5"
433
445
  model "claude-haiku-4.5"
434
446
  model "haiku-4-5"
@@ -463,7 +475,6 @@ behavior {
463
475
  model "anthropic/claude-opus-5"
464
476
  model "claude-opus-5"
465
477
  model "opus-5"
466
- model "openai-codex/gpt-5.5"
467
478
  model "gpt-5.5"
468
479
  model "claude-opus-4-8"
469
480
  model "claude-opus-4.8"
@@ -479,6 +490,11 @@ behavior {
479
490
  model "openrouter/google/gemini-3-pro-image"
480
491
  model "google/gemini-3-pro-image"
481
492
  model "deepinfra/black-forest-labs/FLUX-2-pro"
493
+ // Factory Droid last, in the CLI's own preference order: a Factory
494
+ // login alone can generate, and no other provider's turn moves.
495
+ model "factory-droid/gpt-image-2.5-sunburst"
496
+ model "factory-droid/gpt-image-2.5-flare"
497
+ model "factory-droid/gemini-3-pro-image-preview"
482
498
  }
483
499
  role-defaults "web" {
484
500
  model "web/parallel"