@mcowger/pi-plexus 1.4.10 → 1.4.11

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 CHANGED
@@ -50,7 +50,7 @@ function matchesPattern(id, name, shortId, pattern) {
50
50
  }
51
51
  // ../plexus-models/src/convert.ts
52
52
  var REASONING_PARAMS = new Set(["reasoning", "include_reasoning", "reasoning_effort"]);
53
- 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;
53
+ 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;
54
54
  var API_DIALECT_MAP = {
55
55
  chat_completions: "openai-completions",
56
56
  "openai-completions": "openai-completions",
@@ -174,15 +174,17 @@ function isChatModel(model) {
174
174
  return false;
175
175
  }
176
176
  const outputModalities = model.architecture?.output_modalities;
177
- if (outputModalities !== undefined && !outputModalities.includes("text"))
177
+ if (outputModalities !== undefined && (outputModalities.length === 0 || outputModalities.some((m) => m !== "text"))) {
178
178
  return false;
179
+ }
179
180
  const modality = model.architecture?.modality;
180
181
  if (modality?.includes("->")) {
181
182
  const input = modality.split("->")[0] ?? "";
182
183
  if (!input.toLowerCase().includes("text"))
183
184
  return false;
184
185
  const output = modality.split("->").at(-1) ?? "";
185
- if (!output.toLowerCase().includes("text"))
186
+ const outputTokens = output.toLowerCase().split(/[+,]/).map((t) => t.trim()).filter((t) => t.length > 0);
187
+ if (outputTokens.length === 0 || outputTokens.some((t) => t !== "text"))
186
188
  return false;
187
189
  }
188
190
  const apiHints = Array.isArray(model.preferred_api) ? model.preferred_api.join(" ") : model.preferred_api ?? "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcowger/pi-plexus",
3
- "version": "1.4.10",
3
+ "version": "1.4.11",
4
4
  "description": "Plexus AI proxy plugin for the pi coding agent",
5
5
  "type": "module",
6
6
  "files": [