agl 43.5.0 → 43.7.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/changelog.md +16 -0
- package/dist_serve/bundle.js +1843 -1825
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.accountsactions.d.ts +3 -1
- package/dist_ts/classes.accountsactions.js +17 -1
- package/dist_ts/classes.controller.d.ts +3 -3
- package/dist_ts/classes.controller.js +5 -4
- package/dist_ts/classes.inferencerouter.d.ts +21 -3
- package/dist_ts/classes.inferencerouter.js +40 -17
- package/dist_ts/classes.inferenceservice.js +2 -2
- package/dist_ts/functions.inferencecli.js +2 -1
- package/dist_ts/interfaces.auth.d.ts +1 -1
- package/dist_ts/interfaces.auth.js +2 -1
- package/dist_ts/plugins.d.ts +2 -1
- package/dist_ts/plugins.js +4 -2
- package/dist_ts_authswitch/authority-contract.d.ts +26 -0
- package/dist_ts_authswitch/authority-contract.js +1 -1
- package/dist_ts_authswitch/authority-overview.d.ts +8 -0
- package/dist_ts_authswitch/authority-overview.js +10 -4
- package/dist_ts_authswitch/authority-placement.d.ts +16 -9
- package/dist_ts_authswitch/authority-placement.js +10 -7
- package/dist_ts_authswitch/authority-priority.d.ts +20 -0
- package/dist_ts_authswitch/authority-priority.js +21 -0
- package/dist_ts_authswitch/classes.authoritybroker.d.ts +7 -0
- package/dist_ts_authswitch/classes.authoritybroker.js +26 -2
- package/dist_ts_authswitch/classes.authoritycli.d.ts +1 -0
- package/dist_ts_authswitch/classes.authoritycli.js +43 -3
- package/dist_ts_authswitch/classes.authorityclient.d.ts +6 -1
- package/dist_ts_authswitch/classes.authorityclient.js +12 -4
- package/dist_ts_authswitch/classes.authoritydaemon.js +7 -1
- package/dist_ts_authswitch/classes.authoritydatabase.d.ts +6 -0
- package/dist_ts_authswitch/classes.authoritydatabase.js +13 -2
- package/dist_ts_authswitch/classes.authoritymodels.d.ts +7 -0
- package/dist_ts_authswitch/classes.authoritymodels.js +17 -8
- package/dist_ts_interfaces/requests.accounts.d.ts +19 -0
- package/dist_ts_interfaces/requests.accounts.js +1 -1
- package/dist_ts_interfaces/requests.d.ts +2 -2
- package/dist_ts_interfaces/requests.js +1 -1
- package/docs/authswitch.md +25 -0
- package/package.json +1 -1
- package/readme.md +29 -5
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.accountsactions.ts +25 -0
- package/ts/classes.controller.ts +4 -3
- package/ts/classes.inferencerouter.ts +61 -16
- package/ts/classes.inferenceservice.ts +1 -1
- package/ts/functions.inferencecli.ts +1 -0
- package/ts/interfaces.auth.ts +1 -0
- package/ts/plugins.ts +3 -0
- package/ts_authswitch/authority-contract.ts +21 -0
- package/ts_authswitch/authority-overview.ts +19 -5
- package/ts_authswitch/authority-placement.ts +18 -10
- package/ts_authswitch/authority-priority.ts +25 -0
- package/ts_authswitch/classes.authoritybroker.ts +26 -1
- package/ts_authswitch/classes.authoritycli.ts +48 -2
- package/ts_authswitch/classes.authorityclient.ts +14 -4
- package/ts_authswitch/classes.authoritydaemon.ts +8 -1
- package/ts_authswitch/classes.authoritydatabase.ts +11 -1
- package/ts_authswitch/classes.authoritymodels.ts +17 -6
- package/ts_authswitch/readme.md +1 -1
- package/ts_interfaces/requests.accounts.ts +17 -0
- package/ts_interfaces/requests.ts +2 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/accounts.plugins.ts +4 -2
- package/ts_web/classes.accountsreadmodel.ts +64 -10
- package/ts_web/elements.accounts.ts +48 -0
|
@@ -39,6 +39,12 @@ export interface IInferenceAccount {
|
|
|
39
39
|
* without one. Placement only: a window's usage counts as spent by the next renewal (`authSwitchPlacement`).
|
|
40
40
|
*/
|
|
41
41
|
renewsAt: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* When the owner's priority on the account ends (`IAuthSwitchAccount.priorityUntil`, AGL-1809); `null` without one.
|
|
44
|
+
* While it holds at the moment of placing (`authSwitchPriorityActive`), a new session goes to the account before any
|
|
45
|
+
* account of the pool without one, as long as it takes the request (`inferencePlacementOrder`).
|
|
46
|
+
*/
|
|
47
|
+
priorityUntil: string | null;
|
|
42
48
|
/**
|
|
43
49
|
* An API key's monthly spend limit in micro-dollars (`IAuthSwitchAccount.spendLimitMicroUsd`); `null` without one,
|
|
44
50
|
* and for a sign-in. It decides only whether a key whose spend the proxy holds no reading of may take work: one with
|
|
@@ -351,6 +357,11 @@ export interface IInferenceAccountStatus {
|
|
|
351
357
|
* without one. Placement ignores it while the account has a lapse date. A proxy of an earlier AGL reports none.
|
|
352
358
|
*/
|
|
353
359
|
renewal?: plugins.authswitchRenewal.IAuthSwitchRenewal | null;
|
|
360
|
+
/**
|
|
361
|
+
* When the owner's priority on the account ends, while it holds now (`IInferenceAccount.priorityUntil`), or `null`: the
|
|
362
|
+
* account ranks before every account without one. A proxy of an earlier AGL reports none.
|
|
363
|
+
*/
|
|
364
|
+
priorityUntil?: string | null;
|
|
354
365
|
/** The account's placement score in percent per hour (`IAuthSwitchPlacement.score`); `null` without a counted window. */
|
|
355
366
|
placementScore: number | null;
|
|
356
367
|
/**
|
|
@@ -565,6 +576,13 @@ export declare class InferenceRouter {
|
|
|
565
576
|
* goes back to a ChatGPT account as soon as one can take its request, and the route says so (`returned`).
|
|
566
577
|
*/
|
|
567
578
|
acquire(modelIdArg: string, policyArg: IInferenceRoutingPolicy, signalArg: AbortSignal, optionsArg?: IInferenceAcquireOptions): Promise<IInferenceRoute>;
|
|
579
|
+
/**
|
|
580
|
+
* The accounts of the pool a session on `pinnedArg`, of a later credential tier, returns to (`returnToBetterTier`): those
|
|
581
|
+
* of a better tier, as a new session would be placed. A session on a priority account (AGL-1809) returns only to a
|
|
582
|
+
* priority account of a better tier, since a new session would go to its own account before any account without one;
|
|
583
|
+
* a priority is judged now.
|
|
584
|
+
*/
|
|
585
|
+
private betterTier;
|
|
568
586
|
/** `acquire` among `accountsArg`, the pool's accounts or those of its better tiers. */
|
|
569
587
|
private routeOpenAi;
|
|
570
588
|
/**
|
|
@@ -624,9 +642,9 @@ export declare class InferenceRouter {
|
|
|
624
642
|
*/
|
|
625
643
|
private rejectApiKey;
|
|
626
644
|
/**
|
|
627
|
-
* The candidate a request goes to -- of the best credential tier, then by
|
|
628
|
-
* (`
|
|
629
|
-
* account as its one candidate, so the order only ever places new sessions. An account at its reserve is refused like one at its limit, and the refusal names the reserve. A pinned account
|
|
645
|
+
* The candidate a request goes to -- a priority account before any other, then of the best credential tier, then by
|
|
646
|
+
* the placement order (`inferencePlacementOrder`) -- or the refusal that says why there is none. A pinned request has
|
|
647
|
+
* its session's account as its one candidate, so the order only ever places new sessions. An account at its reserve is refused like one at its limit, and the refusal names the reserve. A pinned account
|
|
630
648
|
* that takes no request for a reason of its own (`refusal`) is refused with that account and reason.
|
|
631
649
|
*/
|
|
632
650
|
private select;
|