@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.
- package/dist/docs/API_SUMMARY.md +1 -1
- package/dist/docs/ai.md +27 -15
- package/docs/API_SUMMARY.md +1 -1
- package/docs/ai.md +27 -15
- package/package.json +1 -1
package/dist/docs/API_SUMMARY.md
CHANGED
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
|
|
353
|
-
provider: '
|
|
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
|
-
| `
|
|
374
|
-
| `
|
|
375
|
-
| `google/gemini-2.5-
|
|
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
|
|
1581
|
-
await ai.chat.
|
|
1582
|
-
model: '
|
|
1583
|
-
|
|
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
|
|
1587
|
-
await ai.chat.
|
|
1588
|
-
model: '
|
|
1589
|
-
|
|
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
|
|
1600
|
+
// For fast multimodal or cost-sensitive general use
|
|
1593
1601
|
await ai.chat.completions.create('my-collection', {
|
|
1594
|
-
model: 'google/gemini-2.5-
|
|
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/docs/API_SUMMARY.md
CHANGED
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
|
|
353
|
-
provider: '
|
|
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
|
-
| `
|
|
374
|
-
| `
|
|
375
|
-
| `google/gemini-2.5-
|
|
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
|
|
1581
|
-
await ai.chat.
|
|
1582
|
-
model: '
|
|
1583
|
-
|
|
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
|
|
1587
|
-
await ai.chat.
|
|
1588
|
-
model: '
|
|
1589
|
-
|
|
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
|
|
1600
|
+
// For fast multimodal or cost-sensitive general use
|
|
1593
1601
|
await ai.chat.completions.create('my-collection', {
|
|
1594
|
-
model: 'google/gemini-2.5-
|
|
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
|