@shop-os/modelkit 0.3.5 → 0.3.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.
- package/CHANGELOG.md +14 -0
- package/dist/catalog.cjs +48 -3
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.js +48 -3
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +84 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +84 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,20 @@ header in the release PR.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.3.6] - Unreleased
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- Snapshot rows for Perplexity's Agent API, which replaced Sonar Chat Completions on 2026-09-27: `perplexity/sonar` (Sonar as an Agent API model; the row sends the `web_search` tool on every call, since a bare model does not search) and `perplexity/fast` (the `fast` preset, gpt-5.6-luna with one web search, Perplexity's replacement for Sonar and Sonar Pro).
|
|
16
|
+
- A text usage event carries `reportedCostUsd` when the provider reports its own charge. Perplexity does (`providerMetadata.perplexity.cost.totalCost`), and its total includes web search tool calls, which tokens alone miss. Multi-step calls sum it per model.
|
|
17
|
+
- `detectTextProvider` treats a `perplexity/` id as Perplexity.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- `@ai-sdk/perplexity` peer range is `^3.1.0` (dev `^3.1.3`): 3.1 is the release that speaks the Agent API.
|
|
21
|
+
- `sonar`, `sonar-pro` and `sonar-reasoning-pro` are `deprecated`, replaced by `perplexity/sonar`, `perplexity/fast` and `perplexity/fast`. Their bare ids are not Agent API models, so calls to them fail.
|
|
22
|
+
|
|
23
|
+
### Live rows to add after publish
|
|
24
|
+
Seed `perplexity/sonar` and `perplexity/fast` into the live catalog (pro-backend's model catalog seed inserts them once it runs 0.3.6), and mark the live `sonar`, `sonar-pro` and `sonar-reasoning-pro` rows deprecated in pro-admin: the seed never overwrites an existing row. pro-backend already prices both new ids (`credit_pricing_token` rows `perplexity/sonar` and `perplexity/fast`); once it runs 0.3.6, drop their entries from `SEED_KEY_EXCEPTIONS` and `USAGE_ID_ALLOWLIST`, which fail closed when the kit knows the id.
|
|
25
|
+
|
|
12
26
|
## [0.3.5] - Unreleased
|
|
13
27
|
|
|
14
28
|
### Fixed
|
package/dist/catalog.cjs
CHANGED
|
@@ -1244,12 +1244,18 @@ var TEXT_MODELS = [
|
|
|
1244
1244
|
contextWindow: 1048576
|
|
1245
1245
|
}
|
|
1246
1246
|
}),
|
|
1247
|
+
// Perplexity stopped serving Sonar Chat Completions on 2026-09-27; @ai-sdk/perplexity 3.1
|
|
1248
|
+
// speaks the Agent API, which rejects the bare `sonar*` ids. Its migration guide maps Sonar
|
|
1249
|
+
// and Sonar Pro to the `fast` preset and Sonar Reasoning Pro to `low`
|
|
1250
|
+
// (docs.perplexity.ai/docs/agent-api/migrate-from-sonar/overview).
|
|
1247
1251
|
text("sonar", "Sonar", "sonar", {
|
|
1252
|
+
lifecycle: "deprecated",
|
|
1253
|
+
replacedBy: "perplexity/sonar",
|
|
1248
1254
|
exposure: [],
|
|
1249
1255
|
display: {
|
|
1250
1256
|
provider: "perplexity",
|
|
1251
1257
|
costTier: 1,
|
|
1252
|
-
description: "Perplexity Sonar
|
|
1258
|
+
description: "Perplexity Sonar on Chat Completions, which Perplexity stopped serving on 2026-09-27; calls now fail."
|
|
1253
1259
|
},
|
|
1254
1260
|
capabilities: {
|
|
1255
1261
|
vision: true,
|
|
@@ -1257,11 +1263,13 @@ var TEXT_MODELS = [
|
|
|
1257
1263
|
}
|
|
1258
1264
|
}),
|
|
1259
1265
|
text("sonar-pro", "Sonar Pro", "sonar-pro", {
|
|
1266
|
+
lifecycle: "deprecated",
|
|
1267
|
+
replacedBy: "perplexity/fast",
|
|
1260
1268
|
exposure: [],
|
|
1261
1269
|
display: {
|
|
1262
1270
|
provider: "perplexity",
|
|
1263
1271
|
costTier: 2,
|
|
1264
|
-
description: "Perplexity Sonar Pro
|
|
1272
|
+
description: "Perplexity Sonar Pro on Chat Completions, which Perplexity stopped serving on 2026-09-27; calls now fail."
|
|
1265
1273
|
},
|
|
1266
1274
|
capabilities: {
|
|
1267
1275
|
vision: true,
|
|
@@ -1269,12 +1277,49 @@ var TEXT_MODELS = [
|
|
|
1269
1277
|
}
|
|
1270
1278
|
}),
|
|
1271
1279
|
text("sonar-reasoning-pro", "Sonar Reasoning Pro", "sonar-reasoning-pro", {
|
|
1280
|
+
lifecycle: "deprecated",
|
|
1281
|
+
replacedBy: "perplexity/fast",
|
|
1272
1282
|
exposure: [],
|
|
1273
1283
|
display: {
|
|
1274
1284
|
provider: "perplexity",
|
|
1275
1285
|
costTier: 2,
|
|
1276
|
-
description: "Perplexity Sonar Reasoning Pro
|
|
1286
|
+
description: "Perplexity Sonar Reasoning Pro on Chat Completions, which Perplexity stopped serving on 2026-09-27; calls now fail."
|
|
1287
|
+
},
|
|
1288
|
+
capabilities: {
|
|
1289
|
+
vision: true,
|
|
1290
|
+
contextWindow: 128e3
|
|
1291
|
+
}
|
|
1292
|
+
}),
|
|
1293
|
+
// Sonar as an Agent API model. A bare model searches only when given the web_search
|
|
1294
|
+
// tool, so the row sends it on every call; the answer's sources come from its results.
|
|
1295
|
+
text("perplexity/sonar", "Perplexity Sonar", "perplexity/sonar", {
|
|
1296
|
+
exposure: [],
|
|
1297
|
+
providerOptions: {
|
|
1298
|
+
modelkit: { provider: "perplexity" },
|
|
1299
|
+
perplexity: { tools: [{ type: "web_search" }] }
|
|
1300
|
+
},
|
|
1301
|
+
display: {
|
|
1302
|
+
provider: "perplexity",
|
|
1303
|
+
costTier: 1,
|
|
1304
|
+
description: "Perplexity Sonar on the Agent API with web search, returning answers grounded in cited sources."
|
|
1305
|
+
},
|
|
1306
|
+
// Perplexity publishes no Agent API context window; Sonar's own is 128K.
|
|
1307
|
+
capabilities: {
|
|
1308
|
+
vision: true,
|
|
1309
|
+
contextWindow: 128e3
|
|
1310
|
+
}
|
|
1311
|
+
}),
|
|
1312
|
+
// The Agent API `fast` preset: openai/gpt-5.6-luna with one web search, Perplexity's
|
|
1313
|
+
// recommended replacement for Sonar and Sonar Pro.
|
|
1314
|
+
text("perplexity/fast", "Perplexity Fast", "fast", {
|
|
1315
|
+
exposure: [],
|
|
1316
|
+
providerOptions: { modelkit: { provider: "perplexity" } },
|
|
1317
|
+
display: {
|
|
1318
|
+
provider: "perplexity",
|
|
1319
|
+
costTier: 1,
|
|
1320
|
+
description: "Perplexity Agent API fast preset: a quick web-grounded answer from one search."
|
|
1277
1321
|
},
|
|
1322
|
+
// No published preset window; Sonar's 128K, the size the preset replaces.
|
|
1278
1323
|
capabilities: {
|
|
1279
1324
|
vision: true,
|
|
1280
1325
|
contextWindow: 128e3
|