github-router 0.3.317 → 0.3.319

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.
@@ -515,6 +515,34 @@ const LUNA_SCOUT_ALIAS_ID = "gh-router-luna-scout-high";
515
515
  * with an explicit stale-alias error instead of silently changing semantics. */
516
516
  const LUNA_IMPLEMENTER_ALIAS_ID = "gh-router-luna-implementer-max";
517
517
  const FAST_CRITIC_ALIAS_ID = "gh-router-fast-critic-medium";
518
+ /**
519
+ * Cheap-family subagent aliases (`-m cheap`/`-m cheap1m`). Router-owned,
520
+ * non-catalog identities: Claude Code resolves a bare REAL model id against
521
+ * the live catalog and upgrades Task subagents to `[1m]` accounting when the
522
+ * entry advertises >=1M, defeating the cheap family's whole 200K cost lever.
523
+ * An alias matches no catalog entry, so the client holds the 200K default and
524
+ * the proxy canonicalizes to the real id upstream with the alias's fixed
525
+ * effort. `absentEffortDefault` mirrors `CHEAP_PROFILE_NATIVE_EFFORTS` per
526
+ * role (a drift test pins this). Emitted BARE (no `[1m]`) by
527
+ * `buildCheapProfileAgentDefinitions`.
528
+ */
529
+ const CHEAP_EXPLORE_ALIAS_ID = "gh-router-cheap-explore-high";
530
+ const CHEAP_PLAN_ALIAS_ID = "gh-router-cheap-plan-high";
531
+ const CHEAP_GENERAL_PURPOSE_ALIAS_ID = "gh-router-cheap-general-purpose-max";
532
+ const CHEAP_IMPLEMENTER_ALIAS_ID = "gh-router-cheap-implementer-high";
533
+ const CHEAP_REVIEWER_ALIAS_ID = "gh-router-cheap-reviewer-max";
534
+ /**
535
+ * Cheapest-profile subagent aliases (`-m cheapest`). Same non-catalog
536
+ * mechanism as the cheap aliases above, with the cheapest roster's own
537
+ * identities and efforts (`CHEAPEST_PROFILE_NATIVE_MODELS` /
538
+ * `CHEAPEST_PROFILE_NATIVE_EFFORTS`, pinned by a drift test). Emitted BARE by
539
+ * `buildCheapestProfileAgentDefinitions`.
540
+ */
541
+ const CHEAPEST_EXPLORE_ALIAS_ID = "gh-router-cheapest-explore-high";
542
+ const CHEAPEST_PLAN_ALIAS_ID = "gh-router-cheapest-plan-high";
543
+ const CHEAPEST_GENERAL_PURPOSE_ALIAS_ID = "gh-router-cheapest-general-purpose-xhigh";
544
+ const CHEAPEST_IMPLEMENTER_ALIAS_ID = "gh-router-cheapest-implementer-max";
545
+ const CHEAPEST_REVIEWER_ALIAS_ID = "gh-router-cheapest-reviewer-high";
518
546
  const LUNA_SONNET_ALIAS_ID = "gh-router-luna-sonnet-xhigh";
519
547
  /**
520
548
  * Router-owned alias id for the fast profile's Haiku-tier row
@@ -583,6 +611,56 @@ const MODEL_ALIAS_TABLE = /* @__PURE__ */ new Map([
583
611
  aliasId: LUNA_HAIKU_ALIAS_ID,
584
612
  realModel: LUNA_REAL_MODEL_ID,
585
613
  absentEffortDefault: "high"
614
+ }],
615
+ [CHEAP_EXPLORE_ALIAS_ID, {
616
+ aliasId: CHEAP_EXPLORE_ALIAS_ID,
617
+ realModel: CHEAP_PROFILE_MODELS.explore,
618
+ absentEffortDefault: "high"
619
+ }],
620
+ [CHEAP_PLAN_ALIAS_ID, {
621
+ aliasId: CHEAP_PLAN_ALIAS_ID,
622
+ realModel: CHEAP_PROFILE_MODELS.plan,
623
+ absentEffortDefault: "high"
624
+ }],
625
+ [CHEAP_GENERAL_PURPOSE_ALIAS_ID, {
626
+ aliasId: CHEAP_GENERAL_PURPOSE_ALIAS_ID,
627
+ realModel: CHEAP_PROFILE_MODELS["general-purpose"],
628
+ absentEffortDefault: "max"
629
+ }],
630
+ [CHEAP_IMPLEMENTER_ALIAS_ID, {
631
+ aliasId: CHEAP_IMPLEMENTER_ALIAS_ID,
632
+ realModel: CHEAP_PROFILE_MODELS.implementer,
633
+ absentEffortDefault: "high"
634
+ }],
635
+ [CHEAP_REVIEWER_ALIAS_ID, {
636
+ aliasId: CHEAP_REVIEWER_ALIAS_ID,
637
+ realModel: CHEAP_PROFILE_MODELS.reviewer,
638
+ absentEffortDefault: "max"
639
+ }],
640
+ [CHEAPEST_EXPLORE_ALIAS_ID, {
641
+ aliasId: CHEAPEST_EXPLORE_ALIAS_ID,
642
+ realModel: CHEAPEST_PROFILE_MODELS.explore,
643
+ absentEffortDefault: "high"
644
+ }],
645
+ [CHEAPEST_PLAN_ALIAS_ID, {
646
+ aliasId: CHEAPEST_PLAN_ALIAS_ID,
647
+ realModel: CHEAPEST_PROFILE_MODELS.plan,
648
+ absentEffortDefault: "high"
649
+ }],
650
+ [CHEAPEST_GENERAL_PURPOSE_ALIAS_ID, {
651
+ aliasId: CHEAPEST_GENERAL_PURPOSE_ALIAS_ID,
652
+ realModel: CHEAPEST_PROFILE_MODELS["general-purpose"],
653
+ absentEffortDefault: "xhigh"
654
+ }],
655
+ [CHEAPEST_IMPLEMENTER_ALIAS_ID, {
656
+ aliasId: CHEAPEST_IMPLEMENTER_ALIAS_ID,
657
+ realModel: CHEAPEST_PROFILE_MODELS.implementer,
658
+ absentEffortDefault: "max"
659
+ }],
660
+ [CHEAPEST_REVIEWER_ALIAS_ID, {
661
+ aliasId: CHEAPEST_REVIEWER_ALIAS_ID,
662
+ realModel: CHEAPEST_PROFILE_MODELS.reviewer,
663
+ absentEffortDefault: "high"
586
664
  }]
