@mcowger/pi-plexus 1.3.4 → 1.3.5
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/README.md +1 -0
- package/dist/extension.js +2 -15
- package/package.json +5 -5
package/README.md
CHANGED
package/dist/extension.js
CHANGED
|
@@ -447,29 +447,16 @@ var PROVIDER_API_KEY_TEMPLATE = "${PLEXUS_API_KEY}";
|
|
|
447
447
|
var PLEXUS_CREDENTIAL_EXPIRES_AT = 253402300799000;
|
|
448
448
|
var PLACEHOLDER_BASE_URL = "http://localhost/v1";
|
|
449
449
|
var currentModels = [];
|
|
450
|
-
|
|
450
|
+
function plexusExtension(pi) {
|
|
451
451
|
const envApiKey = getEnvApiKey();
|
|
452
452
|
const startupBaseUrl = getBaseUrl();
|
|
453
|
-
const modelsUrl = getModelsUrl();
|
|
454
453
|
log("startup", { baseUrl: startupBaseUrl, hasEnvApiKey: !!envApiKey });
|
|
455
|
-
let startupModels = [];
|
|
456
|
-
if (envApiKey && modelsUrl && startupBaseUrl && process.env.PI_OFFLINE === undefined) {
|
|
457
|
-
try {
|
|
458
|
-
const { models: apiModels, raw } = await fetchPlexusModels(envApiKey, modelsUrl);
|
|
459
|
-
startupModels = convertDescriptors(apiModels, startupBaseUrl).map(descriptorToPiModel);
|
|
460
|
-
currentModels = startupModels;
|
|
461
|
-
await writeRawResponse(raw);
|
|
462
|
-
log("startup: fetched", { count: startupModels.length });
|
|
463
|
-
} catch (error) {
|
|
464
|
-
log("startup: fetch failed", { error: String(error) });
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
454
|
pi.registerProvider(PROVIDER_NAME, {
|
|
468
455
|
api: "openai-completions",
|
|
469
456
|
...envApiKey ? { apiKey: PROVIDER_API_KEY_TEMPLATE } : {},
|
|
470
457
|
authHeader: true,
|
|
471
458
|
baseUrl: startupBaseUrl ?? PLACEHOLDER_BASE_URL,
|
|
472
|
-
models:
|
|
459
|
+
models: [],
|
|
473
460
|
refreshModels: refreshPlexusModels,
|
|
474
461
|
oauth: createPlexusLoginProvider()
|
|
475
462
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcowger/pi-plexus",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "Plexus AI proxy plugin for the pi coding agent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"build": "bun run build.ts"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@earendil-works/pi-ai": ">=0.
|
|
29
|
-
"@earendil-works/pi-coding-agent": ">=0.
|
|
28
|
+
"@earendil-works/pi-ai": ">=0.81.0",
|
|
29
|
+
"@earendil-works/pi-coding-agent": ">=0.81.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@earendil-works/pi-ai": "^0.
|
|
33
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
32
|
+
"@earendil-works/pi-ai": "^0.81.0",
|
|
33
|
+
"@earendil-works/pi-coding-agent": "^0.81.0",
|
|
34
34
|
"@types/bun": "latest"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|