@flashbacktech/tsclient 0.4.65 → 0.4.66
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/index.cjs +15 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1471,6 +1471,13 @@ var PlatformAdminClient = class {
|
|
|
1471
1471
|
});
|
|
1472
1472
|
return unwrapData(res);
|
|
1473
1473
|
}
|
|
1474
|
+
/** Models the aigateway currently exposes (for validating selection/pricing). */
|
|
1475
|
+
async listAvailableModels() {
|
|
1476
|
+
const res = await this.http.get(
|
|
1477
|
+
"/admin/available-models"
|
|
1478
|
+
);
|
|
1479
|
+
return unwrapData(res);
|
|
1480
|
+
}
|
|
1474
1481
|
// --- Chat-model selection (bridged to cloud-agent) ---
|
|
1475
1482
|
/** Current model selection (provider priority + per-provider/role models). */
|
|
1476
1483
|
async getModelSelection() {
|
|
@@ -1497,7 +1504,7 @@ var PlatformAdminClient = class {
|
|
|
1497
1504
|
);
|
|
1498
1505
|
return unwrapData(res).pricing ?? [];
|
|
1499
1506
|
}
|
|
1500
|
-
/** Upsert one model_pricing row. Returns the fresh list. */
|
|
1507
|
+
/** Upsert one model_pricing row (also used to add a new row). Returns the fresh list. */
|
|
1501
1508
|
async putModelPricing(row) {
|
|
1502
1509
|
const res = await this.http.put(
|
|
1503
1510
|
"/admin/model-pricing",
|
|
@@ -1505,6 +1512,13 @@ var PlatformAdminClient = class {
|
|
|
1505
1512
|
);
|
|
1506
1513
|
return unwrapData(res).pricing ?? [];
|
|
1507
1514
|
}
|
|
1515
|
+
/** Delete a model_pricing row by model id. Returns the fresh list. */
|
|
1516
|
+
async deleteModelPricing(model) {
|
|
1517
|
+
const res = await this.http.delete(
|
|
1518
|
+
`/admin/model-pricing?model=${encodeURIComponent(model)}`
|
|
1519
|
+
);
|
|
1520
|
+
return unwrapData(res).pricing ?? [];
|
|
1521
|
+
}
|
|
1508
1522
|
};
|
|
1509
1523
|
|
|
1510
1524
|
// src/client.ts
|