@mcowger/oh-my-pi-plexus 1.4.10 → 1.4.12
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 +5 -3
- package/package.json +1 -1
package/dist/extension.js
CHANGED
|
@@ -109289,7 +109289,7 @@ function matchesPattern(id, name, shortId, pattern) {
|
|
|
109289
109289
|
}
|
|
109290
109290
|
// ../plexus-models/src/convert.ts
|
|
109291
109291
|
var REASONING_PARAMS = new Set(["reasoning", "include_reasoning", "reasoning_effort"]);
|
|
109292
|
-
var NON_CHAT_PATTERN = /(?:^|[\W_])(?:embed(?:ding|dings)?|transcri(?:be[ds]?|ptions?)|whisper|speech[\W_]*to[\W_]*text|stt|text[\W_]*to[\W_]*speech|tts|image[\W_]*(?:gen(?:eration)?|\d+)
|
|
109292
|
+
var NON_CHAT_PATTERN = /(?:^|[\W_])(?:embed(?:ding|dings)?|transcri(?:be[ds]?|ptions?)|whisper|speech[\W_]*to[\W_]*text|stt|text[\W_]*to[\W_]*speech|tts|image(?:[\W_]*(?:gen(?:eration)?|\d+))?|diffusion|dall[\W_]*e|stable[\W_]*diffusion|sdxl|dream)(?:$|[\W_])/i;
|
|
109293
109293
|
var API_DIALECT_MAP = {
|
|
109294
109294
|
chat_completions: "openai-completions",
|
|
109295
109295
|
"openai-completions": "openai-completions",
|
|
@@ -109413,15 +109413,17 @@ function isChatModel(model) {
|
|
|
109413
109413
|
return false;
|
|
109414
109414
|
}
|
|
109415
109415
|
const outputModalities = model.architecture?.output_modalities;
|
|
109416
|
-
if (outputModalities !== undefined &&
|
|
109416
|
+
if (outputModalities !== undefined && (outputModalities.length === 0 || outputModalities.some((m) => m !== "text"))) {
|
|
109417
109417
|
return false;
|
|
109418
|
+
}
|
|
109418
109419
|
const modality = model.architecture?.modality;
|
|
109419
109420
|
if (modality?.includes("->")) {
|
|
109420
109421
|
const input = modality.split("->")[0] ?? "";
|
|
109421
109422
|
if (!input.toLowerCase().includes("text"))
|
|
109422
109423
|
return false;
|
|
109423
109424
|
const output = modality.split("->").at(-1) ?? "";
|
|
109424
|
-
|
|
109425
|
+
const outputTokens = output.toLowerCase().split(/[+,]/).map((t) => t.trim()).filter((t) => t.length > 0);
|
|
109426
|
+
if (outputTokens.length === 0 || outputTokens.some((t) => t !== "text"))
|
|
109425
109427
|
return false;
|
|
109426
109428
|
}
|
|
109427
109429
|
const apiHints = Array.isArray(model.preferred_api) ? model.preferred_api.join(" ") : model.preferred_api ?? "";
|