@proveanything/smartlinks 1.7.8 → 1.7.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.
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.7.8 | Generated: 2026-03-12T16:18:35.207Z
3
+ Version: 1.7.9 | Generated: 2026-03-12T17:26:42.940Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/dist/docs/ai.md CHANGED
@@ -349,8 +349,11 @@ if (toolCall) {
349
349
  const models = await ai.models.list('my-collection');
350
350
 
351
351
  // Or filter by provider / capability
352
- const googleVisionModels = await ai.models.list('my-collection', {
353
- provider: 'google',
352
+ const openAiModels = await ai.models.list('my-collection', {
353
+ provider: 'openai'
354
+ });
355
+
356
+ const visionModels = await ai.models.list('my-collection', {
354
357
  capability: 'vision'
355
358
  });
356
359
 
@@ -366,13 +369,18 @@ const model = await ai.models.get('my-collection', 'google/gemini-2.5-flash');
366
369
  console.log(model.capabilities); // ['text', 'vision', 'audio', 'code']
367
370
  ```
368
371
 
372
+ Use `ai.models.list(collectionId)` as the source of truth for what your collection can use at runtime. The public docs provide recommendations, but actual availability depends on the SmartLinks model catalog exposed to that collection.
373
+
369
374
  **Recommended Models:**
370
375
 
371
376
  | Model | Use Case | Speed | Cost |
372
377
  |-------|----------|-------|------|
373
- | `google/gemini-2.5-flash-lite` | Simple Q&A | Fastest | Lowest |
374
- | `google/gemini-2.5-flash` | General purpose | Fast | Low |
375
- | `google/gemini-2.5-pro` | Complex reasoning | Slower | Higher |
378
+ | `openai/gpt-5.4` | Default for new agentic and structured-output workflows | Balanced | Medium |
379
+ | `openai/gpt-5-mini` | Lower-cost general purpose and JSON tasks | Fast | Low |
380
+ | `google/gemini-2.5-flash` | Fast multimodal and cost-sensitive general use | Fast | Low |
381
+ | `google/gemini-2.5-pro` | Complex reasoning and heavier multimodal tasks | Slower | Higher |
382
+
383
+ If you want a safe default for most new work, start with `openai/gpt-5.4`. If you want a lower-cost fallback, use `openai/gpt-5-mini` or `google/gemini-2.5-flash` depending on your latency and pricing goals.
376
384
 
377
385
  ---
378
386
 
@@ -1577,23 +1585,27 @@ console.log('Rate limit reset for user-123');
1577
1585
  ### 1. Choose the Right Model
1578
1586
 
1579
1587
  ```typescript
1580
- // For simple Q&A (fast, cheap)
1581
- await ai.chat.completions.create('my-collection', {
1582
- model: 'google/gemini-2.5-flash-lite',
1583
- messages: [...]
1588
+ // For most new workflows (recommended default)
1589
+ await ai.chat.responses.create('my-collection', {
1590
+ model: 'openai/gpt-5.4',
1591
+ input: 'Create a concise onboarding checklist.'
1584
1592
  });
1585
1593
 
1586
- // For general use (balanced)
1587
- await ai.chat.completions.create('my-collection', {
1588
- model: 'google/gemini-2.5-flash',
1589
- messages: [...]
1594
+ // For lower-cost structured or JSON-oriented work
1595
+ await ai.chat.responses.create('my-collection', {
1596
+ model: 'openai/gpt-5-mini',
1597
+ input: 'Return a color palette as JSON.'
1590
1598
  });
1591
1599
 
1592
- // For complex reasoning (powerful)
1600
+ // For fast multimodal or cost-sensitive general use
1593
1601
  await ai.chat.completions.create('my-collection', {
1594
- model: 'google/gemini-2.5-pro',
1602
+ model: 'google/gemini-2.5-flash',
1595
1603
  messages: [...]
1596
1604
  });
1605
+
1606
+ // When you need the actual available catalog for this collection
1607
+ const available = await ai.models.list('my-collection');
1608
+ console.log(available.data.map(model => model.id));
1597
1609
  ```
1598
1610
 
1599
1611
  ### 2. Use Streaming for Long Responses
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.7.8 | Generated: 2026-03-12T16:18:35.207Z
3
+ Version: 1.7.9 | Generated: 2026-03-12T17:26:42.940Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/docs/ai.md CHANGED
@@ -349,8 +349,11 @@ if (toolCall) {
349
349
  const models = await ai.models.list('my-collection');
350
350
 
351
351
  // Or filter by provider / capability
352
- const googleVisionModels = await ai.models.list('my-collection', {
353
- provider: 'google',
352
+ const openAiModels = await ai.models.list('my-collection', {
353
+ provider: 'openai'
354
+ });
355
+
356
+ const visionModels = await ai.models.list('my-collection', {
354
357
  capability: 'vision'
355
358
  });
356
359
 
@@ -366,13 +369,18 @@ const model = await ai.models.get('my-collection', 'google/gemini-2.5-flash');
366
369
  console.log(model.capabilities); // ['text', 'vision', 'audio', 'code']
367
370
  ```
368
371
 
372
+ Use `ai.models.list(collectionId)` as the source of truth for what your collection can use at runtime. The public docs provide recommendations, but actual availability depends on the SmartLinks model catalog exposed to that collection.
373
+
369
374
  **Recommended Models:**
370
375
 
371
376
  | Model | Use Case | Speed | Cost |
372
377
  |-------|----------|-------|------|
373
- | `google/gemini-2.5-flash-lite` | Simple Q&A | Fastest | Lowest |
374
- | `google/gemini-2.5-flash` | General purpose | Fast | Low |
375
- | `google/gemini-2.5-pro` | Complex reasoning | Slower | Higher |
378
+ | `openai/gpt-5.4` | Default for new agentic and structured-output workflows | Balanced | Medium |
379
+ | `openai/gpt-5-mini` | Lower-cost general purpose and JSON tasks | Fast | Low |
380
+ | `google/gemini-2.5-flash` | Fast multimodal and cost-sensitive general use | Fast | Low |
381
+ | `google/gemini-2.5-pro` | Complex reasoning and heavier multimodal tasks | Slower | Higher |
382
+
383
+ If you want a safe default for most new work, start with `openai/gpt-5.4`. If you want a lower-cost fallback, use `openai/gpt-5-mini` or `google/gemini-2.5-flash` depending on your latency and pricing goals.
376
384
 
377
385
  ---
378
386
 
@@ -1577,23 +1585,27 @@ console.log('Rate limit reset for user-123');
1577
1585
  ### 1. Choose the Right Model
1578
1586
 
1579
1587
  ```typescript
1580
- // For simple Q&A (fast, cheap)
1581
- await ai.chat.completions.create('my-collection', {
1582
- model: 'google/gemini-2.5-flash-lite',
1583
- messages: [...]
1588
+ // For most new workflows (recommended default)
1589
+ await ai.chat.responses.create('my-collection', {
1590
+ model: 'openai/gpt-5.4',
1591
+ input: 'Create a concise onboarding checklist.'
1584
1592
  });
1585
1593
 
1586
- // For general use (balanced)
1587
- await ai.chat.completions.create('my-collection', {
1588
- model: 'google/gemini-2.5-flash',
1589
- messages: [...]
1594
+ // For lower-cost structured or JSON-oriented work
1595
+ await ai.chat.responses.create('my-collection', {
1596
+ model: 'openai/gpt-5-mini',
1597
+ input: 'Return a color palette as JSON.'
1590
1598
  });
1591
1599
 
1592
- // For complex reasoning (powerful)
1600
+ // For fast multimodal or cost-sensitive general use
1593
1601
  await ai.chat.completions.create('my-collection', {
1594
- model: 'google/gemini-2.5-pro',
1602
+ model: 'google/gemini-2.5-flash',
1595
1603
  messages: [...]
1596
1604
  });
1605
+
1606
+ // When you need the actual available catalog for this collection
1607
+ const available = await ai.models.list('my-collection');
1608
+ console.log(available.data.map(model => model.id));
1597
1609
  ```
1598
1610
 
1599
1611
  ### 2. Use Streaming for Long Responses
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",