github-router 0.3.297 → 0.3.302
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/dist/{attribution-settings-B70GmZ68.js → attribution-settings-B1xutIts.js} +146 -10
- package/dist/attribution-settings-B1xutIts.js.map +1 -0
- package/dist/{auth-CluG5e-l.js → auth-CpjOjoUG.js} +4 -3
- package/dist/{auth-CluG5e-l.js.map → auth-CpjOjoUG.js.map} +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/{check-usage-iOzfnKJe.js → check-usage-BsN3S4Fu.js} +4 -4
- package/dist/{check-usage-iOzfnKJe.js.map → check-usage-BsN3S4Fu.js.map} +1 -1
- package/dist/{claude-DMMfvfns.js → claude-uRuzEH0W.js} +130 -78
- package/dist/claude-uRuzEH0W.js.map +1 -0
- package/dist/{codex-DVOyVv2B.js → codex-D5ag-liR.js} +6 -5
- package/dist/{codex-DVOyVv2B.js.map → codex-D5ag-liR.js.map} +1 -1
- package/dist/{debug-DsEwleGg.js → debug-BXRPyeqO.js} +2 -2
- package/dist/{debug-DsEwleGg.js.map → debug-BXRPyeqO.js.map} +1 -1
- package/dist/engine-2uMJ4Isk.js +2 -0
- package/dist/{gate-discovery-G6PAG61j.js → gate-discovery-BTRVyKWu.js} +5 -5
- package/dist/{gate-discovery-G6PAG61j.js.map → gate-discovery-BTRVyKWu.js.map} +1 -1
- package/dist/{get-copilot-usage-B7Z4XVWj.js → get-copilot-usage-ByjQqhdi.js} +3 -2
- package/dist/{get-copilot-usage-B7Z4XVWj.js.map → get-copilot-usage-ByjQqhdi.js.map} +1 -1
- package/dist/hooks.mjs +287 -5
- package/dist/hooks.sha256 +1 -1
- package/dist/{internal-artifact-open-D6tKMg8v.js → internal-artifact-open-DRSxShAW.js} +2 -2
- package/dist/{internal-artifact-open-D6tKMg8v.js.map → internal-artifact-open-DRSxShAW.js.map} +1 -1
- package/dist/{internal-fast-dispatch-guard-N-RaLrOn.js → internal-fast-dispatch-guard-CYOWbxjX.js} +1 -1
- package/dist/{internal-fast-dispatch-guard-Bkr_iGOu.js → internal-fast-dispatch-guard-D2HcfXZv.js} +2 -2
- package/dist/{internal-fast-dispatch-guard-Bkr_iGOu.js.map → internal-fast-dispatch-guard-D2HcfXZv.js.map} +1 -1
- package/dist/{internal-first-mate-guard-C9BV7J4U.js → internal-first-mate-guard-Bcb5JwiO.js} +3 -3
- package/dist/{internal-first-mate-guard-C9BV7J4U.js.map → internal-first-mate-guard-Bcb5JwiO.js.map} +1 -1
- package/dist/{internal-first-mate-guard-WJApyc8j.js → internal-first-mate-guard-Brh_uois.js} +1 -1
- package/dist/internal-max-dispatch-guard-Bcjavapx.js +2 -0
- package/dist/internal-max-dispatch-guard-BjSVXMvC.js +198 -0
- package/dist/internal-max-dispatch-guard-BjSVXMvC.js.map +1 -0
- package/dist/{internal-plan-review-t3PuNfuL.js → internal-plan-review-DVY-iV2x.js} +3 -3
- package/dist/{internal-plan-review-t3PuNfuL.js.map → internal-plan-review-DVY-iV2x.js.map} +1 -1
- package/dist/{internal-prompt-submit-C3KovHQG.js → internal-prompt-submit-BTqRn4FW.js} +4 -4
- package/dist/{internal-prompt-submit-C3KovHQG.js.map → internal-prompt-submit-BTqRn4FW.js.map} +1 -1
- package/dist/{internal-session-bind-d2uoja8I.js → internal-session-bind-YfH656lt.js} +2 -2
- package/dist/{internal-session-bind-d2uoja8I.js.map → internal-session-bind-YfH656lt.js.map} +1 -1
- package/dist/{internal-stop-hook-BjzrF1zd.js → internal-stop-hook-BZg__ab6.js} +5 -5
- package/dist/{internal-stop-hook-BjzrF1zd.js.map → internal-stop-hook-BZg__ab6.js.map} +1 -1
- package/dist/{internal-stop-review-YtDUGXpX.js → internal-stop-review-B8MmEyQ1.js} +2 -2
- package/dist/{internal-stop-review-YtDUGXpX.js.map → internal-stop-review-B8MmEyQ1.js.map} +1 -1
- package/dist/{internal-worker-guard-CdkeS9PN.js → internal-worker-guard-Dr6W83TC.js} +2 -2
- package/dist/{internal-worker-guard-CdkeS9PN.js.map → internal-worker-guard-Dr6W83TC.js.map} +1 -1
- package/dist/{internal-workspace-header-tuBXJV22.js → internal-workspace-header-Cep0WSIb.js} +2 -2
- package/dist/{internal-workspace-header-tuBXJV22.js.map → internal-workspace-header-Cep0WSIb.js.map} +1 -1
- package/dist/lifecycle-4TZrJuAa.js +2 -0
- package/dist/{lifecycle-CM9eTzvk.js → lifecycle-CmPJ6e_6.js} +2 -2
- package/dist/{lifecycle-CM9eTzvk.js.map → lifecycle-CmPJ6e_6.js.map} +1 -1
- package/dist/{lifecycle-Bg6doY3-.js → lifecycle-DgsJ_8Am.js} +2 -2
- package/dist/{lifecycle-Bg6doY3-.js.map → lifecycle-DgsJ_8Am.js.map} +1 -1
- package/dist/lifecycle-O91Vzzb-.js +2 -0
- package/dist/main.js +19 -18
- package/dist/main.js.map +1 -1
- package/dist/max-profile-contract-BTXowh6k.js +264 -0
- package/dist/max-profile-contract-BTXowh6k.js.map +1 -0
- package/dist/{mcp-workspace-header-dERl2YTT.js → mcp-workspace-header-NzFD0Wgd.js} +2 -2
- package/dist/{mcp-workspace-header-dERl2YTT.js.map → mcp-workspace-header-NzFD0Wgd.js.map} +1 -1
- package/dist/{models-DZ4hYsR7.js → models-1KwEUgzd.js} +3 -3
- package/dist/{models-DZ4hYsR7.js.map → models-1KwEUgzd.js.map} +1 -1
- package/dist/{orchestration-BiGCEwbH.js → orchestration-CYyp9w-t.js} +2 -2
- package/dist/{orchestration-BiGCEwbH.js.map → orchestration-CYyp9w-t.js.map} +1 -1
- package/dist/paths-DDAiPVto.js +2 -0
- package/dist/{paths-Ci485qSJ.js → paths-IcZW8gZx.js} +4 -4
- package/dist/{paths-Ci485qSJ.js.map → paths-IcZW8gZx.js.map} +1 -1
- package/dist/{peer-mcp-personas-ce6_YMnX.js → peer-mcp-personas-DwEiYeJS.js} +423 -186
- package/dist/peer-mcp-personas-DwEiYeJS.js.map +1 -0
- package/dist/{plan-review-hook-DuW0pSoM.js → plan-review-hook-szSNt6uU.js} +3 -3
- package/dist/{plan-review-hook-DuW0pSoM.js.map → plan-review-hook-szSNt6uU.js.map} +1 -1
- package/dist/{prompt-submit-hook-IMl7ssfr.js → prompt-submit-hook-ZUxo_jEl.js} +3 -3
- package/dist/{prompt-submit-hook-IMl7ssfr.js.map → prompt-submit-hook-ZUxo_jEl.js.map} +1 -1
- package/dist/{provision-BhCtm3md.js → provision-BLT1pCFy.js} +4 -4
- package/dist/{provision-BhCtm3md.js.map → provision-BLT1pCFy.js.map} +1 -1
- package/dist/{self-invocation-DAB_od0C.js → self-invocation-BJWbA8ka.js} +2 -2
- package/dist/{self-invocation-DAB_od0C.js.map → self-invocation-BJWbA8ka.js.map} +1 -1
- package/dist/{serve-Blj_dRSr.js → serve-wEZoOijw.js} +13 -12
- package/dist/{serve-Blj_dRSr.js.map → serve-wEZoOijw.js.map} +1 -1
- package/dist/{server-setup-DhG3YZPj.js → server-setup-Zn5wkosb.js} +213 -37
- package/dist/server-setup-Zn5wkosb.js.map +1 -0
- package/dist/{start-8QaqICtd.js → start-DSqU8d8h.js} +3 -3
- package/dist/{start-8QaqICtd.js.map → start-DSqU8d8h.js.map} +1 -1
- package/dist/state-B8adscCv.js +51 -0
- package/dist/state-B8adscCv.js.map +1 -0
- package/dist/{stop-gate-hook-DQnh_KfI.js → stop-gate-hook-CJOk28zd.js} +3 -3
- package/dist/{stop-gate-hook-DQnh_KfI.js.map → stop-gate-hook-CJOk28zd.js.map} +1 -1
- package/dist/{stop-gate-policy-DMr3KVmw.js → stop-gate-policy-zhzRIj6G.js} +2 -2
- package/dist/{stop-gate-policy-DMr3KVmw.js.map → stop-gate-policy-zhzRIj6G.js.map} +1 -1
- package/dist/{token-BtJhjXXu.js → token-CbuFyx-B.js} +4 -50
- package/dist/token-CbuFyx-B.js.map +1 -0
- package/dist/{worker-dispatch-BEHkTbnH.js → worker-dispatch-DgP5yT26.js} +2 -2
- package/dist/{worker-dispatch-BEHkTbnH.js.map → worker-dispatch-DgP5yT26.js.map} +1 -1
- package/package.json +1 -1
- package/dist/attribution-settings-B70GmZ68.js.map +0 -1
- package/dist/claude-DMMfvfns.js.map +0 -1
- package/dist/engine-BkGRuUNs.js +0 -2
- package/dist/lifecycle-CGLt1cJQ.js +0 -2
- package/dist/lifecycle-DoUwpVDB.js +0 -2
- package/dist/paths-GD7bgGGy.js +0 -2
- package/dist/peer-mcp-personas-ce6_YMnX.js.map +0 -1
- package/dist/server-setup-DhG3YZPj.js.map +0 -1
- package/dist/token-BtJhjXXu.js.map +0 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as UNKNOWN_EFFORT_ANCHOR, $t as countTokens, An as BUDGET_SMALL_FAST_SLUG, B as resolveAdvisorEffort, Bt as MAX_LUNA_HIGH_ALIAS_ID, Cn as provisionTreeSitterAssets, D as toolbeltEnabled, F as ADVISOR_TOOL_INSTRUCTIONS, Fn as UPSTREAM_FETCH_TIMEOUT_MS, Ft as LUNA_HAIKU_ALIAS_ID, G as repairRejectedThinkingHistory, Gn as oneMContextDisabled, Gt as maxAliasEffort, H as formatThinkingRepairDecline, Hn as upstreamMaxConnections, Ht as canonicalizeAliasModel, I as FAST_ADVISOR_TOOL_INSTRUCTIONS, In as UPSTREAM_INACTIVITY_TIMEOUT_MS, J as isControllerClosedError, Jn as withInstallLock, K as buildAnthropicErrorEvent, Kn as withOneMSuffix, Kt as maxAliasModel, L as buildAdvisorStream, Ln as generateRandomPort, Lt as LUNA_REAL_MODEL_ID, N as searchWeb, On as toolbeltPathOverride, P as ADVISOR_INTERNAL_TOOL_NAME, Pt as LUNA_DRIVER_ALIAS_ID, Q as EFFORT_ORDER, Qt as shimDefaultsToXhigh, R as injectAdvisorTool, Rn as isBudgetClaudeLead, U as rememberThinkingHistoryRepair, Un as classifyMessagesRoute, V as resolveAdvisorModel, Vn as upstreamAllowH2, Vt as MAX_LUNA_MAX_ALIAS_ID, W as repairKnownThinkingHistory, Wn as catalogAdvertises1M, Wt as isMaxModelAlias, X as readIteratorWithTimeout, Y as logStreamError, Yt as resolveModelAlias, Z as relayAnthropicStream, cn as warnOnTokenPriceDrift, dn as createChatCompletions, en as createMessages, et as bucketEffort, fn as MAX_RESPONSE_BODY_BYTES, hn as normalizeOpenAIUsage, i as assertMcpToolSurfaceConsistent, in as findLaunchBySecret, ln as resolveMcpToolTimeoutMs, lt as agentToolsEnabled, mn as parseJsonOrDiagnose, nn as getTokenCount, nt as handleMcpDelete, pn as readResponseBodyCapped, q as buildOpenAIErrorEvent, qn as withOneMSuffixForLead, rn as getTokenizerFromModel, rt as handleMcpPost, sn as assembleResponsesPayload, tn as getTextTokenCount, tt as clampEffort, un as createResponses, z as isAdvisorRequested, zt as LUNA_SONNET_ALIAS_ID } from "./peer-mcp-personas-DwEiYeJS.js";
|
|
2
2
|
import { t as getPackageVersion } from "./version-C8x2hQrZ.js";
|
|
3
|
-
import { i as ensurePaths, t as PATHS } from "./paths-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
3
|
+
import { i as ensurePaths, t as PATHS } from "./paths-IcZW8gZx.js";
|
|
4
|
+
import { t as state } from "./state-B8adscCv.js";
|
|
5
|
+
import { T as copilotHeaders, _ as forwardError, a as cacheCopilotVersion, c as filterBetaHeader, d as resolveModel, f as sleep, g as HTTPError, i as tryRefreshAndRetry, l as isNullish, n as setupGitHubAgentToken, o as cacheModels, r as setupGitHubToken, s as cacheVSCodeVersion, t as setupCopilotToken, w as copilotBaseUrl, y as fetchWithTransientRetry } from "./token-CbuFyx-B.js";
|
|
6
|
+
import { t as getCopilotUsage } from "./get-copilot-usage-ByjQqhdi.js";
|
|
6
7
|
import { a as resolveExecutable, n as killManagedTree, o as runCommandCapture, r as parseBoolEnv, s as runCommandVoid } from "./exec-y8C_MU8A.js";
|
|
7
8
|
import { r as FAST_PROFILE_ADVISOR_MODEL } from "./fast-profile-contract-K3P58nj3.js";
|
|
9
|
+
import { b as stripTrailingOneMSuffix, d as maxAdvisorPinIsValid, i as MAX_PROFILE_MODELS, l as maxAdvisorEffortForModel, m as maxOpusModel, n as MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS, t as MAX_PROFILE_ADVISOR_INSTRUCTIONS, u as maxAdvisorModelFromPin } from "./max-profile-contract-BTXowh6k.js";
|
|
8
10
|
import consola from "consola";
|
|
9
11
|
import * as fs$2 from "node:fs";
|
|
10
12
|
import fs, { existsSync } from "node:fs";
|
|
@@ -1090,7 +1092,7 @@ const CLIENT_OUTPUT_RESERVE_TOKENS = 2e4;
|
|
|
1090
1092
|
/**
|
|
1091
1093
|
* The client's additional flat reserve between the output-reduced window and
|
|
1092
1094
|
* its reactive compaction threshold. Read from the installed Claude Code
|
|
1093
|
-
* 2.1.
|
|
1095
|
+
* 2.1.251 bundle: `E9(e,t)` computes `r = e - 13000` and returns it when no
|
|
1094
1096
|
* percentage override is set, where `e` is already
|
|
1095
1097
|
* `window - min(maxOutput, 20_000)`.
|
|
1096
1098
|
*/
|
|
@@ -1099,7 +1101,9 @@ const CLIENT_THRESHOLD_RESERVE_TOKENS = 13e3;
|
|
|
1099
1101
|
* Bounds the `CLAUDE_CODE_AUTO_COMPACT_WINDOW` env path applies to whatever it
|
|
1100
1102
|
* parses: `IWe = 1e5` floor, `ZRt = 1e6` cap. A value below the floor is
|
|
1101
1103
|
* silently RAISED to it, so deriving something smaller would be a lie; a value
|
|
1102
|
-
* above the cap is clamped.
|
|
1104
|
+
* above the cap is clamped. In the 2.1.251 bundle, `ike = 1e5` and
|
|
1105
|
+
* `JNe = 1e6` are passed to the shared env parser and the result is floored
|
|
1106
|
+
* again with `Math.max(ike, ...)` before use.
|
|
1103
1107
|
*/
|
|
1104
1108
|
const ENV_WINDOW_MIN_TOKENS = 1e5;
|
|
1105
1109
|
const ENV_WINDOW_MAX_TOKENS = 1e6;
|
|
@@ -1498,7 +1502,7 @@ function collectToolFieldKeys(body) {
|
|
|
1498
1502
|
//#endregion
|
|
1499
1503
|
//#region package.json
|
|
1500
1504
|
var name = "github-router";
|
|
1501
|
-
var version = "0.3.
|
|
1505
|
+
var version = "0.3.302";
|
|
1502
1506
|
//#endregion
|
|
1503
1507
|
//#region src/lib/approval.ts
|
|
1504
1508
|
const awaitApproval = async () => {
|
|
@@ -4360,13 +4364,103 @@ function identityPreflightErrorResponse(c, reason, path = "/v1/messages") {
|
|
|
4360
4364
|
}, 403);
|
|
4361
4365
|
}
|
|
4362
4366
|
//#endregion
|
|
4367
|
+
//#region src/lib/max-request-preprocess.ts
|
|
4368
|
+
function maxRequestError(result) {
|
|
4369
|
+
if (result.rejectedAlias) return `Router-owned model alias ${JSON.stringify(result.rejectedAlias)} is valid only for an authenticated -m max launch.`;
|
|
4370
|
+
if (result.rejectedModel) return `Model ${JSON.stringify(result.rejectedModel)} is outside the fixed -m max model set (Sol, Luna, Gemini 3.7 Flash, or Opus 5).`;
|
|
4371
|
+
}
|
|
4372
|
+
const MAX_MODEL_EFFORTS = Object.freeze({
|
|
4373
|
+
"gpt-5.6-sol": "high",
|
|
4374
|
+
"gpt-5.6-luna": "high",
|
|
4375
|
+
"gemini-3.7-flash": "high",
|
|
4376
|
+
"claude-opus-5": "high"
|
|
4377
|
+
});
|
|
4378
|
+
function allowedModel(base) {
|
|
4379
|
+
return MAX_PROFILE_ALLOWED_LEAD_MODEL_IDS.includes(base);
|
|
4380
|
+
}
|
|
4381
|
+
function setEffort(body, effort) {
|
|
4382
|
+
const outputConfig = body.output_config && typeof body.output_config === "object" ? body.output_config : {};
|
|
4383
|
+
if (outputConfig.effort === void 0) body.output_config = {
|
|
4384
|
+
...outputConfig,
|
|
4385
|
+
effort
|
|
4386
|
+
};
|
|
4387
|
+
}
|
|
4388
|
+
/**
|
|
4389
|
+
* Apply the bound max profile's lead-model projection. Max is intentionally
|
|
4390
|
+
* separate from the fast preprocessor: fast aliases and fixed fast role rules
|
|
4391
|
+
* must not become active for max, while arbitrary old/unknown model selections
|
|
4392
|
+
* must fail closed rather than silently escape the max surface.
|
|
4393
|
+
*/
|
|
4394
|
+
function preprocessMaxRequest(rawBody, launch, subagentRequest = false) {
|
|
4395
|
+
let parsed;
|
|
4396
|
+
try {
|
|
4397
|
+
parsed = JSON.parse(rawBody);
|
|
4398
|
+
} catch {
|
|
4399
|
+
return {
|
|
4400
|
+
body: rawBody,
|
|
4401
|
+
modified: false
|
|
4402
|
+
};
|
|
4403
|
+
}
|
|
4404
|
+
const originalModel = typeof parsed.model === "string" ? parsed.model : void 0;
|
|
4405
|
+
if (!originalModel) return {
|
|
4406
|
+
body: rawBody,
|
|
4407
|
+
modified: false
|
|
4408
|
+
};
|
|
4409
|
+
if (launch?.profileId !== "max") return {
|
|
4410
|
+
body: rawBody,
|
|
4411
|
+
originalModel,
|
|
4412
|
+
modified: false
|
|
4413
|
+
};
|
|
4414
|
+
const { base, hadSuffix } = stripTrailingOneMSuffix(originalModel);
|
|
4415
|
+
const aliasEffort = maxAliasEffort(originalModel);
|
|
4416
|
+
const canonical = maxAliasModel(originalModel);
|
|
4417
|
+
if (canonical) {
|
|
4418
|
+
const effort = aliasEffort ?? "high";
|
|
4419
|
+
parsed.model = hadSuffix ? `${canonical}[1m]` : canonical;
|
|
4420
|
+
setEffort(parsed, effort);
|
|
4421
|
+
if (parsed.thinking && typeof parsed.thinking === "object") {
|
|
4422
|
+
if (parsed.thinking.type === "enabled") parsed.thinking = { type: "adaptive" };
|
|
4423
|
+
}
|
|
4424
|
+
return {
|
|
4425
|
+
body: JSON.stringify(parsed),
|
|
4426
|
+
originalModel,
|
|
4427
|
+
modified: true
|
|
4428
|
+
};
|
|
4429
|
+
}
|
|
4430
|
+
const allowedSubagentModel = subagentRequest && base === "grok-4.6";
|
|
4431
|
+
if (!allowedModel(base) && !allowedSubagentModel) return {
|
|
4432
|
+
body: rawBody,
|
|
4433
|
+
originalModel,
|
|
4434
|
+
modified: false,
|
|
4435
|
+
rejectedModel: originalModel
|
|
4436
|
+
};
|
|
4437
|
+
const effort = allowedSubagentModel ? "medium" : MAX_MODEL_EFFORTS[base];
|
|
4438
|
+
if (!effort) return {
|
|
4439
|
+
body: rawBody,
|
|
4440
|
+
originalModel,
|
|
4441
|
+
modified: false,
|
|
4442
|
+
rejectedModel: originalModel
|
|
4443
|
+
};
|
|
4444
|
+
setEffort(parsed, effort);
|
|
4445
|
+
if (parsed.thinking && typeof parsed.thinking === "object") {
|
|
4446
|
+
if (parsed.thinking.type === "enabled") parsed.thinking = { type: "adaptive" };
|
|
4447
|
+
}
|
|
4448
|
+
return {
|
|
4449
|
+
body: JSON.stringify(parsed),
|
|
4450
|
+
originalModel,
|
|
4451
|
+
modified: true
|
|
4452
|
+
};
|
|
4453
|
+
}
|
|
4454
|
+
Object.freeze([MAX_LUNA_HIGH_ALIAS_ID, MAX_LUNA_MAX_ALIAS_ID]);
|
|
4455
|
+
//#endregion
|
|
4363
4456
|
//#region src/lib/fast-request-preprocess.ts
|
|
4364
4457
|
/**
|
|
4365
4458
|
* Apply authenticated fast-profile model and effort policy before ordinary model
|
|
4366
4459
|
* resolution. Synthetic aliases are refused outside an authenticated fast
|
|
4367
4460
|
* launch, so raw/BYO traffic cannot opt itself into private profile semantics.
|
|
4368
4461
|
*/
|
|
4369
|
-
function preprocessFastRequest(rawBody, launch) {
|
|
4462
|
+
function preprocessFastRequest(rawBody, launch, subagentRequest = false) {
|
|
4463
|
+
if (launch?.profileId === "max") return preprocessMaxRequest(rawBody, launch, subagentRequest);
|
|
4370
4464
|
let parsed;
|
|
4371
4465
|
try {
|
|
4372
4466
|
parsed = JSON.parse(rawBody);
|
|
@@ -4382,7 +4476,7 @@ function preprocessFastRequest(rawBody, launch) {
|
|
|
4382
4476
|
modified: false
|
|
4383
4477
|
};
|
|
4384
4478
|
const alias = resolveModelAlias(originalModel);
|
|
4385
|
-
if (alias && launch?.profileId !== "fast") return {
|
|
4479
|
+
if (alias && (launch?.profileId !== "fast" || isMaxModelAlias(originalModel))) return {
|
|
4386
4480
|
body: rawBody,
|
|
4387
4481
|
originalModel,
|
|
4388
4482
|
modified: false,
|
|
@@ -4860,12 +4954,33 @@ async function handleCompletion(c) {
|
|
|
4860
4954
|
const incomingBeta = c.req.header("anthropic-beta");
|
|
4861
4955
|
const advisorRequested = isAdvisorRequested(incomingBeta);
|
|
4862
4956
|
const fastProfileRequest = identity.launch?.profileId === "fast";
|
|
4863
|
-
const
|
|
4957
|
+
const maxProfileRequest = identity.launch?.profileId === "max";
|
|
4958
|
+
const subagentRequest = Boolean(c.req.header("x-claude-code-agent-id"));
|
|
4959
|
+
const fastSubagentRequest = fastProfileRequest && subagentRequest;
|
|
4960
|
+
const maxSubagentRequest = maxProfileRequest && subagentRequest;
|
|
4864
4961
|
const fastLeadAdvisor = fastProfileRequest && !fastSubagentRequest;
|
|
4865
|
-
const
|
|
4962
|
+
const maxLeadAdvisor = maxProfileRequest && !maxSubagentRequest;
|
|
4963
|
+
const advisorEnabled = advisorRequested && !fastSubagentRequest && !maxSubagentRequest;
|
|
4866
4964
|
const fastAdvisorEnabled = fastLeadAdvisor && advisorRequested && hasNonEmptyTools(rawBody);
|
|
4867
|
-
const
|
|
4965
|
+
const maxAdvisorEnabled = maxLeadAdvisor && advisorRequested && hasNonEmptyTools(rawBody);
|
|
4966
|
+
const advisorBehaviorEnabled = fastLeadAdvisor ? fastAdvisorEnabled : maxLeadAdvisor ? maxAdvisorEnabled : advisorEnabled;
|
|
4868
4967
|
let fastAdvisorChoice;
|
|
4968
|
+
let maxAdvisorChoice;
|
|
4969
|
+
if (maxAdvisorEnabled) {
|
|
4970
|
+
const requestedAdvisor = process.env.GH_ROUTER_ADVISOR_MODEL;
|
|
4971
|
+
if (!maxAdvisorPinIsValid(requestedAdvisor)) return c.json({
|
|
4972
|
+
type: "error",
|
|
4973
|
+
error: {
|
|
4974
|
+
type: "invalid_request_error",
|
|
4975
|
+
message: `Invalid GH_ROUTER_ADVISOR_MODEL ${JSON.stringify(requestedAdvisor)} for max profile; must be gpt-5.6-sol or claude-opus-5.`
|
|
4976
|
+
}
|
|
4977
|
+
}, 400, { "x-should-retry": "false" });
|
|
4978
|
+
const model = maxAdvisorModelFromPin(requestedAdvisor, maxOpusModel());
|
|
4979
|
+
maxAdvisorChoice = {
|
|
4980
|
+
model,
|
|
4981
|
+
effort: maxAdvisorEffortForModel(model)
|
|
4982
|
+
};
|
|
4983
|
+
}
|
|
4869
4984
|
if (fastAdvisorEnabled) {
|
|
4870
4985
|
const mismatch = fastAdvisorMetadataMismatch(rawBody);
|
|
4871
4986
|
if (mismatch) return c.json({
|
|
@@ -4887,9 +5002,9 @@ async function handleCompletion(c) {
|
|
|
4887
5002
|
}, 503);
|
|
4888
5003
|
}
|
|
4889
5004
|
}
|
|
4890
|
-
const fastPreprocess = preprocessFastRequest(rawBody, identity.launch);
|
|
5005
|
+
const fastPreprocess = preprocessFastRequest(rawBody, identity.launch, subagentRequest);
|
|
4891
5006
|
if (fastPreprocess.rejectedAlias || fastPreprocess.rejectedModel) {
|
|
4892
|
-
const message = fastPreprocess.rejectedAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.rejectedAlias)} is valid only for an authenticated -m fast launch.` : `Model ${JSON.stringify(fastPreprocess.rejectedModel)} is outside the fixed -m fast model set.`;
|
|
5007
|
+
const message = identity.launch?.profileId === "max" ? maxRequestError(fastPreprocess) ?? "Invalid max request" : fastPreprocess.rejectedAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.rejectedAlias)} is valid only for an authenticated -m fast launch.` : `Model ${JSON.stringify(fastPreprocess.rejectedModel)} is outside the fixed -m fast model set.`;
|
|
4893
5008
|
return c.json({
|
|
4894
5009
|
type: "error",
|
|
4895
5010
|
error: {
|
|
@@ -4900,7 +5015,7 @@ async function handleCompletion(c) {
|
|
|
4900
5015
|
}
|
|
4901
5016
|
let finalBody = await processWebSearch(fastPreprocess.body);
|
|
4902
5017
|
finalBody = sanitizeAnthropicBody(finalBody);
|
|
4903
|
-
if (fastSubagentRequest) finalBody = stripAdvisorTool(finalBody);
|
|
5018
|
+
if (fastSubagentRequest || maxSubagentRequest) finalBody = stripAdvisorTool(finalBody);
|
|
4904
5019
|
const loopGuard = guardAnthropicBody(finalBody);
|
|
4905
5020
|
if (loopGuard.action === "abort") return c.json({
|
|
4906
5021
|
type: "error",
|
|
@@ -4911,7 +5026,7 @@ async function handleCompletion(c) {
|
|
|
4911
5026
|
}, 400, { "x-should-retry": "false" });
|
|
4912
5027
|
if (loopGuard.body !== void 0) finalBody = loopGuard.body;
|
|
4913
5028
|
if (advisorBehaviorEnabled) {
|
|
4914
|
-
finalBody = injectAdvisorTool(finalBody, fastLeadAdvisor ? FAST_ADVISOR_TOOL_INSTRUCTIONS : void 0);
|
|
5029
|
+
finalBody = injectAdvisorTool(finalBody, fastLeadAdvisor ? FAST_ADVISOR_TOOL_INSTRUCTIONS : maxLeadAdvisor ? MAX_PROFILE_ADVISOR_INSTRUCTIONS : void 0);
|
|
4915
5030
|
consola.info("ADVISOR enabled for this request — injecting __anthropic_advisor tool; will translate tool_use → server_tool_use{advisor} on the SSE stream");
|
|
4916
5031
|
}
|
|
4917
5032
|
if (finalBody.includes("\"mcp_servers\"")) try {
|
|
@@ -4935,16 +5050,16 @@ async function handleCompletion(c) {
|
|
|
4935
5050
|
parsedBase = JSON.parse(promptWindowBody);
|
|
4936
5051
|
} catch {}
|
|
4937
5052
|
const wantsStream = parsedBase?.stream === true;
|
|
4938
|
-
if (fastAdvisorEnabled && wantsStream) {
|
|
5053
|
+
if ((fastAdvisorEnabled || maxAdvisorEnabled) && wantsStream) {
|
|
4939
5054
|
const initialConversation = Array.isArray(parsedBase.messages) ? parsedBase.messages : [];
|
|
4940
5055
|
const parsedInitial = parseAnthropicRequest(parsedBase, modelId, selectedModel);
|
|
4941
|
-
const
|
|
5056
|
+
const translatedAdvisorAborter = new AbortController();
|
|
4942
5057
|
const firstResponse = await streamParsedRequestViaShim(parsedInitial, endpoint, {
|
|
4943
5058
|
modelId,
|
|
4944
5059
|
model: selectedModel,
|
|
4945
5060
|
routePath: c.req.path,
|
|
4946
|
-
onCancel: () =>
|
|
4947
|
-
},
|
|
5061
|
+
onCancel: () => translatedAdvisorAborter.abort()
|
|
5062
|
+
}, translatedAdvisorAborter.signal);
|
|
4948
5063
|
logRequest({
|
|
4949
5064
|
method: "POST",
|
|
4950
5065
|
path: c.req.path,
|
|
@@ -4953,7 +5068,17 @@ async function handleCompletion(c) {
|
|
|
4953
5068
|
status: 200,
|
|
4954
5069
|
streaming: true
|
|
4955
5070
|
}, selectedModel, startTime);
|
|
4956
|
-
const advisorChoice =
|
|
5071
|
+
const advisorChoice = maxAdvisorEnabled ? {
|
|
5072
|
+
model: maxAdvisorChoice.model,
|
|
5073
|
+
effort: maxAdvisorChoice.effort,
|
|
5074
|
+
escalated: false,
|
|
5075
|
+
fastProfile: false
|
|
5076
|
+
} : {
|
|
5077
|
+
model: fastAdvisorChoice.model,
|
|
5078
|
+
effort: resolveAdvisorEffort(rawBody, fastAdvisorChoice.model, true),
|
|
5079
|
+
escalated: fastAdvisorChoice.escalated,
|
|
5080
|
+
fastProfile: true
|
|
5081
|
+
};
|
|
4957
5082
|
return new Response(buildAdvisorStream({
|
|
4958
5083
|
firstResponse,
|
|
4959
5084
|
initialConversation,
|
|
@@ -4961,9 +5086,10 @@ async function handleCompletion(c) {
|
|
|
4961
5086
|
requestHeaders: {},
|
|
4962
5087
|
advisorModel: advisorChoice.model,
|
|
4963
5088
|
advisorEscalated: advisorChoice.escalated,
|
|
4964
|
-
advisorFastProfile:
|
|
4965
|
-
|
|
4966
|
-
|
|
5089
|
+
advisorFastProfile: advisorChoice.fastProfile,
|
|
5090
|
+
advisorMaxProfile: maxAdvisorEnabled,
|
|
5091
|
+
advisorEffort: advisorChoice.effort,
|
|
5092
|
+
externalAborter: translatedAdvisorAborter,
|
|
4967
5093
|
continueTurn: makeShimContinueTurn(endpoint, {
|
|
4968
5094
|
modelId,
|
|
4969
5095
|
model: selectedModel
|
|
@@ -5071,7 +5197,12 @@ async function handleCompletion(c) {
|
|
|
5071
5197
|
parsedBase = JSON.parse(nativeBody);
|
|
5072
5198
|
} catch {}
|
|
5073
5199
|
const initialConversation = Array.isArray(parsedBase.messages) ? parsedBase.messages : [];
|
|
5074
|
-
const advisorChoice = fastAdvisorChoice ??
|
|
5200
|
+
const advisorChoice = fastAdvisorChoice ?? (maxAdvisorChoice ? {
|
|
5201
|
+
model: maxAdvisorChoice.model,
|
|
5202
|
+
effort: maxAdvisorChoice.effort,
|
|
5203
|
+
escalated: false,
|
|
5204
|
+
fastProfile: false
|
|
5205
|
+
} : resolveAdvisorModel(originalModel, false));
|
|
5075
5206
|
return new Response(buildAdvisorStream({
|
|
5076
5207
|
firstResponse: response,
|
|
5077
5208
|
initialConversation,
|
|
@@ -5080,7 +5211,8 @@ async function handleCompletion(c) {
|
|
|
5080
5211
|
advisorModel: advisorChoice.model,
|
|
5081
5212
|
advisorEscalated: advisorChoice.escalated,
|
|
5082
5213
|
advisorFastProfile: fastLeadAdvisor,
|
|
5083
|
-
|
|
5214
|
+
advisorMaxProfile: maxAdvisorEnabled,
|
|
5215
|
+
advisorEffort: maxAdvisorChoice ? maxAdvisorChoice.effort : resolveAdvisorEffort(rawBody, advisorChoice.model, fastLeadAdvisor),
|
|
5084
5216
|
externalAborter: advisorAborter
|
|
5085
5217
|
}), {
|
|
5086
5218
|
status: response.status,
|
|
@@ -5416,9 +5548,11 @@ async function handleCountTokens(c) {
|
|
|
5416
5548
|
const startTime = Date.now();
|
|
5417
5549
|
const identity = runMessagesIdentityPreflight(c);
|
|
5418
5550
|
if (!identity.ok) return identityPreflightErrorResponse(c, identity.reason, c.req.path);
|
|
5419
|
-
const
|
|
5551
|
+
const rawBody = await c.req.text();
|
|
5552
|
+
const subagentRequest = Boolean(c.req.header("x-claude-code-agent-id"));
|
|
5553
|
+
const fastPreprocess = preprocessFastRequest(rawBody, identity.launch, subagentRequest);
|
|
5420
5554
|
if (fastPreprocess.rejectedAlias || fastPreprocess.rejectedModel) {
|
|
5421
|
-
const message = fastPreprocess.rejectedAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.rejectedAlias)} is valid only for an authenticated -m fast launch.` : `Model ${JSON.stringify(fastPreprocess.rejectedModel)} is outside the fixed -m fast model set.`;
|
|
5555
|
+
const message = identity.launch?.profileId === "max" ? maxRequestError(fastPreprocess) ?? "Invalid max request" : fastPreprocess.rejectedAlias ? `Router-owned model alias ${JSON.stringify(fastPreprocess.rejectedAlias)} is valid only for an authenticated -m fast launch.` : `Model ${JSON.stringify(fastPreprocess.rejectedModel)} is outside the fixed -m fast model set.`;
|
|
5422
5556
|
return c.json({
|
|
5423
5557
|
type: "error",
|
|
5424
5558
|
error: {
|
|
@@ -6476,6 +6610,30 @@ function nativeSelectableModelsInCatalog() {
|
|
|
6476
6610
|
display_name: m.displayName
|
|
6477
6611
|
}));
|
|
6478
6612
|
}
|
|
6613
|
+
const MAX_NATIVE_MODELS = [
|
|
6614
|
+
{
|
|
6615
|
+
id: MAX_PROFILE_MODELS.sol,
|
|
6616
|
+
displayName: "GPT-5.6 Sol"
|
|
6617
|
+
},
|
|
6618
|
+
{
|
|
6619
|
+
id: MAX_PROFILE_MODELS.luna,
|
|
6620
|
+
displayName: "GPT-5.6 Luna"
|
|
6621
|
+
},
|
|
6622
|
+
{
|
|
6623
|
+
id: MAX_PROFILE_MODELS.gemini,
|
|
6624
|
+
displayName: "Gemini 3.7 Flash"
|
|
6625
|
+
},
|
|
6626
|
+
{
|
|
6627
|
+
id: MAX_PROFILE_MODELS.opus,
|
|
6628
|
+
displayName: "Claude Opus 5"
|
|
6629
|
+
}
|
|
6630
|
+
];
|
|
6631
|
+
function maxSelectableModelsInCatalog() {
|
|
6632
|
+
return MAX_NATIVE_MODELS.filter((model) => state.models?.data.some((entry) => entry.id === model.id)).map((model) => ({
|
|
6633
|
+
id: withOneMSuffix(model.id),
|
|
6634
|
+
display_name: model.displayName
|
|
6635
|
+
}));
|
|
6636
|
+
}
|
|
6479
6637
|
/**
|
|
6480
6638
|
* Pre-seed Claude Code's gateway-model discovery cache so the non-Claude
|
|
6481
6639
|
* models appear as selectable picker rows WITHOUT the network fetch.
|
|
@@ -6605,6 +6763,9 @@ function oneMSuffixForAlias(aliasId) {
|
|
|
6605
6763
|
if (oneMContextDisabled()) return aliasId;
|
|
6606
6764
|
return catalogAdvertises1M(LUNA_REAL_MODEL_ID) ? `${aliasId}[1m]` : aliasId;
|
|
6607
6765
|
}
|
|
6766
|
+
function oneMSuffixForMaxModel(id) {
|
|
6767
|
+
return withOneMSuffix(id);
|
|
6768
|
+
}
|
|
6608
6769
|
function getClaudeCodeEnvVars(serverUrl, model, launchProfileId = "standard") {
|
|
6609
6770
|
const vars = {
|
|
6610
6771
|
ANTHROPIC_BASE_URL: serverUrl,
|
|
@@ -6618,8 +6779,9 @@ function getClaudeCodeEnvVars(serverUrl, model, launchProfileId = "standard") {
|
|
|
6618
6779
|
if (process.env.MCP_TIMEOUT === void 0) vars.MCP_TIMEOUT = mcpToolTimeoutMs;
|
|
6619
6780
|
if (process.env.MCP_TOOL_TIMEOUT === void 0) vars.MCP_TOOL_TIMEOUT = mcpToolTimeoutMs;
|
|
6620
6781
|
const isFastProfile = launchProfileId === "fast";
|
|
6621
|
-
const
|
|
6622
|
-
|
|
6782
|
+
const isMaxProfile = launchProfileId === "max";
|
|
6783
|
+
const smallFastModel = isMaxProfile ? MAX_LUNA_HIGH_ALIAS_ID : isFastProfile ? LUNA_HAIKU_ALIAS_ID : isBudgetClaudeLead(model) && (state.models?.data?.some((m) => m.id === "claude-haiku-4.5") ?? false) ? BUDGET_SMALL_FAST_SLUG : "claude-sonnet-5";
|
|
6784
|
+
if (process.env.ANTHROPIC_SMALL_FAST_MODEL === void 0) vars.ANTHROPIC_SMALL_FAST_MODEL = isFastProfile || isMaxProfile ? oneMSuffixForAlias(smallFastModel) : smallFastModel;
|
|
6623
6785
|
const seedTierRow = (modelKey, nameKey, bareSlug) => {
|
|
6624
6786
|
if (process.env[modelKey] !== void 0) return;
|
|
6625
6787
|
vars[modelKey] = withOneMSuffixForLead(bareSlug);
|
|
@@ -6630,7 +6792,20 @@ function getClaudeCodeEnvVars(serverUrl, model, launchProfileId = "standard") {
|
|
|
6630
6792
|
vars[modelKey] = oneMSuffixForAlias(aliasId);
|
|
6631
6793
|
if (process.env[nameKey] === void 0) vars[nameKey] = displayName;
|
|
6632
6794
|
};
|
|
6633
|
-
if (
|
|
6795
|
+
if (isMaxProfile) {
|
|
6796
|
+
const seedMaxRow = (modelKey, nameKey, id) => {
|
|
6797
|
+
if (process.env[modelKey] !== void 0) return;
|
|
6798
|
+
vars[modelKey] = oneMSuffixForMaxModel(id);
|
|
6799
|
+
if (process.env[nameKey] === void 0) vars[nameKey] = id;
|
|
6800
|
+
};
|
|
6801
|
+
seedMaxRow("ANTHROPIC_DEFAULT_SONNET_MODEL", "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME", MAX_PROFILE_MODELS.luna);
|
|
6802
|
+
seedMaxRow("ANTHROPIC_DEFAULT_HAIKU_MODEL", "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME", MAX_PROFILE_MODELS.luna);
|
|
6803
|
+
if (maxOpusModel()) seedMaxRow("ANTHROPIC_DEFAULT_OPUS_MODEL", "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME", MAX_PROFILE_MODELS.opus);
|
|
6804
|
+
if (process.env.ANTHROPIC_CUSTOM_MODEL_OPTION === void 0) {
|
|
6805
|
+
vars.ANTHROPIC_CUSTOM_MODEL_OPTION = oneMSuffixForMaxModel(MAX_PROFILE_MODELS.sol);
|
|
6806
|
+
if (process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME === void 0) vars.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME = "GPT-5.6 Sol";
|
|
6807
|
+
}
|
|
6808
|
+
} else if (isFastProfile) {
|
|
6634
6809
|
seedFastAliasTierRow("ANTHROPIC_DEFAULT_SONNET_MODEL", "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME", LUNA_SONNET_ALIAS_ID, "GPT-5.6 Luna (xhigh)");
|
|
6635
6810
|
seedFastAliasTierRow("ANTHROPIC_DEFAULT_HAIKU_MODEL", "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME", LUNA_HAIKU_ALIAS_ID, "GPT-5.6 Luna (high)");
|
|
6636
6811
|
const fastAliasCapabilities = "effort,xhigh_effort,max_effort,thinking,adaptive_thinking,interleaved_thinking";
|
|
@@ -6645,7 +6820,7 @@ function getClaudeCodeEnvVars(serverUrl, model, launchProfileId = "standard") {
|
|
|
6645
6820
|
seedTierRow("ANTHROPIC_DEFAULT_SONNET_MODEL", "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME", "claude-sonnet-5");
|
|
6646
6821
|
seedTierRow("ANTHROPIC_DEFAULT_HAIKU_MODEL", "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME", smallFastModel);
|
|
6647
6822
|
}
|
|
6648
|
-
seedTierRow("ANTHROPIC_DEFAULT_OPUS_MODEL", "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME", "claude-opus-5");
|
|
6823
|
+
if (!isMaxProfile) seedTierRow("ANTHROPIC_DEFAULT_OPUS_MODEL", "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME", "claude-opus-5");
|
|
6649
6824
|
if (process.env.CLAUDE_CODE_PLAN_V2_AGENT_COUNT === void 0) vars.CLAUDE_CODE_PLAN_V2_AGENT_COUNT = "7";
|
|
6650
6825
|
for (const key of [
|
|
6651
6826
|
"CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL",
|
|
@@ -6654,11 +6829,11 @@ function getClaudeCodeEnvVars(serverUrl, model, launchProfileId = "standard") {
|
|
|
6654
6829
|
"CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING",
|
|
6655
6830
|
"CLAUDE_CODE_ENABLE_TASKS"
|
|
6656
6831
|
]) if (process.env[key] === void 0) vars[key] = "1";
|
|
6657
|
-
const nativeModels = nativeSelectableModelsInCatalog();
|
|
6832
|
+
const nativeModels = isMaxProfile ? maxSelectableModelsInCatalog() : nativeSelectableModelsInCatalog();
|
|
6658
6833
|
if (nativeModels.length > 0) {
|
|
6659
6834
|
if (seedGatewayModelCache(serverUrl, nativeModels) && process.env.CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY === void 0 && vars.CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY === void 0) vars.CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY = "1";
|
|
6660
6835
|
} else clearGatewayModelCache();
|
|
6661
|
-
applyAutoCompactWindow(vars);
|
|
6836
|
+
applyAutoCompactWindow(vars, launchProfileId);
|
|
6662
6837
|
if (toolbeltEnabled()) Object.assign(vars, toolbeltPathOverride(process.env, PATHS.TOOLBELT_BIN_DIR));
|
|
6663
6838
|
return vars;
|
|
6664
6839
|
}
|
|
@@ -6703,7 +6878,7 @@ function catalogEntryForSeededModel(value) {
|
|
|
6703
6878
|
*
|
|
6704
6879
|
* Presence-guarded on the parent env, symmetric with every other guard here.
|
|
6705
6880
|
*/
|
|
6706
|
-
function applyAutoCompactWindow(vars) {
|
|
6881
|
+
function applyAutoCompactWindow(vars, launchProfileId) {
|
|
6707
6882
|
if (process.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW !== void 0) return;
|
|
6708
6883
|
let tightestWindow;
|
|
6709
6884
|
const consider = (value) => {
|
|
@@ -6713,7 +6888,8 @@ function applyAutoCompactWindow(vars) {
|
|
|
6713
6888
|
if (candidateWindow !== void 0 && (tightestWindow === void 0 || candidateWindow < tightestWindow)) tightestWindow = candidateWindow;
|
|
6714
6889
|
};
|
|
6715
6890
|
for (const key of LEAD_CAPABLE_MODEL_ENV_KEYS) consider(vars[key] ?? process.env[key]);
|
|
6716
|
-
|
|
6891
|
+
const gatewayModels = launchProfileId === "max" ? maxSelectableModelsInCatalog() : nativeSelectableModelsInCatalog();
|
|
6892
|
+
for (const model of gatewayModels) consider(model.id);
|
|
6717
6893
|
if (tightestWindow === void 0) return;
|
|
6718
6894
|
vars.CLAUDE_CODE_AUTO_COMPACT_WINDOW = String(tightestWindow);
|
|
6719
6895
|
}
|
|
@@ -6741,4 +6917,4 @@ function getCodexEnvVars(serverUrl) {
|
|
|
6741
6917
|
//#endregion
|
|
6742
6918
|
export { sharedServerArgs as a, stopKeepAwake as c, runSelfUpdate as d, checkClaudeVersion as f, setupAndServe as i, listModelsForEndpoint as l, getCodexEnvVars as n, LAUNCH_SECRET_HEADER as o, updateClaude as p, parseSharedArgs as r, startKeepAwake as s, getClaudeCodeEnvVars as t, enableFileLogging as u };
|
|
6743
6919
|
|
|
6744
|
-
//# sourceMappingURL=server-setup-
|
|
6920
|
+
//# sourceMappingURL=server-setup-Zn5wkosb.js.map
|