@mcowger/pi-plexus 1.2.1 → 1.2.3
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/extension.js +6 -3
- package/package.json +1 -1
package/dist/extension.js
CHANGED
|
@@ -63,7 +63,10 @@ function resolveContextWindow(model) {
|
|
|
63
63
|
}
|
|
64
64
|
function resolveMaxTokens(model, contextWindow) {
|
|
65
65
|
const v = model.top_provider?.max_completion_tokens ?? null;
|
|
66
|
-
|
|
66
|
+
if (v == null || v < 100) {
|
|
67
|
+
return 32768;
|
|
68
|
+
}
|
|
69
|
+
return v;
|
|
67
70
|
}
|
|
68
71
|
function resolvePricingTiers(model) {
|
|
69
72
|
const pricing = model.pricing;
|
|
@@ -415,12 +418,12 @@ async function writeLogLine(message, data) {
|
|
|
415
418
|
}
|
|
416
419
|
|
|
417
420
|
// src/mapper.ts
|
|
418
|
-
import {
|
|
421
|
+
import { getModel } from "@earendil-works/pi-ai/compat";
|
|
419
422
|
function descriptorToPiModel(descriptor) {
|
|
420
423
|
let builtinModel;
|
|
421
424
|
if (descriptor.piProvider && descriptor.piModel) {
|
|
422
425
|
try {
|
|
423
|
-
builtinModel =
|
|
426
|
+
builtinModel = getModel(descriptor.piProvider, descriptor.piModel);
|
|
424
427
|
} catch {
|
|
425
428
|
builtinModel = undefined;
|
|
426
429
|
}
|