587
665
  ]);
588
666
  /**
@@ -2213,7 +2291,7 @@ function collectToolFieldKeys(body) {
2213
2291
  //#endregion
2214
2292
  //#region package.json
2215
2293
  var name = "github-router";
2216
- var version = "0.3.317";
2294
+ var version = "0.3.319";
2217
2295
  //#endregion
2218
2296
  //#region src/lib/approval.ts
2219
2297
  const awaitApproval = async () => {
@@ -5045,9 +5123,7 @@ async function handleNonClaudeResponses(c, opts) {
5045
5123
  return stream;
5046
5124
  }
5047
5125
  const payload = parsedToResponsesPayload(parsed);
5048
- const result = await createResponses(payload, opts.model?.requestHeaders, void 0, true);
5049
- extractAndRecordAic(opts.modelId, result);
5050
- const anthropic = responsesResponseToAnthropicMessage(result, opts.modelId);
5126
+ const anthropic = responsesResponseToAnthropicMessage(await createResponses(payload, opts.model?.requestHeaders, void 0, true), opts.modelId);
5051
5127
  const usage = anthropic.usage;
5052
5128
  logRequest({
5053
5129
  method: "POST",
@@ -5103,9 +5179,7 @@ async function handleNonClaudeChat(c, opts) {
5103
5179
  return stream;
5104
5180
  }
5105
5181
  const payload = parsedToChatPayload(parsed);
5106
- const result = await createChatCompletions(payload, opts.model?.requestHeaders, void 0, true);
5107
- extractAndRecordAic(opts.modelId, result);
5108
- const anthropic = chatResponseToAnthropicMessage(result, opts.modelId);
5182
+ const anthropic = chatResponseToAnthropicMessage(await createChatCompletions(payload, opts.model?.requestHeaders, void 0, true), opts.modelId);
5109
5183
  const usage = anthropic.usage;
5110
5184
  logRequest({
5111
5185
  method: "POST",
@@ -7710,6 +7784,6 @@ function getCodexEnvVars(serverUrl) {
7710
7784
  return vars;
7711
7785
  }
7712
7786
  //#endregion
7713
- export { validateMaxProfileLaunch as C, updateClaude as E, validateFastProfilePrerequisites as S, checkClaudeVersion as T, profileDescriptor as _, sharedServerArgs as a, validateCheapProfilePrerequisites as b, stopKeepAwake as c, enableFileLogging as d, LUNA_SCOUT_ALIAS_ID as f, formatFastPrerequisiteFailure as g, formatCheapestPrerequisiteFailure as h, setupAndServe as i, injectModelPickerSettingsFile as l, formatCheapPrerequisiteFailure as m, getCodexEnvVars as n, LAUNCH_SECRET_HEADER as o, formatCheap1mPrerequisiteFailure as p, parseSharedArgs as r, startKeepAwake as s, getClaudeCodeEnvVars as t, listModelsForEndpoint as u, resolveLaunchProfile as v, runSelfUpdate as w, validateCheapestProfilePrerequisites as x, validateCheap1mProfilePrerequisites as y };
7787
+ export { validateCheapProfilePrerequisites as A, formatCheap1mPrerequisiteFailure as C, profileDescriptor as D, formatFastPrerequisiteFailure as E, checkClaudeVersion as F, updateClaude as I, validateFastProfilePrerequisites as M, validateMaxProfileLaunch as N, resolveLaunchProfile as O, runSelfUpdate as P, LUNA_SCOUT_ALIAS_ID as S, formatCheapestPrerequisiteFailure as T, CHEAP_EXPLORE_ALIAS_ID as _, sharedServerArgs as a, CHEAP_PLAN_ALIAS_ID as b, stopKeepAwake as c, enableFileLogging as d, CHEAPEST_EXPLORE_ALIAS_ID as f, CHEAPEST_REVIEWER_ALIAS_ID as g, CHEAPEST_PLAN_ALIAS_ID as h, setupAndServe as i, validateCheapestProfilePrerequisites as j, validateCheap1mProfilePrerequisites as k, injectModelPickerSettingsFile as l, CHEAPEST_IMPLEMENTER_ALIAS_ID as m, getCodexEnvVars as n, LAUNCH_SECRET_HEADER as o, CHEAPEST_GENERAL_PURPOSE_ALIAS_ID as p, parseSharedArgs as r, startKeepAwake as s, getClaudeCodeEnvVars as t, listModelsForEndpoint as u, CHEAP_GENERAL_PURPOSE_ALIAS_ID as v, formatCheapPrerequisiteFailure as w, CHEAP_REVIEWER_ALIAS_ID as x, CHEAP_IMPLEMENTER_ALIAS_ID as y };
7714
7788
 
7715
- //# sourceMappingURL=server-setup-0PaS4m2B.js.map
7789
+ //# sourceMappingURL=server-setup-DPay_uYp.js.map