@mcowger/pi-plexus 1.8.1 → 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 +27 -3
- 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
|
@@ -677,7 +677,6 @@ var ULTRAFAST_FAMILIES = [/^gpt-6(?:\.\d+)?-astra(?=$|-)/i, /^gpt-5\.6-sol(?=$|-
|
|
|
677
677
|
var OPENAI_RESPONSES_DIALECT = {
|
|
678
678
|
id: "openai-responses",
|
|
679
679
|
apis: OPENAI_RESPONSES_APIS,
|
|
680
|
-
parameter: "service_tier",
|
|
681
680
|
tiers: ["priority", "flex", "ultrafast"],
|
|
682
681
|
supportsModel: isPriorityEligible,
|
|
683
682
|
supportsTier(modelId, tier) {
|
|
@@ -689,9 +688,34 @@ var OPENAI_RESPONSES_DIALECT = {
|
|
|
689
688
|
case "ultrafast":
|
|
690
689
|
return ULTRAFAST_FAMILIES.some((pattern) => pattern.test(modelId));
|
|
691
690
|
}
|
|
691
|
+
},
|
|
692
|
+
inject(payload, _modelId, tier) {
|
|
693
|
+
return { ...payload, service_tier: tier };
|
|
692
694
|
}
|
|
693
695
|
};
|
|
694
|
-
var
|
|
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 };
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
var SERVICE_TIER_DIALECTS = [
|
|
716
|
+
OPENAI_RESPONSES_DIALECT,
|
|
717
|
+
ANTHROPIC_MESSAGES_DIALECT
|
|
718
|
+
];
|
|
695
719
|
function dialectForApi(api, dialects = SERVICE_TIER_DIALECTS) {
|
|
696
720
|
if (!api)
|
|
697
721
|
return;
|
|
@@ -716,7 +740,7 @@ function applyServiceTier(payload, model, tier, options) {
|
|
|
716
740
|
}
|
|
717
741
|
if (!payload || typeof payload !== "object" || Array.isArray(payload))
|
|
718
742
|
return payload;
|
|
719
|
-
return
|
|
743
|
+
return dialect.inject(payload, model.id, tier);
|
|
720
744
|
}
|
|
721
745
|
var SERVICE_TIER_NOTIFICATION_TYPE = "plexus.serviceTier";
|
|
722
746
|
var SERVICE_TIER_COMMAND = "service-tier";
|