@mcowger/pi-plexus 1.8.0 → 1.9.0
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 +7 -2
- package/dist/extension.js +37 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -139,13 +139,18 @@ Inspect the effective URL, authentication availability, and catalog source witho
|
|
|
139
139
|
/plexus status
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
Choose the per-session
|
|
142
|
+
Choose the per-session service tier for eligible Plexus models:
|
|
143
143
|
|
|
144
144
|
```
|
|
145
145
|
/service-tier fast
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
Tiers are `default` (aliases `off`, `none`), `fast` (alias `priority`), `flex`, and `ultrafast`; `/service-tier status` reports the active tier and whether the current model supports it.
|
|
148
|
+
Tiers are `default` (aliases `off`, `none`), `fast` (alias `priority`), `flex`, and `ultrafast`; `/service-tier status` reports the active tier and whether the current model supports it. The tier is applied per API:
|
|
149
|
+
|
|
150
|
+
- **OpenAI Responses** models get a `service_tier` field. `priority` covers OpenAI's Fast-mode set (GPT-5 and newer, GPT-4.1+, GPT-4o, and o3/o4-mini); `flex` and `ultrafast` are limited to their documented models.
|
|
151
|
+
- **Anthropic Messages** models use Claude Fast mode (`speed: "fast"` plus the `anthropic-beta: fast-mode-2026-02-01` flag) for `priority`, on `claude-opus-5` and `claude-opus-4-8`; `flex` and `ultrafast` are unsupported. This is a first-party research-preview feature, so it only works when the upstream allows it.
|
|
152
|
+
|
|
153
|
+
The tier resets to `default` on every session start. `/plexus-service-tier` is an alias for the same command.
|
|
149
154
|
|
|
150
155
|
Select a Plexus model in `/model`. Save its startup default with the host's normal model-picker action; Plexus does not maintain a separate default-model setting.
|
|
151
156
|
|
package/dist/extension.js
CHANGED
|
@@ -665,12 +665,18 @@ function isPriorityEligible(modelId) {
|
|
|
665
665
|
}
|
|
666
666
|
return PRIORITY_EXTRA_FAMILIES.some((pattern) => pattern.test(id));
|
|
667
667
|
}
|
|
668
|
-
|
|
669
|
-
|
|
668
|
+
function isFlexEligible(modelId) {
|
|
669
|
+
const match = GPT_VERSION.exec(modelId.trim());
|
|
670
|
+
if (!match)
|
|
671
|
+
return false;
|
|
672
|
+
const major = Number(match[1]);
|
|
673
|
+
const minor = match[2] === undefined ? 0 : Number(match[2]);
|
|
674
|
+
return major > 5 || major === 5 && minor >= 5;
|
|
675
|
+
}
|
|
676
|
+
var ULTRAFAST_FAMILIES = [/^gpt-6(?:\.\d+)?-astra(?=$|-)/i, /^gpt-5\.6-sol(?=$|-)/i];
|
|
670
677
|
var OPENAI_RESPONSES_DIALECT = {
|
|
671
678
|
id: "openai-responses",
|
|
672
679
|
apis: OPENAI_RESPONSES_APIS,
|
|
673
|
-
parameter: "service_tier",
|
|
674
680
|
tiers: ["priority", "flex", "ultrafast"],
|
|
675
681
|
supportsModel: isPriorityEligible,
|
|
676
682
|
supportsTier(modelId, tier) {
|
|
@@ -678,13 +684,38 @@ var OPENAI_RESPONSES_DIALECT = {
|
|
|
678
684
|
case "priority":
|
|
679
685
|
return isPriorityEligible(modelId);
|
|
680
686
|
case "flex":
|
|
681
|
-
return
|
|
687
|
+
return isFlexEligible(modelId);
|
|
682
688
|
case "ultrafast":
|
|
683
689
|
return ULTRAFAST_FAMILIES.some((pattern) => pattern.test(modelId));
|
|
684
690
|
}
|
|
691
|
+
},
|
|
692
|
+
inject(payload, _modelId, tier) {
|
|
693
|
+
return { ...payload, service_tier: tier };
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
var ANTHROPIC_MESSAGES_APIS = ["anthropic-messages"];
|
|
697
|
+
var ANTHROPIC_FAST_MODE_BETA = "fast-mode-2026-02-01";
|
|
698
|
+
var CLAUDE_FAST_FAMILIES = [/^claude-opus-5(?=$|-)/i, /^claude-opus-4-8(?=$|-)/i];
|
|
699
|
+
var ANTHROPIC_MESSAGES_DIALECT = {
|
|
700
|
+
id: "anthropic-messages",
|
|
701
|
+
apis: ANTHROPIC_MESSAGES_APIS,
|
|
702
|
+
tiers: ["priority"],
|
|
703
|
+
supportsModel(modelId) {
|
|
704
|
+
return /^claude-/i.test(modelId.trim());
|
|
705
|
+
},
|
|
706
|
+
supportsTier(modelId, tier) {
|
|
707
|
+
return tier === "priority" && CLAUDE_FAST_FAMILIES.some((pattern) => pattern.test(modelId.trim()));
|
|
708
|
+
},
|
|
709
|
+
inject(payload, _modelId, _tier) {
|
|
710
|
+
const existing = Array.isArray(payload.betas) ? payload.betas.filter((beta) => typeof beta === "string") : [];
|
|
711
|
+
const betas = existing.includes(ANTHROPIC_FAST_MODE_BETA) ? existing : [...existing, ANTHROPIC_FAST_MODE_BETA];
|
|
712
|
+
return { ...payload, speed: "fast", betas };
|
|
685
713
|
}
|
|
686
714
|
};
|
|
687
|
-
var SERVICE_TIER_DIALECTS = [
|
|
715
|
+
var SERVICE_TIER_DIALECTS = [
|
|
716
|
+
OPENAI_RESPONSES_DIALECT,
|
|
717
|
+
ANTHROPIC_MESSAGES_DIALECT
|
|
718
|
+
];
|
|
688
719
|
function dialectForApi(api, dialects = SERVICE_TIER_DIALECTS) {
|
|
689
720
|
if (!api)
|
|
690
721
|
return;
|
|
@@ -709,7 +740,7 @@ function applyServiceTier(payload, model, tier, options) {
|
|
|
709
740
|
}
|
|
710
741
|
if (!payload || typeof payload !== "object" || Array.isArray(payload))
|
|
711
742
|
return payload;
|
|
712
|
-
return
|
|
743
|
+
return dialect.inject(payload, model.id, tier);
|
|
713
744
|
}
|
|
714
745
|
var SERVICE_TIER_NOTIFICATION_TYPE = "plexus.serviceTier";
|
|
715
746
|
var SERVICE_TIER_COMMAND = "service-tier";
|