pi-smart-router 0.13.0 → 0.14.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/.pi/extensions/smart-router/extension-setup.ts +1 -0
- package/.pi/extensions/smart-router/fleet-bootstrap.ts +51 -1
- package/.pi/extensions/smart-router/planning-delegate.ts +124 -4
- package/.pi/extensions/smart-router/types.ts +3 -0
- package/README.md +25 -0
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +2 -1
- package/dist/config/defaults.js.map +1 -1
- package/dist/domain/pipeline/router-pipeline.d.ts +31 -0
- package/dist/domain/pipeline/router-pipeline.d.ts.map +1 -1
- package/dist/domain/pipeline/router-pipeline.js +125 -3
- package/dist/domain/pipeline/router-pipeline.js.map +1 -1
- package/dist/domain/pricing/quota-window-feed.d.ts +88 -0
- package/dist/domain/pricing/quota-window-feed.d.ts.map +1 -0
- package/dist/domain/pricing/quota-window-feed.js +159 -0
- package/dist/domain/pricing/quota-window-feed.js.map +1 -0
- package/dist/domain/routing/degraded-route-sandwich.d.ts +161 -0
- package/dist/domain/routing/degraded-route-sandwich.d.ts.map +1 -0
- package/dist/domain/routing/degraded-route-sandwich.js +309 -0
- package/dist/domain/routing/degraded-route-sandwich.js.map +1 -0
- package/dist/domain/types/entities.d.ts +40 -0
- package/dist/domain/types/entities.d.ts.map +1 -1
- package/dist/domain/types/index.d.ts +1 -1
- package/dist/domain/types/index.d.ts.map +1 -1
- package/dist/domain/types/schemas.d.ts +29 -2
- package/dist/domain/types/schemas.d.ts.map +1 -1
- package/dist/domain/types/schemas.js +47 -2
- package/dist/domain/types/schemas.js.map +1 -1
- package/dist/infrastructure/telemetry/routing-telemetry.d.ts +15 -4
- package/dist/infrastructure/telemetry/routing-telemetry.d.ts.map +1 -1
- package/dist/infrastructure/telemetry/routing-telemetry.js +21 -6
- package/dist/infrastructure/telemetry/routing-telemetry.js.map +1 -1
- package/package.json +1 -1
- package/src/config/defaults.ts +2 -0
- package/src/domain/pipeline/router-pipeline.ts +159 -3
- package/src/domain/pricing/quota-window-feed.ts +240 -0
- package/src/domain/routing/degraded-route-sandwich.ts +478 -0
- package/src/domain/types/entities.ts +41 -0
- package/src/domain/types/index.ts +1 -0
- package/src/domain/types/schemas.ts +55 -2
- package/src/infrastructure/telemetry/routing-telemetry.ts +39 -3
|
@@ -15,6 +15,13 @@ import {
|
|
|
15
15
|
createOnnxEmbeddingProvider,
|
|
16
16
|
} from '../../../src/domain/matching/hydra-matcher.js';
|
|
17
17
|
import { SessionPinner } from '../../../src/domain/pinning/session-pinner.js';
|
|
18
|
+
import {
|
|
19
|
+
collectPoolModelIds,
|
|
20
|
+
resolveQuotaWindowEstimateConfigFromEnv,
|
|
21
|
+
resolveQuotaWindowPosition,
|
|
22
|
+
type QuotaWindowAdapter,
|
|
23
|
+
type QuotaWindowEstimateConfig,
|
|
24
|
+
} from '../../../src/domain/pricing/quota-window-feed.js';
|
|
18
25
|
import type { ModelProfile, PriceCatalog } from '../../../src/domain/types/index.js';
|
|
19
26
|
import type { QuotaWindowPosition } from '../../../src/domain/types/entities.js';
|
|
20
27
|
import type { OperatorConfig } from '../../../src/domain/types/schemas.js';
|
|
@@ -38,10 +45,51 @@ export interface CreateDispatchOptionsExtras {
|
|
|
38
45
|
readonly operatorConfig?: OperatorConfig;
|
|
39
46
|
/** Live price catalog when fleet discovery has loaded one. */
|
|
40
47
|
readonly priceCatalog?: PriceCatalog | null;
|
|
41
|
-
/** Rolling subscription quota position when available. */
|
|
48
|
+
/** Rolling subscription quota position when available (see resolveQuotaWindowFeedPosition, SP-214). */
|
|
42
49
|
readonly quotaWindowPosition?: QuotaWindowPosition;
|
|
43
50
|
}
|
|
44
51
|
|
|
52
|
+
/** Max telemetry rows scanned for the quota-window burn estimate (SP-214). */
|
|
53
|
+
const QUOTA_FEED_TELEMETRY_LIMIT = 5000;
|
|
54
|
+
|
|
55
|
+
export interface ResolveQuotaWindowFeedDeps {
|
|
56
|
+
/** Optional provider adapter (degrade chain step 1). */
|
|
57
|
+
readonly adapter?: QuotaWindowAdapter;
|
|
58
|
+
/** Estimate config override; defaults to env-resolved config. */
|
|
59
|
+
readonly estimateConfig?: QuotaWindowEstimateConfig;
|
|
60
|
+
readonly now?: Date;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Resolve the pool-level `QuotaWindowPosition` for the fleet via the SP-214
|
|
65
|
+
* degrade chain: adapter → telemetry burn estimate → omit. Returns `undefined`
|
|
66
|
+
* when the fleet has no subscription pool and no adapter, or when the feed is
|
|
67
|
+
* disabled — callers then fall back to flat virtual cost + SP-097 failover.
|
|
68
|
+
*/
|
|
69
|
+
export async function resolveQuotaWindowFeedPosition(
|
|
70
|
+
store: StorePort,
|
|
71
|
+
fleet: readonly ModelProfile[],
|
|
72
|
+
deps?: ResolveQuotaWindowFeedDeps,
|
|
73
|
+
): Promise<QuotaWindowPosition | undefined> {
|
|
74
|
+
const poolModelIds = collectPoolModelIds(fleet);
|
|
75
|
+
if (poolModelIds.size === 0 && !deps?.adapter) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
const estimateConfig =
|
|
79
|
+
deps?.estimateConfig ?? resolveQuotaWindowEstimateConfigFromEnv();
|
|
80
|
+
const entries =
|
|
81
|
+
poolModelIds.size > 0
|
|
82
|
+
? await store.listTelemetry({ limit: QUOTA_FEED_TELEMETRY_LIMIT })
|
|
83
|
+
: [];
|
|
84
|
+
return resolveQuotaWindowPosition({
|
|
85
|
+
adapter: deps?.adapter,
|
|
86
|
+
entries,
|
|
87
|
+
poolModelIds,
|
|
88
|
+
estimateConfig,
|
|
89
|
+
...(deps?.now !== undefined ? { now: deps.now } : {}),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
45
93
|
/** Minimal settings surface used for scoped fleet discovery. */
|
|
46
94
|
export interface ScopedSettingsReader {
|
|
47
95
|
getEnabledModels(): string[] | null | undefined;
|
|
@@ -235,9 +283,11 @@ export async function rebuildFleet(
|
|
|
235
283
|
);
|
|
236
284
|
runtime.priceCatalog = catalog;
|
|
237
285
|
runtime.fleetScopeFingerprint = fingerprint;
|
|
286
|
+
const quotaWindowPosition = await resolveQuotaWindowFeedPosition(runtime.store, fleet);
|
|
238
287
|
const router = createRouterFromFleet(fleet, {
|
|
239
288
|
...createDispatchOptions(runtime.store, runtime.sessionPinner, runtime.hydraMatcher, {
|
|
240
289
|
priceCatalog: catalog,
|
|
290
|
+
...(quotaWindowPosition !== undefined ? { quotaWindowPosition } : {}),
|
|
241
291
|
}),
|
|
242
292
|
lifecycleHookState: runtime.lifecycleHookState,
|
|
243
293
|
});
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
* on compressed context, inject the result as an observation, and keep primary
|
|
6
6
|
* inference on the pinned economical model. Falls back to direct frontier routing
|
|
7
7
|
* when sub-agent spawn is unavailable (pi has no native sub-agent API yet).
|
|
8
|
+
*
|
|
9
|
+
* SP-213 / #120: sub-calls are bounded by a global stage timeout and a per-call
|
|
10
|
+
* worker timeout (llm-use WORKER_GLOBAL_TIMEOUT / WORKER_CALL_TIMEOUT pattern).
|
|
11
|
+
* On timeout the worker is cancelled/abandoned, `planning_delegate_timeout` is
|
|
12
|
+
* recorded, and routing falls back to the direct frontier path — never a hang.
|
|
8
13
|
*/
|
|
9
14
|
|
|
10
15
|
import {
|
|
@@ -22,10 +27,12 @@ import type {
|
|
|
22
27
|
PlanningDelegateObservability,
|
|
23
28
|
RoutingDecision,
|
|
24
29
|
} from '../../../src/domain/types/index.js';
|
|
30
|
+
import { DEFAULT_PLANNING_DELEGATE_CONFIG } from '../../../src/domain/types/schemas.js';
|
|
25
31
|
import {
|
|
26
32
|
createPlanningDelegateObservability,
|
|
27
33
|
enrichRoutingDecisionWithPlanningDelegate,
|
|
28
34
|
PLANNING_DELEGATE,
|
|
35
|
+
PLANNING_DELEGATE_TIMEOUT,
|
|
29
36
|
PLANNING_DELEGATE_UNAVAILABLE,
|
|
30
37
|
PLANNING_DIRECT_FRONTIER,
|
|
31
38
|
} from '../../../src/infrastructure/telemetry/routing-telemetry.js';
|
|
@@ -222,6 +229,65 @@ export interface PlanningDelegateResolution {
|
|
|
222
229
|
readonly usedDelegatePath: boolean;
|
|
223
230
|
}
|
|
224
231
|
|
|
232
|
+
/** Worker telemetry analogs for one planning turn (SP-213, #120). */
|
|
233
|
+
interface DelegateWorkerTelemetry {
|
|
234
|
+
readonly workers_spawned: number;
|
|
235
|
+
readonly workers_succeeded: number;
|
|
236
|
+
readonly worker_timeout_count: number;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Race a delegate sub-call against a bounded timeout (SP-213, #120).
|
|
241
|
+
*
|
|
242
|
+
* On expiry the worker is signalled for cancellation (AbortSignal forwarded to
|
|
243
|
+
* the sub-call options) and abandoned — the race resolves immediately so a
|
|
244
|
+
* stalled worker can never hang TTFT. An outer caller abort is forwarded to
|
|
245
|
+
* the worker as well. No retries and no queue: exactly one worker per call.
|
|
246
|
+
*/
|
|
247
|
+
async function spawnPlanningDelegateWithTimeout(
|
|
248
|
+
spawnFn: PlanningDelegateSpawnFn,
|
|
249
|
+
frontierModel: Model<Api>,
|
|
250
|
+
compressedContext: Context,
|
|
251
|
+
options: SimpleStreamOptions | undefined,
|
|
252
|
+
deps: StreamDelegationDeps,
|
|
253
|
+
timeoutMs: number,
|
|
254
|
+
): Promise<PlanningDelegateSpawnResult> {
|
|
255
|
+
const controller = new AbortController();
|
|
256
|
+
const outerSignal = options?.signal;
|
|
257
|
+
const forwardOuterAbort = (): void => controller.abort();
|
|
258
|
+
if (outerSignal) {
|
|
259
|
+
if (outerSignal.aborted) {
|
|
260
|
+
controller.abort();
|
|
261
|
+
} else {
|
|
262
|
+
outerSignal.addEventListener('abort', forwardOuterAbort, { once: true });
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
267
|
+
try {
|
|
268
|
+
const spawnOptions: SimpleStreamOptions = {
|
|
269
|
+
...(options ?? {}),
|
|
270
|
+
signal: controller.signal,
|
|
271
|
+
};
|
|
272
|
+
const spawnPromise = spawnFn(frontierModel, compressedContext, spawnOptions, deps);
|
|
273
|
+
// Swallow late rejections from an abandoned worker so a timeout never
|
|
274
|
+
// surfaces as an unhandled rejection after the fallback already routed.
|
|
275
|
+
spawnPromise.catch(() => {});
|
|
276
|
+
const timeoutPromise = new Promise<PlanningDelegateSpawnResult>((resolve) => {
|
|
277
|
+
timer = setTimeout(() => {
|
|
278
|
+
controller.abort();
|
|
279
|
+
resolve({ ok: false, reason: PLANNING_DELEGATE_TIMEOUT });
|
|
280
|
+
}, timeoutMs);
|
|
281
|
+
});
|
|
282
|
+
return await Promise.race([spawnPromise, timeoutPromise]);
|
|
283
|
+
} finally {
|
|
284
|
+
if (timer) {
|
|
285
|
+
clearTimeout(timer);
|
|
286
|
+
}
|
|
287
|
+
outerSignal?.removeEventListener('abort', forwardOuterAbort);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
225
291
|
/**
|
|
226
292
|
* Resolve planning delegate path: sub-call + observation injection, or direct frontier fallback.
|
|
227
293
|
*/
|
|
@@ -237,6 +303,10 @@ export async function resolvePlanningDelegatePath(
|
|
|
237
303
|
const observability = decision.features!.planning_delegate!;
|
|
238
304
|
const delegateModelId = observability.delegate_model_id!;
|
|
239
305
|
const primaryModelId = decision.selected_model_id;
|
|
306
|
+
const delegateConfig =
|
|
307
|
+
deps.planningDelegateConfig ?? DEFAULT_PLANNING_DELEGATE_CONFIG;
|
|
308
|
+
// Global stage deadline: bounds compression + sub-call wall-clock (SP-213, #120).
|
|
309
|
+
const globalDeadlineMs = Date.now() + delegateConfig.global_timeout_ms;
|
|
240
310
|
|
|
241
311
|
const frontierProfile = findFleetProfile(deps.fleet, delegateModelId);
|
|
242
312
|
const frontierModel = frontierProfile
|
|
@@ -254,6 +324,7 @@ export async function resolvePlanningDelegatePath(
|
|
|
254
324
|
delegateModelId,
|
|
255
325
|
PLANNING_DELEGATE_UNAVAILABLE,
|
|
256
326
|
deps,
|
|
327
|
+
{ workers_spawned: 0, workers_succeeded: 0, worker_timeout_count: 0 },
|
|
257
328
|
);
|
|
258
329
|
}
|
|
259
330
|
|
|
@@ -262,20 +333,60 @@ export async function resolvePlanningDelegatePath(
|
|
|
262
333
|
observability.compressed_context,
|
|
263
334
|
);
|
|
264
335
|
throwIfAborted(options);
|
|
336
|
+
|
|
337
|
+
const remainingGlobalMs = globalDeadlineMs - Date.now();
|
|
338
|
+
if (remainingGlobalMs <= 0) {
|
|
339
|
+
console.warn(
|
|
340
|
+
'[smart-router] planning delegate global timeout exhausted before sub-call, falling back to direct frontier route',
|
|
341
|
+
delegateModelId,
|
|
342
|
+
);
|
|
343
|
+
return applyPlanningDelegateDirectFallback(
|
|
344
|
+
context,
|
|
345
|
+
decision,
|
|
346
|
+
delegateModelId,
|
|
347
|
+
PLANNING_DELEGATE_TIMEOUT,
|
|
348
|
+
deps,
|
|
349
|
+
{ workers_spawned: 0, workers_succeeded: 0, worker_timeout_count: 1 },
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
|
|
265
353
|
const spawnFn = deps.spawnPlanningDelegate ?? defaultSpawnPlanningDelegate;
|
|
266
|
-
|
|
354
|
+
// Per-call cap, further bounded by the remaining global budget.
|
|
355
|
+
const subCallTimeoutMs = Math.min(
|
|
356
|
+
delegateConfig.sub_call_timeout_ms,
|
|
357
|
+
remainingGlobalMs,
|
|
358
|
+
);
|
|
359
|
+
const spawnResult = await spawnPlanningDelegateWithTimeout(
|
|
360
|
+
spawnFn,
|
|
361
|
+
frontierModel,
|
|
362
|
+
compressedContext,
|
|
363
|
+
options,
|
|
364
|
+
deps,
|
|
365
|
+
subCallTimeoutMs,
|
|
366
|
+
);
|
|
267
367
|
|
|
268
368
|
if (!spawnResult.ok) {
|
|
369
|
+
const timedOut = spawnResult.reason === PLANNING_DELEGATE_TIMEOUT;
|
|
370
|
+
const fallbackReason = timedOut
|
|
371
|
+
? PLANNING_DELEGATE_TIMEOUT
|
|
372
|
+
: PLANNING_DELEGATE_UNAVAILABLE;
|
|
269
373
|
console.warn(
|
|
270
|
-
|
|
374
|
+
timedOut
|
|
375
|
+
? '[smart-router] planning delegate sub-call timed out, falling back to direct frontier route'
|
|
376
|
+
: '[smart-router] planning delegate sub-call failed, falling back to direct frontier route',
|
|
271
377
|
spawnResult.reason,
|
|
272
378
|
);
|
|
273
379
|
return applyPlanningDelegateDirectFallback(
|
|
274
380
|
context,
|
|
275
381
|
decision,
|
|
276
382
|
delegateModelId,
|
|
277
|
-
|
|
383
|
+
fallbackReason,
|
|
278
384
|
deps,
|
|
385
|
+
{
|
|
386
|
+
workers_spawned: 1,
|
|
387
|
+
workers_succeeded: 0,
|
|
388
|
+
worker_timeout_count: timedOut ? 1 : 0,
|
|
389
|
+
},
|
|
279
390
|
);
|
|
280
391
|
}
|
|
281
392
|
|
|
@@ -290,7 +401,12 @@ export async function resolvePlanningDelegatePath(
|
|
|
290
401
|
|
|
291
402
|
return {
|
|
292
403
|
context: injectPlanningDelegateObservation(context, spawnResult.observationText),
|
|
293
|
-
decision,
|
|
404
|
+
decision: enrichRoutingDecisionWithPlanningDelegate(decision, {
|
|
405
|
+
...observability,
|
|
406
|
+
workers_spawned: 1,
|
|
407
|
+
workers_succeeded: 1,
|
|
408
|
+
worker_timeout_count: 0,
|
|
409
|
+
}),
|
|
294
410
|
targetModelId: primaryModelId,
|
|
295
411
|
usedDelegatePath: true,
|
|
296
412
|
};
|
|
@@ -302,6 +418,7 @@ function applyPlanningDelegateDirectFallback(
|
|
|
302
418
|
delegateModelId: string,
|
|
303
419
|
fallbackReason: string,
|
|
304
420
|
deps: StreamDelegationDeps,
|
|
421
|
+
workerTelemetry?: DelegateWorkerTelemetry,
|
|
305
422
|
): PlanningDelegateResolution {
|
|
306
423
|
const profile = findFleetProfile(deps.fleet, delegateModelId);
|
|
307
424
|
const fallbackDecision = enrichRoutingDecisionWithPlanningDelegate(
|
|
@@ -316,6 +433,9 @@ function applyPlanningDelegateDirectFallback(
|
|
|
316
433
|
delegate_model_id: delegateModelId,
|
|
317
434
|
planning_delegate_reason_code: PLANNING_DIRECT_FRONTIER,
|
|
318
435
|
fallback_reason: fallbackReason,
|
|
436
|
+
workers_spawned: workerTelemetry?.workers_spawned ?? null,
|
|
437
|
+
workers_succeeded: workerTelemetry?.workers_succeeded ?? null,
|
|
438
|
+
worker_timeout_count: workerTelemetry?.worker_timeout_count ?? null,
|
|
319
439
|
}),
|
|
320
440
|
);
|
|
321
441
|
|
|
@@ -12,6 +12,7 @@ import { ExecutionLedger } from '../../../src/domain/delegation/execution-ledger
|
|
|
12
12
|
import { SessionPinner } from '../../../src/domain/pinning/session-pinner.js';
|
|
13
13
|
import type {
|
|
14
14
|
ModelProfile,
|
|
15
|
+
PlanningDelegateConfig,
|
|
15
16
|
PriceCatalog,
|
|
16
17
|
RoutingDecision,
|
|
17
18
|
} from '../../../src/domain/types/index.js';
|
|
@@ -60,6 +61,8 @@ export interface StreamDelegationDeps {
|
|
|
60
61
|
delegateStream?: DelegateStreamFn;
|
|
61
62
|
/** Injectable planning delegate sub-call; production uses frontier stream delegate. */
|
|
62
63
|
spawnPlanningDelegate?: PlanningDelegateSpawnFn;
|
|
64
|
+
/** Planning delegate knobs incl. global + per-call timeout bounds (SP-213, #120). */
|
|
65
|
+
readonly planningDelegateConfig?: PlanningDelegateConfig;
|
|
63
66
|
readonly lifecycleHookState?: LifecycleHookState;
|
|
64
67
|
readonly datasetRecorder?: DatasetRecorder;
|
|
65
68
|
readonly outcomeRecorder?: OutcomeRecorder;
|
package/README.md
CHANGED
|
@@ -368,6 +368,8 @@ Cluster IDs are stable reason-code prefixes (`cluster_low_stakes_general`, `clus
|
|
|
368
368
|
| `SMART_ROUTER_PLANNING_DELEGATE_MAX_MESSAGES` | `12` | Compressed-context message cap for frontier sub-call |
|
|
369
369
|
| `SMART_ROUTER_PLANNING_DELEGATE_MAX_TOKENS` | `16384` | Compressed-context token cap for frontier sub-call |
|
|
370
370
|
| `SMART_ROUTER_PLANNING_DELEGATE_EXCLUDE_EXECUTION_HISTORY` | `true` | Exclude tool execution history from delegate payload |
|
|
371
|
+
| `SMART_ROUTER_PLANNING_DELEGATE_GLOBAL_TIMEOUT_MS` | `120000` | Global cap (ms) on the whole planning-delegate stage per planning turn — bounds fan-out wall-clock so a stalled worker cannot hang TTFT ([#120](https://github.com/beettlle/pi-smart-router/issues/120)) |
|
|
372
|
+
| `SMART_ROUTER_PLANNING_DELEGATE_SUB_CALL_TIMEOUT_MS` | `30000` | Per-call cap (ms) on each delegate sub-call worker; on expiry the worker is cancelled/abandoned and routing falls back to direct frontier with `planning_delegate_timeout` ([#120](https://github.com/beettlle/pi-smart-router/issues/120)) |
|
|
371
373
|
| `SMART_ROUTER_PREFIX_CACHE_WEIGHT` | `0.20` | SAAR weight on warm prefix value in cache breakeven math (0–1; [#73](https://github.com/beettlle/pi-smart-router/issues/73)) |
|
|
372
374
|
| `SMART_ROUTER_IDLE_TIMEOUT_SECONDS` | `300` | SAAR idle seconds before pin reopens for full re-route |
|
|
373
375
|
| `SMART_ROUTER_SWITCH_THRESHOLD` | `0.5` | SAAR switch score gate (0–1) for tier upgrades during hard-lock |
|
|
@@ -442,6 +444,25 @@ When a **planning** turn would route primary inference to frontier while a warm
|
|
|
442
444
|
|
|
443
445
|
See [routing-roadmap.md](docs/routing-roadmap.md) §2 P0 and GitHub [#71](https://github.com/beettlle/pi-smart-router/issues/71) for acceptance criteria.
|
|
444
446
|
|
|
447
|
+
### Degraded neural failover sandwich (#119)
|
|
448
|
+
|
|
449
|
+
When the encoder/neural stage (HyDRA) **fails, is misconfigured, or exceeds its latency budget without a selection**, routing fails open through a cheap chain instead of crashing the host agent ([#119](https://github.com/beettlle/pi-smart-router/issues/119)):
|
|
450
|
+
|
|
451
|
+
1. **learned** — optional privacy-safe map keyed by requirement fingerprint (SHA-256 of the rounded requirement vector) or cluster id → preferred tier. **Raw prompt text is never stored.** Exact-key policy: fingerprint match first, cluster id second (no fuzzy matching). Writes are validated (bounded floats, snake_case cluster ids, tier enum) and capped (FIFO eviction) so confounder attacks cannot poison routing memory.
|
|
452
|
+
2. **heuristic** — optional operator **pattern pack** (router_rules-style regex overlay) for known-simple intents. Deny-by-default (no match → no decision) and **fail closed on invalid regex** (the rule is rejected at load and never applies).
|
|
453
|
+
3. **safe_default** — context-fit aware safe economical/frontier default (`degraded_safe_default`).
|
|
454
|
+
|
|
455
|
+
Explain/telemetry expose `route_path` (`neural` \| `learned` \| `heuristic` \| `safe_default`) plus `route_path_confidence` on every decision; degraded decisions carry reason codes `degraded_learned_route`, `degraded_pattern_<rule_id>`, or `degraded_safe_default`. A learned/pattern suggestion toward a cheaper tier is only honored when the cheap tool-use cue estimate is below `pattern_tool_use_ceiling` — a cheap overlay **never alone overrides a predicted capability shortfall**.
|
|
456
|
+
|
|
457
|
+
| Knob (`degraded_route` operator config) | Default | Effect |
|
|
458
|
+
|------|---------|--------|
|
|
459
|
+
| `enabled` | `true` | When `false`, neural failures use the legacy `safe_default` stage pass-through |
|
|
460
|
+
| `learned_min_confidence` | `0.6` | Minimum learned-entry confidence to honor a tier suggestion |
|
|
461
|
+
| `learned_max_entries` | `512` | Learned-map cap per key space (FIFO eviction) |
|
|
462
|
+
| `pattern_tool_use_ceiling` | `0.3` | Tool-use cue ceiling for honoring cheaper-tier learned/pattern suggestions |
|
|
463
|
+
|
|
464
|
+
Distinct from soft heat affinity (healthy-path bias): this is failover / skip-expensive-stage only. Routing remains **pre-generation** — no FrugalGPT-style cascades (see [routing-roadmap.md](docs/routing-roadmap.md) §1).
|
|
465
|
+
|
|
445
466
|
### Virtual cost v2 (v0.5.0 subscription economics)
|
|
446
467
|
|
|
447
468
|
**Virtual cost v2** extends SP-096 flat `quota_cost_per_1m` with deterministic subscription-window economics ([#78](https://github.com/beettlle/pi-smart-router/issues/78)). It inflates effective frontier cost late in a rolling quota window and credits warm prefix-cache value on active pins — without MDP or reinforcement-learning quota policy (SeqRoute HBR+CQL is deferred).
|
|
@@ -462,6 +483,10 @@ See [routing-roadmap.md](docs/routing-roadmap.md) §2 P0 and GitHub [#71](https:
|
|
|
462
483
|
|
|
463
484
|
Rolling-window position is supplied to the router pipeline as `quotaWindowPosition` (library API / telemetry integration). Use `remaining_window_fraction` in `[0, 1]` (1 = full budget). Optionally derive it from elapsed time and consumed quota via `deriveRemainingWindowFraction(elapsed_seconds, consumed_fraction)` in `virtual-cost-v2.ts` (defaults assume a Cursor-style **5h** window).
|
|
464
485
|
|
|
486
|
+
**Quota window feed (producer, [#125](https://github.com/beettlle/pi-smart-router/issues/125))**
|
|
487
|
+
|
|
488
|
+
There is no universal cross-provider "remaining quota" API, so `src/domain/pricing/quota-window-feed.ts` produces the position via an adapter + degrade chain: (1) a provider `QuotaWindowAdapter` when a trustworthy signal exists, (2) a telemetry-derived **pool-level** burn estimate over the rolling window (subscription-pool models = fleet entries with `quota_cost_per_1m`; enabled via `SMART_ROUTER_QUOTA_POOL_BUDGET_TOKENS` + `SMART_ROUTER_QUOTA_WINDOW_SECONDS`), (3) omit → flat virtual cost + SP-097 exhaustion failover. The smart-router extension resolves the feed at fleet rebuild and passes it through `createDispatchOptions` (SP-173 wiring gap closed). Soft bias only — no hard ban at any threshold; SP-097 reactive failover remains the safety net when the feed is missing or stale. Per-model fractions for shared pools are never invented.
|
|
489
|
+
|
|
465
490
|
When `quotaWindowPosition` is omitted, λ stays at 1 and quota premiums are zero — behavior matches SP-096 flat virtual cost.
|
|
466
491
|
|
|
467
492
|
**Operator knobs** (`VirtualCostV2Config` — wire through `RouterPipeline` options today; defaults in `DEFAULT_VIRTUAL_COST_V2_CONFIG`):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,mBAAmB,EACnB,oCAAoC,EACpC,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAEpC,wFAAwF;AACxF,wBAAgB,4BAA4B,CAC1C,IAAI,GAAE,cAAwC,GAC7C,cAAc,CAMhB;AAED,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAiCnD,CAAC"}
|
package/dist/config/defaults.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Operator configuration defaults (FR-021).
|
|
3
3
|
* Values sourced from specs/001-build-smart-router/data-model.md § Configuration (Operator).
|
|
4
4
|
*/
|
|
5
|
-
import { DEFAULT_LOCAL_ZERO_CONFIG, DEFAULT_PLANNING_DELEGATE_CONFIG, DEFAULT_SAAR_CONFIG, resolvePlanningDelegateConfigFromEnv, resolveSaarConfigFromEnv, } from '../domain/types/schemas.js';
|
|
5
|
+
import { DEFAULT_DEGRADED_ROUTE_CONFIG, DEFAULT_LOCAL_ZERO_CONFIG, DEFAULT_PLANNING_DELEGATE_CONFIG, DEFAULT_SAAR_CONFIG, resolvePlanningDelegateConfigFromEnv, resolveSaarConfigFromEnv, } from '../domain/types/schemas.js';
|
|
6
6
|
import { DEFAULT_LOW_INTENSITY_WEIGHTS } from '../domain/routing/tier-features.js';
|
|
7
7
|
export { DEFAULT_LOCAL_ZERO_CONFIG, DEFAULT_PLANNING_DELEGATE_CONFIG, DEFAULT_SAAR_CONFIG, resolvePlanningDelegateConfigFromEnv, resolveSaarConfigFromEnv, } from '../domain/types/schemas.js';
|
|
8
8
|
/** Merge operator env overrides onto defaults (SAAR and planning delegate sections). */
|
|
@@ -44,6 +44,7 @@ export const DEFAULT_OPERATOR_CONFIG = {
|
|
|
44
44
|
saar: DEFAULT_SAAR_CONFIG,
|
|
45
45
|
planning_delegate: DEFAULT_PLANNING_DELEGATE_CONFIG,
|
|
46
46
|
local_zero: DEFAULT_LOCAL_ZERO_CONFIG,
|
|
47
|
+
degraded_route: DEFAULT_DEGRADED_ROUTE_CONFIG,
|
|
47
48
|
pin_only_fallback: false,
|
|
48
49
|
};
|
|
49
50
|
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,mBAAmB,EACnB,oCAAoC,EACpC,wBAAwB,GAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,mBAAmB,EACnB,oCAAoC,EACpC,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAEpC,wFAAwF;AACxF,MAAM,UAAU,4BAA4B,CAC1C,OAAuB,uBAAuB;IAE9C,OAAO;QACL,GAAG,IAAI;QACP,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;QACzC,iBAAiB,EAAE,oCAAoC,CAAC,IAAI,CAAC,iBAAiB,CAAC;KAChF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAA6B;IAC/D,SAAS,EAAE;QACT,WAAW,EAAE,GAAG;QAChB,cAAc,EAAE,GAAG;QACnB,gBAAgB,EAAE,IAAI;KACvB;IACD,eAAe,EAAE;QACf,SAAS,EAAE,CAAC;KACb;IACD,OAAO,EAAE;QACP,cAAc,EAAE,EAAE;KACnB;IACD,KAAK,EAAE;QACL,kBAAkB,EAAE,EAAE;QACtB,4BAA4B,EAAE,CAAC;QAC/B,qBAAqB,EAAE,EAAE;KAC1B;IACD,KAAK,EAAE;QACL,mBAAmB,EAAE,0BAA0B;QAC/C,OAAO,EAAE,QAAQ;QACjB,WAAW,EAAE,oBAAoB;KAClC;IACD,aAAa,EAAE;QACb,OAAO,EAAE,6BAA6B;QACtC,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE,GAAG;KACrB;IACD,IAAI,EAAE,mBAAmB;IACzB,iBAAiB,EAAE,gCAAgC;IACnD,UAAU,EAAE,yBAAyB;IACrC,iBAAiB,EAAE,KAAK;CAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,gCAAgC,EAChC,mBAAmB,EACnB,oCAAoC,EACpC,wBAAwB,GAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,mBAAmB,EACnB,oCAAoC,EACpC,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAEpC,wFAAwF;AACxF,MAAM,UAAU,4BAA4B,CAC1C,OAAuB,uBAAuB;IAE9C,OAAO;QACL,GAAG,IAAI;QACP,IAAI,EAAE,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;QACzC,iBAAiB,EAAE,oCAAoC,CAAC,IAAI,CAAC,iBAAiB,CAAC;KAChF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAA6B;IAC/D,SAAS,EAAE;QACT,WAAW,EAAE,GAAG;QAChB,cAAc,EAAE,GAAG;QACnB,gBAAgB,EAAE,IAAI;KACvB;IACD,eAAe,EAAE;QACf,SAAS,EAAE,CAAC;KACb;IACD,OAAO,EAAE;QACP,cAAc,EAAE,EAAE;KACnB;IACD,KAAK,EAAE;QACL,kBAAkB,EAAE,EAAE;QACtB,4BAA4B,EAAE,CAAC;QAC/B,qBAAqB,EAAE,EAAE;KAC1B;IACD,KAAK,EAAE;QACL,mBAAmB,EAAE,0BAA0B;QAC/C,OAAO,EAAE,QAAQ;QACjB,WAAW,EAAE,oBAAoB;KAClC;IACD,aAAa,EAAE;QACb,OAAO,EAAE,6BAA6B;QACtC,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE,GAAG;KACrB;IACD,IAAI,EAAE,mBAAmB;IACzB,iBAAiB,EAAE,gCAAgC;IACnD,UAAU,EAAE,yBAAyB;IACrC,cAAc,EAAE,6BAA6B;IAC7C,iBAAiB,EAAE,KAAK;CAChB,CAAC"}
|
|
@@ -21,6 +21,7 @@ import type { LoopEscalationConfig } from '../pinning/loop-escalation.js';
|
|
|
21
21
|
import { RoutingTelemetryEmitter } from '../../infrastructure/telemetry/routing-telemetry.js';
|
|
22
22
|
import type { HydraMatcher as HydraMatcherType } from '../matching/hydra-matcher.js';
|
|
23
23
|
import type { ClusterMatcher, ClusterMatchResult } from '../matching/cluster-matcher.js';
|
|
24
|
+
import { type CompiledPatternPack, type DegradedRouteConfig, type LearnedRouteStore } from '../routing/degraded-route-sandwich.js';
|
|
24
25
|
import { type IsotonicCalibratorArtifact } from '../routing/isotonic-calibrator.js';
|
|
25
26
|
import { type PSuccessWeights } from '../routing/p-success-classifier.js';
|
|
26
27
|
export interface StageResult {
|
|
@@ -87,6 +88,12 @@ export interface PipelineOptions {
|
|
|
87
88
|
readonly throughputMeter?: ThroughputMeter;
|
|
88
89
|
/** Pre-local_zero tool-use capability gate (SP-177, #98). */
|
|
89
90
|
readonly localZeroConfig?: LocalZeroConfig;
|
|
91
|
+
/** Degraded neural failover sandwich knobs (SP-212, #119). */
|
|
92
|
+
readonly degradedRouteConfig?: DegradedRouteConfig;
|
|
93
|
+
/** Privacy-safe learned map for the degraded sandwich (SP-212, #119). */
|
|
94
|
+
readonly learnedRouteStore?: LearnedRouteStore;
|
|
95
|
+
/** Compiled operator pattern pack overlay for the degraded sandwich (SP-212, #119). */
|
|
96
|
+
readonly patternPack?: CompiledPatternPack;
|
|
90
97
|
}
|
|
91
98
|
export declare class RouterPipeline {
|
|
92
99
|
private readonly stages;
|
|
@@ -124,6 +131,9 @@ export declare class RouterPipeline {
|
|
|
124
131
|
private currentPlanningDelegate;
|
|
125
132
|
/** Explicit local_zero gate skip reasons for tier-selection telemetry (SP-164). */
|
|
126
133
|
private currentLocalZeroGateSkipReasons;
|
|
134
|
+
/** Degraded sandwich route path for explain/telemetry (SP-212, #119). */
|
|
135
|
+
private currentRoutePath;
|
|
136
|
+
private currentRoutePathConfidence;
|
|
127
137
|
constructor(fleet: readonly ModelProfile[], options?: PipelineOptions);
|
|
128
138
|
route(request: RoutingRequest, fleetOverride?: readonly ModelProfile[]): Promise<RoutingDecision>;
|
|
129
139
|
/**
|
|
@@ -141,6 +151,12 @@ export declare class RouterPipeline {
|
|
|
141
151
|
private logPipelineError;
|
|
142
152
|
private redactPromptFromError;
|
|
143
153
|
private emitPipelineErrorTelemetry;
|
|
154
|
+
/**
|
|
155
|
+
* Resolve route_path classification for telemetry/explain (SP-212, #119).
|
|
156
|
+
* Degraded/neural paths set currentRoutePath explicitly; other stages map
|
|
157
|
+
* to heuristic (deterministic rules) or safe_default (fallback stage).
|
|
158
|
+
*/
|
|
159
|
+
private resolveRoutePathTelemetry;
|
|
144
160
|
/** Step 7: emit routing telemetry after decision (T040). */
|
|
145
161
|
private emitTelemetry;
|
|
146
162
|
private withEstimatedCost;
|
|
@@ -235,7 +251,22 @@ export declare class RouterPipeline {
|
|
|
235
251
|
* Step 5: HyDRA embedding matcher for ambiguous prompts (T050).
|
|
236
252
|
* Scores fleet candidates via embedding cosine similarity with shortfall gate.
|
|
237
253
|
* Pass-through when no matcher is configured.
|
|
254
|
+
*
|
|
255
|
+
* SP-212 / #119: encoder/neural errors and budget overruns with no selection
|
|
256
|
+
* fail open through the degraded sandwich (learned → pattern → safe default)
|
|
257
|
+
* instead of throwing to the host.
|
|
238
258
|
*/
|
|
239
259
|
private hydraMatcher;
|
|
260
|
+
/**
|
|
261
|
+
* SP-212 / #119 degraded sandwich stage: learned map → operator pattern pack
|
|
262
|
+
* → safe default. Never throws; falls through to the legacy safe_default
|
|
263
|
+
* stage when disabled or when no degraded path can select a model.
|
|
264
|
+
*/
|
|
265
|
+
private degradedRouteStage;
|
|
266
|
+
/**
|
|
267
|
+
* Record the neural decision into the learned map (SP-212). Keys are the
|
|
268
|
+
* requirement fingerprint and/or cluster id — never raw prompt text.
|
|
269
|
+
*/
|
|
270
|
+
private recordLearnedRoute;
|
|
240
271
|
}
|
|
241
272
|
//# sourceMappingURL=router-pipeline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router-pipeline.d.ts","sourceRoot":"","sources":["../../../src/domain/pipeline/router-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EAEtB,YAAY,
|
|
1
|
+
{"version":3,"file":"router-pipeline.d.ts","sourceRoot":"","sources":["../../../src/domain/pipeline/router-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EAEtB,YAAY,EAEZ,eAAe,EAEf,cAAc,EACd,UAAU,EACV,IAAI,EAEL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEpG,OAAO,KAAK,EAAE,mBAAmB,EAAuB,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAC5H,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAI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