@juicesharp/rpiv-advisor 2.6.0 → 2.6.2

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.
Files changed (2) hide show
  1. package/advisor/execute.ts +12 -7
  2. package/package.json +3 -2
@@ -105,7 +105,12 @@ export async function executeAdvisor(
105
105
  if (!auth.ok) {
106
106
  return buildErrorResult(advisorLabel, effort, errMisconfigured(advisorLabel, auth.error), auth.error);
107
107
  }
108
- if (!auth.apiKey) {
108
+ // OAuth-backed providers resolve `{ ok: true }` with no literal apiKey — their
109
+ // credentials are applied inside Pi's runtime facade. A missing key is only
110
+ // fatal on legacy hosts without that facade, where the global completion
111
+ // fallback needs the key passed explicitly.
112
+ const runtimeCompleteSimple = getRuntimeCompleteSimple(ctx.modelRegistry);
113
+ if (!auth.apiKey && !runtimeCompleteSimple) {
109
114
  return buildErrorResult(advisorLabel, effort, errNoApiKey(advisorLabel), errNoApiKeyDetail(advisor.provider));
110
115
  }
111
116
 
@@ -129,12 +134,12 @@ export async function executeAdvisor(
129
134
  });
130
135
 
131
136
  try {
132
- // Prefer Pi's auth-aware runtime facade. Unlike the global compatibility
133
- // function, it runs request preparation and applies credential-derived
134
- // fields such as GitHub Copilot's OAuth-specific baseUrl. Do not pass the
135
- // preflight key/headers to this path: explicit overrides would bypass that
136
- // resolution and reintroduce the endpoint mismatch.
137
- const runtimeCompleteSimple = getRuntimeCompleteSimple(ctx.modelRegistry);
137
+ // Prefer Pi's auth-aware runtime facade (resolved once above, before the
138
+ // missing-key guard). Unlike the global compatibility function, it runs
139
+ // request preparation and applies credential-derived fields such as GitHub
140
+ // Copilot's OAuth-specific baseUrl. Do not pass the preflight key/headers
141
+ // to this path: explicit overrides would bypass that resolution and
142
+ // reintroduce the endpoint mismatch.
138
143
  const completeSimple = runtimeCompleteSimple ?? (await loadCompleteSimple());
139
144
  const requestOptions = runtimeCompleteSimple
140
145
  ? { signal, reasoning: effort }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juicesharp/rpiv-advisor",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "description": "Pi extension. A second opinion the model can request from a stronger reviewer model before it acts.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -40,12 +40,13 @@
40
40
  "LICENSE"
41
41
  ],
42
42
  "pi": {
43
+ "image": "https://raw.githubusercontent.com/juicesharp/rpiv-mono/main/packages/rpiv-advisor/docs/cover.png",
43
44
  "extensions": [
44
45
  "./index.ts"
45
46
  ]
46
47
  },
47
48
  "dependencies": {
48
- "@juicesharp/rpiv-config": "^2.6.0",
49
+ "@juicesharp/rpiv-config": "^2.6.2",
49
50
  "typebox": "^1.1.24"
50
51
  },
51
52
  "peerDependencies": {