pi-advisor-flow 0.14.5-dev.2 → 0.14.5-dev.3

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/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ### Added
10
+
11
+ - Support Pi virtual models as Advisor models. Activation defers credentials to Pi's request-time router, which resolves auth for the selected physical model.
12
+
9
13
  ### Changed
10
14
 
11
15
  - Updated development dependencies: Pi packages (`pi-ai`, `pi-coding-agent`, and `pi-tui`) to 1.5.2, Oxlint and plugins to 1.93.0, Knip to 6.45.1, TypeBox to 1.4.6, and Ultracite to 8.2.0. Existing peer dependency ranges remain unchanged.
package/README.md CHANGED
@@ -77,7 +77,7 @@ Reload Pi after installing.
77
77
  /advisor-stats # Show retained outcome adoption and validation stats
78
78
  ```
79
79
 
80
- The Executor is whichever model your Pi session is using; `/advisor` never switches it unless you pin one with `executor=` or `/advisor-models`. On first use, or whenever the saved Advisor is unavailable, `/advisor` opens the available-model picker; it never silently chooses an unconfigured Advisor. If the active Executor and Advisor use the same provider/model, calls and automatic gates are skipped with a notice; switching either model resumes consultations. Turn off **Disable same-model Advisor** in `/advisor-settings` (or set `"advisorDisableSameModel": false` globally) if you intentionally want a higher-effort review from that same model. You can also enable the flow and select both models at once:
80
+ The Executor is whichever model your Pi session is using; `/advisor` never switches it unless you pin one with `executor=` or `/advisor-models`. On first use, or whenever the saved Advisor is unavailable, `/advisor` opens the available-model picker; it never silently chooses an unconfigured Advisor. Pi virtual models can be selected as Advisors; Pi routes each request to a physical model and resolves that model's credentials. If the active Executor and Advisor use the same provider/model, calls and automatic gates are skipped with a notice; switching either model resumes consultations. Turn off **Disable same-model Advisor** in `/advisor-settings` (or set `"advisorDisableSameModel": false` globally) if you intentionally want a higher-effort review from that same model. You can also enable the flow and select both models at once:
81
81
 
82
82
  ```text
83
83
  /advisor executor=openai-codex/gpt-5.6-luna advisor=openai-codex/gpt-5.6-sol
package/dist/index.js CHANGED
@@ -5525,12 +5525,14 @@ var resolveActivationModels = async (runtime, ctx, canContinue) => {
5525
5525
  error: advisorRef ? `Advisor model not found: ${advisorRef}` : "Advisor model not configured"
5526
5526
  };
5527
5527
  }
5528
- const advisorAuth = await ctx.modelRegistry.getApiKeyAndHeaders(advisor);
5529
- if (!canContinue()) {
5530
- return { cancelled: true };
5531
- }
5532
- if (!(advisorAuth.ok && advisorAuth.apiKey)) {
5533
- return { error: `No API key for Advisor ${advisorRef}` };
5528
+ if (advisor.api !== "pi-virtual") {
5529
+ const advisorAuth = await ctx.modelRegistry.getApiKeyAndHeaders(advisor);
5530
+ if (!canContinue()) {
5531
+ return { cancelled: true };
5532
+ }
5533
+ if (!(advisorAuth.ok && advisorAuth.apiKey)) {
5534
+ return { error: `No API key for Advisor ${advisorRef}` };
5535
+ }
5534
5536
  }
5535
5537
  if (executor && !isMarkedSubagent() && !await runtime.setExecutorModel(executor)) {
5536
5538
  return { error: `No API key for Executor ${executorRef}` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-advisor-flow",
3
- "version": "0.14.5-dev.2",
3
+ "version": "0.14.5-dev.3",
4
4
  "description": "Advanced Executor/Advisor flow for Pi, fully configurable and extendable.",
5
5
  "keywords": [
6
6
  "advisor",
@@ -64,14 +64,16 @@ const resolveActivationModels = async (
64
64
  };
65
65
  }
66
66
 
67
- const advisorAuth = await ctx.modelRegistry.getApiKeyAndHeaders(advisor);
67
+ if (advisor.api !== "pi-virtual") {
68
+ const advisorAuth = await ctx.modelRegistry.getApiKeyAndHeaders(advisor);
68
69
 
69
- if (!canContinue()) {
70
- return { cancelled: true };
71
- }
70
+ if (!canContinue()) {
71
+ return { cancelled: true };
72
+ }
72
73
 
73
- if (!(advisorAuth.ok && advisorAuth.apiKey)) {
74
- return { error: `No API key for Advisor ${advisorRef}` };
74
+ if (!(advisorAuth.ok && advisorAuth.apiKey)) {
75
+ return { error: `No API key for Advisor ${advisorRef}` };
76
+ }
75
77
  }
76
78
 
77
79
  if (