@compilr-dev/sdk 0.31.1 → 0.33.0

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.
@@ -161,67 +161,101 @@ export const MODEL_REGISTRY = [
161
161
  // ---------------------------------------------------------------------------
162
162
  // Gemini 2.x - Supported
163
163
  {
164
- id: 'gemini-2.5-flash-lite',
165
- displayName: 'Gemini 2.5 Flash Lite',
166
- description: 'Fast, low cost',
164
+ id: 'gemini-3.8-flash',
165
+ displayName: 'Gemini 3.8 Flash',
166
+ description: 'Most capable',
167
167
  provider: 'gemini',
168
168
  supportsImages: true,
169
- defaultTier: 'fast',
170
- thinkingFormat: 'gemini-v2',
169
+ supportsTools: true,
170
+ defaultTier: 'powerful',
171
+ thinkingFormat: 'gemini-v3',
171
172
  status: 'supported',
172
- contextWindow: 1000000,
173
+ contextWindow: 1048576,
174
+ notes: 'Newest Flash; max output 65,536',
173
175
  },
174
176
  {
175
- id: 'gemini-2.5-flash',
176
- displayName: 'Gemini 2.5 Flash',
177
+ id: 'gemini-3.5-flash',
178
+ displayName: 'Gemini 3.5 Flash',
177
179
  description: 'Balanced (recommended)',
178
180
  provider: 'gemini',
179
181
  supportsImages: true,
182
+ supportsTools: true,
180
183
  defaultTier: 'balanced',
181
- thinkingFormat: 'gemini-v2',
184
+ thinkingFormat: 'gemini-v3',
182
185
  status: 'supported',
183
- contextWindow: 1000000,
186
+ contextWindow: 1048576,
187
+ notes: 'GA; max output 65,536',
188
+ },
189
+ {
190
+ id: 'gemini-3.5-flash-lite',
191
+ displayName: 'Gemini 3.5 Flash Lite',
192
+ description: 'Fast, low cost',
193
+ provider: 'gemini',
194
+ supportsImages: true,
195
+ supportsTools: true,
196
+ defaultTier: 'fast',
197
+ thinkingFormat: 'gemini-v3',
198
+ status: 'supported',
199
+ contextWindow: 1048576,
200
+ notes: 'Max output 65,536',
201
+ },
202
+ {
203
+ id: 'gemini-3.1-pro-preview',
204
+ displayName: 'Gemini 3.1 Pro (Preview)',
205
+ description: 'Pro tier, preview',
206
+ provider: 'gemini',
207
+ supportsImages: true,
208
+ supportsTools: true,
209
+ thinkingFormat: 'gemini-v3',
210
+ status: 'experimental',
211
+ contextWindow: 1048576,
212
+ notes: 'The only Pro on the Gemini API; PREVIEW — measured 2026-09-30, ~1 turn in 5 returns ' +
213
+ 'MALFORMED_RESPONSE (the provider now reports it instead of showing its internal text)',
184
214
  },
215
+ // Legacy Gemini models. ⚠️ Google restricts the 2.5 line to accounts that already used it,
216
+ // so these can fail for a new key even though they work for an established one.
185
217
  {
186
218
  id: 'gemini-2.5-pro',
187
219
  displayName: 'Gemini 2.5 Pro',
188
- description: 'Most capable',
220
+ description: 'Previous generation',
189
221
  provider: 'gemini',
190
222
  supportsImages: true,
191
- defaultTier: 'powerful',
223
+ supportsTools: true,
192
224
  thinkingFormat: 'gemini-v2',
193
225
  status: 'supported',
194
- contextWindow: 1000000,
226
+ contextWindow: 1048576,
227
+ notes: 'Legacy — restricted to accounts that used it before; consider Gemini 3.8 Flash',
195
228
  },
196
- // Gemini 3.x - Preview, has stability issues with function calling
197
229
  {
198
- id: 'gemini-3-flash-preview',
199
- displayName: 'Gemini 3 Flash (Preview)',
200
- description: 'Preview - may have stability issues',
230
+ id: 'gemini-2.5-flash',
231
+ displayName: 'Gemini 2.5 Flash',
232
+ description: 'Previous generation',
201
233
  provider: 'gemini',
202
234
  supportsImages: true,
203
- thinkingFormat: 'gemini-v3',
235
+ supportsTools: true,
236
+ thinkingFormat: 'gemini-v2',
204
237
  status: 'supported',
205
- contextWindow: 1000000,
206
- notes: 'Preview: 500 errors during function calling, high token usage',
238
+ contextWindow: 1048576,
239
+ notes: 'Legacy — restricted to accounts that used it before; consider Gemini 3.5 Flash',
207
240
  },
208
241
  {
209
- id: 'gemini-3-pro-preview',
210
- displayName: 'Gemini 3 Pro (Preview)',
211
- description: 'Preview - may have stability issues',
242
+ id: 'gemini-2.5-flash-lite',
243
+ displayName: 'Gemini 2.5 Flash Lite',
244
+ description: 'Previous generation',
212
245
  provider: 'gemini',
213
246
  supportsImages: true,
214
- thinkingFormat: 'gemini-v3',
247
+ supportsTools: true,
248
+ thinkingFormat: 'gemini-v2',
215
249
  status: 'supported',
216
- contextWindow: 1000000,
217
- notes: 'Preview: Works but very high token usage during function calling',
250
+ contextWindow: 1048576,
251
+ notes: 'Legacy — restricted to accounts that used it before; consider Gemini 3.5 Flash Lite',
218
252
  },
219
253
  // ---------------------------------------------------------------------------
220
254
  // OpenAI Models
221
255
  // ---------------------------------------------------------------------------
222
256
  {
223
- id: 'gpt-5.2-2025-12-11',
224
- displayName: 'GPT-5.2',
257
+ id: 'gpt-6-astra',
258
+ displayName: 'GPT-6 Astra',
225
259
  description: 'Most capable',
226
260
  provider: 'openai',
227
261
  supportsImages: true,
@@ -229,12 +263,12 @@ export const MODEL_REGISTRY = [
229
263
  defaultTier: 'powerful',
230
264
  thinkingFormat: 'none',
231
265
  status: 'supported',
232
- contextWindow: 400000,
233
- notes: 'Latest generation',
266
+ contextWindow: 1050000,
267
+ notes: 'Responses API only (tools + reasoning); max output 128,000; $10/$50 per MTok',
234
268
  },
235
269
  {
236
- id: 'gpt-4o',
237
- displayName: 'GPT-4o',
270
+ id: 'gpt-6-sol',
271
+ displayName: 'GPT-6 Sol',
238
272
  description: 'Balanced (recommended)',
239
273
  provider: 'openai',
240
274
  supportsImages: true,
@@ -242,11 +276,12 @@ export const MODEL_REGISTRY = [
242
276
  defaultTier: 'balanced',
243
277
  thinkingFormat: 'none',
244
278
  status: 'supported',
245
- contextWindow: 128000,
279
+ contextWindow: 1050000,
280
+ notes: 'Coding and agentic work; max output 128,000; $2/$10 per MTok',
246
281
  },
247
282
  {
248
- id: 'gpt-4o-mini',
249
- displayName: 'GPT-4o Mini',
283
+ id: 'gpt-6-luna',
284
+ displayName: 'GPT-6 Luna',
250
285
  description: 'Fast, low cost',
251
286
  provider: 'openai',
252
287
  supportsImages: true,
@@ -254,29 +289,20 @@ export const MODEL_REGISTRY = [
254
289
  defaultTier: 'fast',
255
290
  thinkingFormat: 'none',
256
291
  status: 'supported',
257
- contextWindow: 128000,
292
+ contextWindow: 1050000,
293
+ notes: 'High volume; max output 128,000; $0.10/$0.50 per MTok',
258
294
  },
259
295
  {
260
- id: 'gpt-5-mini-2025-08-07',
261
- displayName: 'GPT-5 Mini',
262
- description: 'Balanced, latest generation',
263
- provider: 'openai',
264
- supportsImages: true,
265
- supportsTools: true,
266
- thinkingFormat: 'none',
267
- status: 'supported',
268
- contextWindow: 400000,
269
- },
270
- {
271
- id: 'gpt-5-nano-2025-08-07',
272
- displayName: 'GPT-5 Nano',
273
- description: 'Fast, latest generation',
296
+ id: 'gpt-5.5',
297
+ displayName: 'GPT-5.5',
298
+ description: 'Previous generation',
274
299
  provider: 'openai',
275
300
  supportsImages: true,
276
301
  supportsTools: true,
277
302
  thinkingFormat: 'none',
278
303
  status: 'supported',
279
304
  contextWindow: 400000,
305
+ notes: 'Legacy — the last OpenAI generation that calls tools on Chat Completions',
280
306
  },
281
307
  // ---------------------------------------------------------------------------
282
308
  // Ollama Models (Local)
@@ -605,7 +631,9 @@ export function modelSupportsImages(modelId) {
605
631
  const id = modelId.toLowerCase();
606
632
  if (id.includes('claude') || id.includes('gemini'))
607
633
  return true;
608
- if (/gpt-4o|gpt-4-turbo|gpt-4\.1|gpt-5/.test(id))
634
+ // ⚠️ Generation-agnostic: a `gpt-\d` check dated to gpt-5 would answer FALSE for gpt-6 and
635
+ // silently disable image input on a model that has it (measured: gpt-6-sol read a PNG).
636
+ if (/gpt-4o|gpt-4-turbo|gpt-4\.1|gpt-[5-9]|gpt-\d{2}/.test(id))
609
637
  return true;
610
638
  return false;
611
639
  }
@@ -68,10 +68,13 @@ export function getShortModelName(modelId) {
68
68
  return 'Opus';
69
69
  if (modelId.includes('claude-fable'))
70
70
  return 'Fable';
71
- if (modelId.includes('gpt-5'))
72
- return 'GPT-5';
71
+ // ⚠️ gpt-4o before the generic pattern, which would otherwise render it "GPT-4".
73
72
  if (modelId.includes('gpt-4o'))
74
73
  return 'GPT-4o';
74
+ // Generation-agnostic, so a future gpt-7 needs no edit here.
75
+ const gpt = /gpt-(\d+(?:\.\d+)?)/.exec(modelId);
76
+ if (gpt)
77
+ return `GPT-${gpt[1]}`;
75
78
  if (modelId.includes('gemini-3'))
76
79
  return 'Gemini 3';
77
80
  if (modelId.includes('gemini-2.5'))
package/dist/models.js CHANGED
@@ -31,7 +31,8 @@ export const DEFAULT_MODELS = (() => {
31
31
  else {
32
32
  // Fallback: first supported model for this provider, or a sensible default
33
33
  const firstModel = MODEL_REGISTRY.find((m) => m.provider === provider && m.status === 'supported');
34
- result[provider] = firstModel?.id ?? 'gpt-4o';
34
+ // Fallback only when the registry has no model at all for the provider; gpt-4o is gone.
35
+ result[provider] = firstModel?.id ?? 'gpt-6-sol';
35
36
  }
36
37
  }
37
38
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.31.1",
3
+ "version": "0.33.0",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -81,7 +81,7 @@
81
81
  "node": ">=20.0.0"
82
82
  },
83
83
  "dependencies": {
84
- "@compilr-dev/agents": "^0.6.11",
84
+ "@compilr-dev/agents": "^0.7.1",
85
85
  "@compilr-dev/logger": "^0.1.0",
86
86
  "ajv": "^6.14.0",
87
87
  "yaml": "^2.8.4"