@maximoai/maximo-syntax-cli 0.1.35 → 0.1.37
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/cli.mjs +555 -566
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -124000,7 +124000,7 @@ var init_metadata = __esm(() => {
|
|
|
124000
124000
|
isMaximoAiAuth: isMaximoAISubscriber(),
|
|
124001
124001
|
version: "99.0.0",
|
|
124002
124002
|
versionBase: getVersionBase(),
|
|
124003
|
-
buildTime: "2026-08-15T17:
|
|
124003
|
+
buildTime: "2026-08-15T17:55:08.183Z",
|
|
124004
124004
|
deploymentEnvironment: env3.detectDeploymentEnvironment(),
|
|
124005
124005
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
124006
124006
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -165977,20 +165977,10 @@ var init_thinking = __esm(() => {
|
|
|
165977
165977
|
// src/utils/effort.ts
|
|
165978
165978
|
function getSupportedEffortLevelsForModel(model) {
|
|
165979
165979
|
const providerConfig = getCachedMaximoModelEffortConfig(model);
|
|
165980
|
-
if (providerConfig) {
|
|
165981
|
-
return
|
|
165982
|
-
}
|
|
165983
|
-
const m = model.toLowerCase();
|
|
165984
|
-
if (m.includes("maximo-atlas-1.2")) {
|
|
165985
|
-
return ["low", "medium", "high", "xhigh", "max"];
|
|
165986
|
-
}
|
|
165987
|
-
if (m.includes("opus-4-6")) {
|
|
165988
|
-
return ["low", "medium", "high", "max"];
|
|
165989
|
-
}
|
|
165990
|
-
if (m.includes("sonnet-4-6")) {
|
|
165991
|
-
return ["low", "medium", "high"];
|
|
165980
|
+
if (!providerConfig) {
|
|
165981
|
+
return;
|
|
165992
165982
|
}
|
|
165993
|
-
return;
|
|
165983
|
+
return providerConfig.supportedEfforts;
|
|
165994
165984
|
}
|
|
165995
165985
|
function modelSupportsEffort(model) {
|
|
165996
165986
|
if (isEnvTruthy(process.env.MAXIMO_SYNTAX_ALWAYS_ENABLE_EFFORT)) {
|
|
@@ -166010,23 +166000,6 @@ function modelSupportsEffort(model) {
|
|
|
166010
166000
|
}
|
|
166011
166001
|
return getAPIProvider() === "firstParty";
|
|
166012
166002
|
}
|
|
166013
|
-
function modelSupportsMaxEffort(model) {
|
|
166014
|
-
const providerLevels = getSupportedEffortLevelsForModel(model);
|
|
166015
|
-
if (providerLevels !== undefined) {
|
|
166016
|
-
return providerLevels.includes("max");
|
|
166017
|
-
}
|
|
166018
|
-
const supported3P = get3PModelCapabilityOverride(model, "max_effort");
|
|
166019
|
-
if (supported3P !== undefined) {
|
|
166020
|
-
return supported3P;
|
|
166021
|
-
}
|
|
166022
|
-
if (model.toLowerCase().includes("opus-4-6")) {
|
|
166023
|
-
return true;
|
|
166024
|
-
}
|
|
166025
|
-
if (process.env.USER_TYPE === "ant" && resolveAntModel(model)) {
|
|
166026
|
-
return true;
|
|
166027
|
-
}
|
|
166028
|
-
return false;
|
|
166029
|
-
}
|
|
166030
166003
|
function isEffortLevel(value) {
|
|
166031
166004
|
return EFFORT_LEVELS.includes(value);
|
|
166032
166005
|
}
|
|
@@ -166081,8 +166054,6 @@ function resolveAppliedEffort(model, appStateEffortValue) {
|
|
|
166081
166054
|
if (!supportedLevels.includes(resolved)) {
|
|
166082
166055
|
return getDefaultEffortForModel(model) ?? supportedLevels[supportedLevels.length - 1];
|
|
166083
166056
|
}
|
|
166084
|
-
} else if (resolved === "max" && !modelSupportsMaxEffort(model)) {
|
|
166085
|
-
return "high";
|
|
166086
166057
|
}
|
|
166087
166058
|
}
|
|
166088
166059
|
return resolved;
|
|
@@ -169902,7 +169873,7 @@ var init_exploreAgent = __esm(() => {
|
|
|
169902
169873
|
],
|
|
169903
169874
|
source: "built-in",
|
|
169904
169875
|
baseDir: "built-in",
|
|
169905
|
-
model:
|
|
169876
|
+
model: "inherit",
|
|
169906
169877
|
omitMaximoMd: true,
|
|
169907
169878
|
getSystemPrompt: () => getExploreSystemPrompt()
|
|
169908
169879
|
};
|
|
@@ -170156,7 +170127,7 @@ var init_statuslineSetup = __esm(() => {
|
|
|
170156
170127
|
tools: ["Read", "Edit"],
|
|
170157
170128
|
source: "built-in",
|
|
170158
170129
|
baseDir: "built-in",
|
|
170159
|
-
model: "
|
|
170130
|
+
model: "inherit",
|
|
170160
170131
|
color: "orange",
|
|
170161
170132
|
getSystemPrompt: () => STATUSLINE_SYSTEM_PROMPT
|
|
170162
170133
|
};
|
|
@@ -263697,486 +263668,6 @@ var init_registerFrontmatterHooks = __esm(() => {
|
|
|
263697
263668
|
init_sessionHooks();
|
|
263698
263669
|
});
|
|
263699
263670
|
|
|
263700
|
-
// src/utils/model/check1mAccess.ts
|
|
263701
|
-
function isExtraUsageEnabled() {
|
|
263702
|
-
const reason = getGlobalConfig().cachedExtraUsageDisabledReason;
|
|
263703
|
-
if (reason === undefined) {
|
|
263704
|
-
return false;
|
|
263705
|
-
}
|
|
263706
|
-
if (reason === null) {
|
|
263707
|
-
return true;
|
|
263708
|
-
}
|
|
263709
|
-
switch (reason) {
|
|
263710
|
-
case "out_of_credits":
|
|
263711
|
-
return true;
|
|
263712
|
-
case "overage_not_provisioned":
|
|
263713
|
-
case "org_level_disabled":
|
|
263714
|
-
case "org_level_disabled_until":
|
|
263715
|
-
case "seat_tier_level_disabled":
|
|
263716
|
-
case "member_level_disabled":
|
|
263717
|
-
case "seat_tier_zero_credit_limit":
|
|
263718
|
-
case "group_zero_credit_limit":
|
|
263719
|
-
case "member_zero_credit_limit":
|
|
263720
|
-
case "org_service_level_disabled":
|
|
263721
|
-
case "org_service_zero_credit_limit":
|
|
263722
|
-
case "no_limits_configured":
|
|
263723
|
-
case "unknown":
|
|
263724
|
-
return false;
|
|
263725
|
-
default:
|
|
263726
|
-
return false;
|
|
263727
|
-
}
|
|
263728
|
-
}
|
|
263729
|
-
function checkOpus1mAccess() {
|
|
263730
|
-
if (is1mContextDisabled()) {
|
|
263731
|
-
return false;
|
|
263732
|
-
}
|
|
263733
|
-
if (isMaximoAISubscriber()) {
|
|
263734
|
-
return isExtraUsageEnabled();
|
|
263735
|
-
}
|
|
263736
|
-
return true;
|
|
263737
|
-
}
|
|
263738
|
-
function checkSonnet1mAccess() {
|
|
263739
|
-
if (is1mContextDisabled()) {
|
|
263740
|
-
return false;
|
|
263741
|
-
}
|
|
263742
|
-
if (isMaximoAISubscriber()) {
|
|
263743
|
-
return isExtraUsageEnabled();
|
|
263744
|
-
}
|
|
263745
|
-
return true;
|
|
263746
|
-
}
|
|
263747
|
-
var init_check1mAccess = __esm(() => {
|
|
263748
|
-
init_auth2();
|
|
263749
|
-
init_config2();
|
|
263750
|
-
init_context();
|
|
263751
|
-
});
|
|
263752
|
-
|
|
263753
|
-
// src/utils/model/modelOptions.ts
|
|
263754
|
-
function getDefaultOptionForUser(fastMode = false) {
|
|
263755
|
-
if (process.env.USER_TYPE === "ant") {
|
|
263756
|
-
const currentModel = renderDefaultModelSetting(getDefaultMainLoopModelSetting());
|
|
263757
|
-
return {
|
|
263758
|
-
value: null,
|
|
263759
|
-
label: "Default (recommended)",
|
|
263760
|
-
description: `Use the default model for Ants (currently ${currentModel})`,
|
|
263761
|
-
descriptionForModel: `Default model (currently ${currentModel})`
|
|
263762
|
-
};
|
|
263763
|
-
}
|
|
263764
|
-
if (isMaximoAISubscriber()) {
|
|
263765
|
-
return {
|
|
263766
|
-
value: null,
|
|
263767
|
-
label: "Default (recommended)",
|
|
263768
|
-
description: getMaximoAiUserDefaultModelDescription(fastMode)
|
|
263769
|
-
};
|
|
263770
|
-
}
|
|
263771
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263772
|
-
return {
|
|
263773
|
-
value: null,
|
|
263774
|
-
label: "Default (recommended)",
|
|
263775
|
-
description: `Use the default model (currently ${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
|
|
263776
|
-
};
|
|
263777
|
-
}
|
|
263778
|
-
function getCustomSonnetOption() {
|
|
263779
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263780
|
-
const customSonnetModel = process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;
|
|
263781
|
-
if (is3P && customSonnetModel) {
|
|
263782
|
-
const is1m = has1mContext(customSonnetModel);
|
|
263783
|
-
return {
|
|
263784
|
-
value: "sonnet",
|
|
263785
|
-
label: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME ?? customSonnetModel,
|
|
263786
|
-
description: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " (1M context)" : ""}`,
|
|
263787
|
-
descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " with 1M context" : ""}`} (${customSonnetModel})`
|
|
263788
|
-
};
|
|
263789
|
-
}
|
|
263790
|
-
}
|
|
263791
|
-
function getSonnet46Option() {
|
|
263792
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263793
|
-
return {
|
|
263794
|
-
value: is3P ? getModelStrings2().sonnet46 : "sonnet",
|
|
263795
|
-
label: "Sonnet",
|
|
263796
|
-
description: `Sonnet 4.6 · Best for everyday tasks${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
|
|
263797
|
-
descriptionForModel: "Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks"
|
|
263798
|
-
};
|
|
263799
|
-
}
|
|
263800
|
-
function getCustomOpusOption() {
|
|
263801
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263802
|
-
const customOpusModel = process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
|
|
263803
|
-
if (is3P && customOpusModel) {
|
|
263804
|
-
const is1m = has1mContext(customOpusModel);
|
|
263805
|
-
return {
|
|
263806
|
-
value: "opus",
|
|
263807
|
-
label: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ?? customOpusModel,
|
|
263808
|
-
description: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " (1M context)" : ""}`,
|
|
263809
|
-
descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " with 1M context" : ""}`} (${customOpusModel})`
|
|
263810
|
-
};
|
|
263811
|
-
}
|
|
263812
|
-
}
|
|
263813
|
-
function getOpus41Option() {
|
|
263814
|
-
return {
|
|
263815
|
-
value: "opus",
|
|
263816
|
-
label: "Opus 4.1",
|
|
263817
|
-
description: `Opus 4.1 · Legacy`,
|
|
263818
|
-
descriptionForModel: "Opus 4.1 - legacy version"
|
|
263819
|
-
};
|
|
263820
|
-
}
|
|
263821
|
-
function getOpus46Option(fastMode = false) {
|
|
263822
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263823
|
-
return {
|
|
263824
|
-
value: is3P ? getModelStrings2().opus46 : "opus",
|
|
263825
|
-
label: "Opus",
|
|
263826
|
-
description: `Opus 4.6 · Most capable for complex work${getOpus46PricingSuffix(fastMode)}`,
|
|
263827
|
-
descriptionForModel: "Opus 4.6 - most capable for complex work"
|
|
263828
|
-
};
|
|
263829
|
-
}
|
|
263830
|
-
function getSonnet46_1MOption() {
|
|
263831
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263832
|
-
return {
|
|
263833
|
-
value: is3P ? getModelStrings2().sonnet46 + "[1m]" : "sonnet[1m]",
|
|
263834
|
-
label: "Sonnet (1M context)",
|
|
263835
|
-
description: `Sonnet 4.6 for long sessions${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
|
|
263836
|
-
descriptionForModel: "Sonnet 4.6 with 1M context window - for long sessions with large codebases"
|
|
263837
|
-
};
|
|
263838
|
-
}
|
|
263839
|
-
function getOpus46_1MOption(fastMode = false) {
|
|
263840
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263841
|
-
return {
|
|
263842
|
-
value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
|
|
263843
|
-
label: "Opus (1M context)",
|
|
263844
|
-
description: `Opus 4.6 for long sessions${getOpus46PricingSuffix(fastMode)}`,
|
|
263845
|
-
descriptionForModel: "Opus 4.6 with 1M context window - for long sessions with large codebases"
|
|
263846
|
-
};
|
|
263847
|
-
}
|
|
263848
|
-
function getCustomHaikuOption() {
|
|
263849
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263850
|
-
const customHaikuModel = process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
|
|
263851
|
-
if (is3P && customHaikuModel) {
|
|
263852
|
-
return {
|
|
263853
|
-
value: "haiku",
|
|
263854
|
-
label: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME ?? customHaikuModel,
|
|
263855
|
-
description: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model",
|
|
263856
|
-
descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model"} (${customHaikuModel})`
|
|
263857
|
-
};
|
|
263858
|
-
}
|
|
263859
|
-
}
|
|
263860
|
-
function getHaiku45Option() {
|
|
263861
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263862
|
-
return {
|
|
263863
|
-
value: "haiku",
|
|
263864
|
-
label: "Haiku",
|
|
263865
|
-
description: `Haiku 4.5 · Fastest for quick answers${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_45)}`}`,
|
|
263866
|
-
descriptionForModel: "Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6."
|
|
263867
|
-
};
|
|
263868
|
-
}
|
|
263869
|
-
function getHaiku35Option() {
|
|
263870
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263871
|
-
return {
|
|
263872
|
-
value: "haiku",
|
|
263873
|
-
label: "Haiku",
|
|
263874
|
-
description: `Haiku 3.5 for simple tasks${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_35)}`}`,
|
|
263875
|
-
descriptionForModel: "Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks."
|
|
263876
|
-
};
|
|
263877
|
-
}
|
|
263878
|
-
function getHaikuOption() {
|
|
263879
|
-
const haikuModel = getDefaultHaikuModel();
|
|
263880
|
-
return haikuModel === getModelStrings2().haiku45 ? getHaiku45Option() : getHaiku35Option();
|
|
263881
|
-
}
|
|
263882
|
-
function getMaxOpusOption(fastMode = false) {
|
|
263883
|
-
return {
|
|
263884
|
-
value: "opus",
|
|
263885
|
-
label: "Opus",
|
|
263886
|
-
description: `Opus 4.6 · Most capable for complex work${fastMode ? getOpus46PricingSuffix(true) : ""}`
|
|
263887
|
-
};
|
|
263888
|
-
}
|
|
263889
|
-
function getMaxSonnet46_1MOption() {
|
|
263890
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263891
|
-
const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
|
|
263892
|
-
return {
|
|
263893
|
-
value: "sonnet[1m]",
|
|
263894
|
-
label: "Sonnet (1M context)",
|
|
263895
|
-
description: `Sonnet 4.6 with 1M context${billingInfo}${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
|
|
263896
|
-
};
|
|
263897
|
-
}
|
|
263898
|
-
function getMaxOpus46_1MOption(fastMode = false) {
|
|
263899
|
-
const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
|
|
263900
|
-
return {
|
|
263901
|
-
value: "opus[1m]",
|
|
263902
|
-
label: "Opus (1M context)",
|
|
263903
|
-
description: `Opus 4.6 with 1M context${billingInfo}${getOpus46PricingSuffix(fastMode)}`
|
|
263904
|
-
};
|
|
263905
|
-
}
|
|
263906
|
-
function getMergedOpus1MOption(fastMode = false) {
|
|
263907
|
-
const is3P = getAPIProvider() !== "firstParty";
|
|
263908
|
-
return {
|
|
263909
|
-
value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
|
|
263910
|
-
label: "Opus (1M context)",
|
|
263911
|
-
description: `Opus 4.6 with 1M context · Most capable for complex work${!is3P && fastMode ? getOpus46PricingSuffix(fastMode) : ""}`,
|
|
263912
|
-
descriptionForModel: "Opus 4.6 with 1M context - most capable for complex work"
|
|
263913
|
-
};
|
|
263914
|
-
}
|
|
263915
|
-
function getOpusPlanOption() {
|
|
263916
|
-
return {
|
|
263917
|
-
value: "opusplan",
|
|
263918
|
-
label: "Opus Plan Mode",
|
|
263919
|
-
description: "Use Opus 4.6 in plan mode, Sonnet 4.6 otherwise"
|
|
263920
|
-
};
|
|
263921
|
-
}
|
|
263922
|
-
function getCodexPlanOption() {
|
|
263923
|
-
return {
|
|
263924
|
-
value: "codexplan",
|
|
263925
|
-
label: "Codex Plan",
|
|
263926
|
-
description: "GPT-5.4 on the Codex backend with high reasoning"
|
|
263927
|
-
};
|
|
263928
|
-
}
|
|
263929
|
-
function getCodexSparkOption() {
|
|
263930
|
-
return {
|
|
263931
|
-
value: "codexspark",
|
|
263932
|
-
label: "Codex Spark",
|
|
263933
|
-
description: "GPT-5.3 Codex Spark on the Codex backend for fast tool loops"
|
|
263934
|
-
};
|
|
263935
|
-
}
|
|
263936
|
-
function getModelOptionsBase(fastMode = false) {
|
|
263937
|
-
if (process.env.USER_TYPE === "ant") {
|
|
263938
|
-
const antModelOptions = getAntModels().map((m) => ({
|
|
263939
|
-
value: m.alias,
|
|
263940
|
-
label: m.label,
|
|
263941
|
-
description: m.description ?? `[ANT-ONLY] ${m.label} (${m.model})`
|
|
263942
|
-
}));
|
|
263943
|
-
return [
|
|
263944
|
-
getDefaultOptionForUser(),
|
|
263945
|
-
...antModelOptions,
|
|
263946
|
-
getMergedOpus1MOption(fastMode),
|
|
263947
|
-
getSonnet46Option(),
|
|
263948
|
-
getSonnet46_1MOption(),
|
|
263949
|
-
getHaiku45Option()
|
|
263950
|
-
];
|
|
263951
|
-
}
|
|
263952
|
-
if (isMaximoAISubscriber()) {
|
|
263953
|
-
if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
|
|
263954
|
-
const premiumOptions = [getDefaultOptionForUser(fastMode)];
|
|
263955
|
-
if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
|
|
263956
|
-
premiumOptions.push(getMaxOpus46_1MOption(fastMode));
|
|
263957
|
-
}
|
|
263958
|
-
premiumOptions.push(MaxSonnet46Option);
|
|
263959
|
-
if (checkSonnet1mAccess()) {
|
|
263960
|
-
premiumOptions.push(getMaxSonnet46_1MOption());
|
|
263961
|
-
}
|
|
263962
|
-
premiumOptions.push(MaxHaiku45Option);
|
|
263963
|
-
return premiumOptions;
|
|
263964
|
-
}
|
|
263965
|
-
const standardOptions = [getDefaultOptionForUser(fastMode)];
|
|
263966
|
-
if (checkSonnet1mAccess()) {
|
|
263967
|
-
standardOptions.push(getMaxSonnet46_1MOption());
|
|
263968
|
-
}
|
|
263969
|
-
if (isOpus1mMergeEnabled()) {
|
|
263970
|
-
standardOptions.push(getMergedOpus1MOption(fastMode));
|
|
263971
|
-
} else {
|
|
263972
|
-
standardOptions.push(getMaxOpusOption(fastMode));
|
|
263973
|
-
if (checkOpus1mAccess()) {
|
|
263974
|
-
standardOptions.push(getMaxOpus46_1MOption(fastMode));
|
|
263975
|
-
}
|
|
263976
|
-
}
|
|
263977
|
-
standardOptions.push(MaxHaiku45Option);
|
|
263978
|
-
return standardOptions;
|
|
263979
|
-
}
|
|
263980
|
-
if (getAPIProvider() === "firstParty") {
|
|
263981
|
-
const payg1POptions = [getDefaultOptionForUser(fastMode)];
|
|
263982
|
-
if (checkSonnet1mAccess()) {
|
|
263983
|
-
payg1POptions.push(getSonnet46_1MOption());
|
|
263984
|
-
}
|
|
263985
|
-
if (isOpus1mMergeEnabled()) {
|
|
263986
|
-
payg1POptions.push(getMergedOpus1MOption(fastMode));
|
|
263987
|
-
} else {
|
|
263988
|
-
payg1POptions.push(getOpus46Option(fastMode));
|
|
263989
|
-
if (checkOpus1mAccess()) {
|
|
263990
|
-
payg1POptions.push(getOpus46_1MOption(fastMode));
|
|
263991
|
-
}
|
|
263992
|
-
}
|
|
263993
|
-
payg1POptions.push(getHaiku45Option());
|
|
263994
|
-
return payg1POptions;
|
|
263995
|
-
}
|
|
263996
|
-
const payg3pOptions = [getDefaultOptionForUser(fastMode)];
|
|
263997
|
-
if (getAPIProvider() === "openai") {
|
|
263998
|
-
payg3pOptions.push(getCodexPlanOption(), getCodexSparkOption());
|
|
263999
|
-
}
|
|
264000
|
-
const customSonnet = getCustomSonnetOption();
|
|
264001
|
-
if (customSonnet !== undefined) {
|
|
264002
|
-
payg3pOptions.push(customSonnet);
|
|
264003
|
-
} else {
|
|
264004
|
-
payg3pOptions.push(getSonnet46Option());
|
|
264005
|
-
if (checkSonnet1mAccess()) {
|
|
264006
|
-
payg3pOptions.push(getSonnet46_1MOption());
|
|
264007
|
-
}
|
|
264008
|
-
}
|
|
264009
|
-
const customOpus = getCustomOpusOption();
|
|
264010
|
-
if (customOpus !== undefined) {
|
|
264011
|
-
payg3pOptions.push(customOpus);
|
|
264012
|
-
} else {
|
|
264013
|
-
payg3pOptions.push(getOpus41Option());
|
|
264014
|
-
payg3pOptions.push(getOpus46Option(fastMode));
|
|
264015
|
-
if (checkOpus1mAccess()) {
|
|
264016
|
-
payg3pOptions.push(getOpus46_1MOption(fastMode));
|
|
264017
|
-
}
|
|
264018
|
-
}
|
|
264019
|
-
const customHaiku = getCustomHaikuOption();
|
|
264020
|
-
if (customHaiku !== undefined) {
|
|
264021
|
-
payg3pOptions.push(customHaiku);
|
|
264022
|
-
} else {
|
|
264023
|
-
payg3pOptions.push(getHaikuOption());
|
|
264024
|
-
}
|
|
264025
|
-
return payg3pOptions;
|
|
264026
|
-
}
|
|
264027
|
-
function getModelFamilyInfo(model) {
|
|
264028
|
-
const canonical = getCanonicalName(model);
|
|
264029
|
-
if (canonical.includes("claude-sonnet-4-6") || canonical.includes("claude-sonnet-4-5") || canonical.includes("claude-sonnet-4-") || canonical.includes("claude-3-7-sonnet") || canonical.includes("claude-3-5-sonnet")) {
|
|
264030
|
-
const currentName = getMarketingNameForModel(getDefaultSonnetModel());
|
|
264031
|
-
if (currentName) {
|
|
264032
|
-
return { alias: "Sonnet", currentVersionName: currentName };
|
|
264033
|
-
}
|
|
264034
|
-
}
|
|
264035
|
-
if (canonical.includes("claude-opus-4")) {
|
|
264036
|
-
const currentName = getMarketingNameForModel(getDefaultOpusModel());
|
|
264037
|
-
if (currentName) {
|
|
264038
|
-
return { alias: "Opus", currentVersionName: currentName };
|
|
264039
|
-
}
|
|
264040
|
-
}
|
|
264041
|
-
if (canonical.includes("claude-haiku") || canonical.includes("claude-3-5-haiku")) {
|
|
264042
|
-
const currentName = getMarketingNameForModel(getDefaultHaikuModel());
|
|
264043
|
-
if (currentName) {
|
|
264044
|
-
return { alias: "Haiku", currentVersionName: currentName };
|
|
264045
|
-
}
|
|
264046
|
-
}
|
|
264047
|
-
return null;
|
|
264048
|
-
}
|
|
264049
|
-
function getKnownModelOption(model) {
|
|
264050
|
-
const marketingName = getMarketingNameForModel(model);
|
|
264051
|
-
if (!marketingName)
|
|
264052
|
-
return null;
|
|
264053
|
-
const familyInfo = getModelFamilyInfo(model);
|
|
264054
|
-
if (!familyInfo) {
|
|
264055
|
-
return {
|
|
264056
|
-
value: model,
|
|
264057
|
-
label: marketingName,
|
|
264058
|
-
description: model
|
|
264059
|
-
};
|
|
264060
|
-
}
|
|
264061
|
-
if (marketingName !== familyInfo.currentVersionName) {
|
|
264062
|
-
return {
|
|
264063
|
-
value: model,
|
|
264064
|
-
label: marketingName,
|
|
264065
|
-
description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`
|
|
264066
|
-
};
|
|
264067
|
-
}
|
|
264068
|
-
return {
|
|
264069
|
-
value: model,
|
|
264070
|
-
label: marketingName,
|
|
264071
|
-
description: model
|
|
264072
|
-
};
|
|
264073
|
-
}
|
|
264074
|
-
async function getModelOptionsAsync(fastMode = false) {
|
|
264075
|
-
const maximoOptions = await getMaximoModelOptions();
|
|
264076
|
-
if (maximoOptions) {
|
|
264077
|
-
return filterModelOptionsByAllowlist([
|
|
264078
|
-
getDefaultOptionForUser(fastMode),
|
|
264079
|
-
...maximoOptions
|
|
264080
|
-
]);
|
|
264081
|
-
}
|
|
264082
|
-
return getModelOptionsBase(fastMode);
|
|
264083
|
-
}
|
|
264084
|
-
function getModelOptions(fastMode = false) {
|
|
264085
|
-
const maximoOptions = getCachedMaximoModelOptions();
|
|
264086
|
-
if (maximoOptions) {
|
|
264087
|
-
return filterModelOptionsByAllowlist([
|
|
264088
|
-
getDefaultOptionForUser(fastMode),
|
|
264089
|
-
...maximoOptions
|
|
264090
|
-
]);
|
|
264091
|
-
}
|
|
264092
|
-
const options2 = getModelOptionsBase(fastMode);
|
|
264093
|
-
const envCustomModel = process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;
|
|
264094
|
-
if (envCustomModel && !options2.some((existing) => existing.value === envCustomModel)) {
|
|
264095
|
-
options2.push({
|
|
264096
|
-
value: envCustomModel,
|
|
264097
|
-
label: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME ?? envCustomModel,
|
|
264098
|
-
description: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION ?? `Custom model (${envCustomModel})`
|
|
264099
|
-
});
|
|
264100
|
-
}
|
|
264101
|
-
for (const opt of getGlobalConfig().additionalModelOptionsCache ?? []) {
|
|
264102
|
-
if (!options2.some((existing) => existing.value === opt.value)) {
|
|
264103
|
-
options2.push(opt);
|
|
264104
|
-
}
|
|
264105
|
-
}
|
|
264106
|
-
let customModel = null;
|
|
264107
|
-
const currentMainLoopModel = getUserSpecifiedModelSetting();
|
|
264108
|
-
const initialMainLoopModel = getInitialMainLoopModel();
|
|
264109
|
-
if (currentMainLoopModel !== undefined && currentMainLoopModel !== null) {
|
|
264110
|
-
customModel = currentMainLoopModel;
|
|
264111
|
-
} else if (initialMainLoopModel !== null) {
|
|
264112
|
-
customModel = initialMainLoopModel;
|
|
264113
|
-
}
|
|
264114
|
-
if (customModel === null || options2.some((opt) => opt.value === customModel)) {
|
|
264115
|
-
return filterModelOptionsByAllowlist(options2);
|
|
264116
|
-
} else if (customModel === "opusplan") {
|
|
264117
|
-
return filterModelOptionsByAllowlist([...options2, getOpusPlanOption()]);
|
|
264118
|
-
} else if (customModel === "codexplan") {
|
|
264119
|
-
return filterModelOptionsByAllowlist([...options2, getCodexPlanOption()]);
|
|
264120
|
-
} else if (customModel === "codexspark") {
|
|
264121
|
-
return filterModelOptionsByAllowlist([...options2, getCodexSparkOption()]);
|
|
264122
|
-
} else if (customModel === "opus" && getAPIProvider() === "firstParty") {
|
|
264123
|
-
return filterModelOptionsByAllowlist([
|
|
264124
|
-
...options2,
|
|
264125
|
-
getMaxOpusOption(fastMode)
|
|
264126
|
-
]);
|
|
264127
|
-
} else if (customModel === "opus[1m]" && getAPIProvider() === "firstParty") {
|
|
264128
|
-
return filterModelOptionsByAllowlist([
|
|
264129
|
-
...options2,
|
|
264130
|
-
getMergedOpus1MOption(fastMode)
|
|
264131
|
-
]);
|
|
264132
|
-
} else {
|
|
264133
|
-
const knownOption = getKnownModelOption(customModel);
|
|
264134
|
-
if (knownOption) {
|
|
264135
|
-
options2.push(knownOption);
|
|
264136
|
-
} else {
|
|
264137
|
-
options2.push({
|
|
264138
|
-
value: customModel,
|
|
264139
|
-
label: customModel,
|
|
264140
|
-
description: "Custom model"
|
|
264141
|
-
});
|
|
264142
|
-
}
|
|
264143
|
-
return filterModelOptionsByAllowlist(options2);
|
|
264144
|
-
}
|
|
264145
|
-
}
|
|
264146
|
-
function filterModelOptionsByAllowlist(options2) {
|
|
264147
|
-
const settings = getSettings_DEPRECATED() || {};
|
|
264148
|
-
if (!settings.availableModels) {
|
|
264149
|
-
return options2;
|
|
264150
|
-
}
|
|
264151
|
-
return options2.filter((opt) => opt.value === null || opt.value !== null && isModelAllowed(opt.value));
|
|
264152
|
-
}
|
|
264153
|
-
var MaxSonnet46Option, MaxHaiku45Option;
|
|
264154
|
-
var init_modelOptions = __esm(() => {
|
|
264155
|
-
init_state();
|
|
264156
|
-
init_antModels();
|
|
264157
|
-
init_auth2();
|
|
264158
|
-
init_modelStrings();
|
|
264159
|
-
init_modelCost();
|
|
264160
|
-
init_settings2();
|
|
264161
|
-
init_check1mAccess();
|
|
264162
|
-
init_providers();
|
|
264163
|
-
init_modelAllowlist();
|
|
264164
|
-
init_model();
|
|
264165
|
-
init_context();
|
|
264166
|
-
init_config2();
|
|
264167
|
-
init_maximoModels();
|
|
264168
|
-
MaxSonnet46Option = {
|
|
264169
|
-
value: "sonnet",
|
|
264170
|
-
label: "Sonnet",
|
|
264171
|
-
description: "Sonnet 4.6 · Best for everyday tasks"
|
|
264172
|
-
};
|
|
264173
|
-
MaxHaiku45Option = {
|
|
264174
|
-
value: "haiku",
|
|
264175
|
-
label: "Haiku",
|
|
264176
|
-
description: "Haiku 4.5 · Fastest for quick answers"
|
|
264177
|
-
};
|
|
264178
|
-
});
|
|
264179
|
-
|
|
264180
263671
|
// src/utils/model/agent.ts
|
|
264181
263672
|
function getDefaultSubagentModel() {
|
|
264182
263673
|
return "inherit";
|
|
@@ -264251,7 +263742,11 @@ function getAgentModelOptions() {
|
|
|
264251
263742
|
];
|
|
264252
263743
|
const seen = new Set(["inherit"]);
|
|
264253
263744
|
try {
|
|
264254
|
-
|
|
263745
|
+
const catalog = [
|
|
263746
|
+
...getCachedMaximoModelOptions() ?? [],
|
|
263747
|
+
...getGlobalConfig().additionalModelOptionsCache ?? []
|
|
263748
|
+
];
|
|
263749
|
+
for (const option of catalog) {
|
|
264255
263750
|
if (typeof option.value !== "string" || !option.value.trim())
|
|
264256
263751
|
continue;
|
|
264257
263752
|
if (seen.has(option.value))
|
|
@@ -264259,32 +263754,11 @@ function getAgentModelOptions() {
|
|
|
264259
263754
|
seen.add(option.value);
|
|
264260
263755
|
options2.push({
|
|
264261
263756
|
value: option.value,
|
|
264262
|
-
label: option.label,
|
|
264263
|
-
description: option.description
|
|
263757
|
+
label: option.label || option.value,
|
|
263758
|
+
description: option.description || "From the logged-in account catalog"
|
|
264264
263759
|
});
|
|
264265
263760
|
}
|
|
264266
263761
|
} catch {}
|
|
264267
|
-
const aliasFallbacks = [
|
|
264268
|
-
{
|
|
264269
|
-
value: "sonnet",
|
|
264270
|
-
label: "Sonnet",
|
|
264271
|
-
description: "Balanced performance - best for most agents"
|
|
264272
|
-
},
|
|
264273
|
-
{
|
|
264274
|
-
value: "opus",
|
|
264275
|
-
label: "Opus",
|
|
264276
|
-
description: "Most capable for complex reasoning tasks"
|
|
264277
|
-
},
|
|
264278
|
-
{
|
|
264279
|
-
value: "haiku",
|
|
264280
|
-
label: "Haiku",
|
|
264281
|
-
description: "Fast and efficient for simple tasks"
|
|
264282
|
-
}
|
|
264283
|
-
];
|
|
264284
|
-
for (const alias of aliasFallbacks) {
|
|
264285
|
-
if (!seen.has(alias.value))
|
|
264286
|
-
options2.push(alias);
|
|
264287
|
-
}
|
|
264288
263762
|
return options2;
|
|
264289
263763
|
}
|
|
264290
263764
|
var AGENT_MODEL_OPTIONS;
|
|
@@ -264293,7 +263767,8 @@ var init_agent = __esm(() => {
|
|
|
264293
263767
|
init_aliases();
|
|
264294
263768
|
init_bedrock();
|
|
264295
263769
|
init_model();
|
|
264296
|
-
|
|
263770
|
+
init_maximoModels();
|
|
263771
|
+
init_config2();
|
|
264297
263772
|
init_providers();
|
|
264298
263773
|
AGENT_MODEL_OPTIONS = [...MODEL_ALIASES, "inherit"];
|
|
264299
263774
|
});
|
|
@@ -267759,6 +267234,59 @@ var init_AssistantRedactedThinkingMessage = __esm(() => {
|
|
|
267759
267234
|
jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
|
|
267760
267235
|
});
|
|
267761
267236
|
|
|
267237
|
+
// src/utils/model/check1mAccess.ts
|
|
267238
|
+
function isExtraUsageEnabled() {
|
|
267239
|
+
const reason = getGlobalConfig().cachedExtraUsageDisabledReason;
|
|
267240
|
+
if (reason === undefined) {
|
|
267241
|
+
return false;
|
|
267242
|
+
}
|
|
267243
|
+
if (reason === null) {
|
|
267244
|
+
return true;
|
|
267245
|
+
}
|
|
267246
|
+
switch (reason) {
|
|
267247
|
+
case "out_of_credits":
|
|
267248
|
+
return true;
|
|
267249
|
+
case "overage_not_provisioned":
|
|
267250
|
+
case "org_level_disabled":
|
|
267251
|
+
case "org_level_disabled_until":
|
|
267252
|
+
case "seat_tier_level_disabled":
|
|
267253
|
+
case "member_level_disabled":
|
|
267254
|
+
case "seat_tier_zero_credit_limit":
|
|
267255
|
+
case "group_zero_credit_limit":
|
|
267256
|
+
case "member_zero_credit_limit":
|
|
267257
|
+
case "org_service_level_disabled":
|
|
267258
|
+
case "org_service_zero_credit_limit":
|
|
267259
|
+
case "no_limits_configured":
|
|
267260
|
+
case "unknown":
|
|
267261
|
+
return false;
|
|
267262
|
+
default:
|
|
267263
|
+
return false;
|
|
267264
|
+
}
|
|
267265
|
+
}
|
|
267266
|
+
function checkOpus1mAccess() {
|
|
267267
|
+
if (is1mContextDisabled()) {
|
|
267268
|
+
return false;
|
|
267269
|
+
}
|
|
267270
|
+
if (isMaximoAISubscriber()) {
|
|
267271
|
+
return isExtraUsageEnabled();
|
|
267272
|
+
}
|
|
267273
|
+
return true;
|
|
267274
|
+
}
|
|
267275
|
+
function checkSonnet1mAccess() {
|
|
267276
|
+
if (is1mContextDisabled()) {
|
|
267277
|
+
return false;
|
|
267278
|
+
}
|
|
267279
|
+
if (isMaximoAISubscriber()) {
|
|
267280
|
+
return isExtraUsageEnabled();
|
|
267281
|
+
}
|
|
267282
|
+
return true;
|
|
267283
|
+
}
|
|
267284
|
+
var init_check1mAccess = __esm(() => {
|
|
267285
|
+
init_auth2();
|
|
267286
|
+
init_config2();
|
|
267287
|
+
init_context();
|
|
267288
|
+
});
|
|
267289
|
+
|
|
267762
267290
|
// src/utils/model/contextWindowUpgradeCheck.ts
|
|
267763
267291
|
function getAvailableUpgrade() {
|
|
267764
267292
|
const currentModelSetting = getUserSpecifiedModelSetting();
|
|
@@ -277246,7 +276774,7 @@ import { access as access3, writeFile as writeFile13 } from "fs/promises";
|
|
|
277246
276774
|
import { homedir as homedir22 } from "os";
|
|
277247
276775
|
import { join as join65 } from "path";
|
|
277248
276776
|
function getCurrentRealVersion() {
|
|
277249
|
-
return "0.1.
|
|
276777
|
+
return "0.1.37";
|
|
277250
276778
|
}
|
|
277251
276779
|
async function getRolloutConfig() {
|
|
277252
276780
|
try {
|
|
@@ -350985,6 +350513,433 @@ var init_ExitWorktreeTool = __esm(() => {
|
|
|
350985
350513
|
// src/tools/ConfigTool/constants.ts
|
|
350986
350514
|
var CONFIG_TOOL_NAME = "Config";
|
|
350987
350515
|
|
|
350516
|
+
// src/utils/model/modelOptions.ts
|
|
350517
|
+
function getDefaultOptionForUser(fastMode = false) {
|
|
350518
|
+
if (process.env.USER_TYPE === "ant") {
|
|
350519
|
+
const currentModel = renderDefaultModelSetting(getDefaultMainLoopModelSetting());
|
|
350520
|
+
return {
|
|
350521
|
+
value: null,
|
|
350522
|
+
label: "Default (recommended)",
|
|
350523
|
+
description: `Use the default model for Ants (currently ${currentModel})`,
|
|
350524
|
+
descriptionForModel: `Default model (currently ${currentModel})`
|
|
350525
|
+
};
|
|
350526
|
+
}
|
|
350527
|
+
if (isMaximoAISubscriber()) {
|
|
350528
|
+
return {
|
|
350529
|
+
value: null,
|
|
350530
|
+
label: "Default (recommended)",
|
|
350531
|
+
description: getMaximoAiUserDefaultModelDescription(fastMode)
|
|
350532
|
+
};
|
|
350533
|
+
}
|
|
350534
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350535
|
+
return {
|
|
350536
|
+
value: null,
|
|
350537
|
+
label: "Default (recommended)",
|
|
350538
|
+
description: `Use the default model (currently ${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
|
|
350539
|
+
};
|
|
350540
|
+
}
|
|
350541
|
+
function getCustomSonnetOption() {
|
|
350542
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350543
|
+
const customSonnetModel = process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;
|
|
350544
|
+
if (is3P && customSonnetModel) {
|
|
350545
|
+
const is1m = has1mContext(customSonnetModel);
|
|
350546
|
+
return {
|
|
350547
|
+
value: "sonnet",
|
|
350548
|
+
label: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME ?? customSonnetModel,
|
|
350549
|
+
description: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " (1M context)" : ""}`,
|
|
350550
|
+
descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " with 1M context" : ""}`} (${customSonnetModel})`
|
|
350551
|
+
};
|
|
350552
|
+
}
|
|
350553
|
+
}
|
|
350554
|
+
function getSonnet46Option() {
|
|
350555
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350556
|
+
return {
|
|
350557
|
+
value: is3P ? getModelStrings2().sonnet46 : "sonnet",
|
|
350558
|
+
label: "Sonnet",
|
|
350559
|
+
description: `Sonnet 4.6 · Best for everyday tasks${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
|
|
350560
|
+
descriptionForModel: "Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks"
|
|
350561
|
+
};
|
|
350562
|
+
}
|
|
350563
|
+
function getCustomOpusOption() {
|
|
350564
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350565
|
+
const customOpusModel = process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
|
|
350566
|
+
if (is3P && customOpusModel) {
|
|
350567
|
+
const is1m = has1mContext(customOpusModel);
|
|
350568
|
+
return {
|
|
350569
|
+
value: "opus",
|
|
350570
|
+
label: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ?? customOpusModel,
|
|
350571
|
+
description: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " (1M context)" : ""}`,
|
|
350572
|
+
descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " with 1M context" : ""}`} (${customOpusModel})`
|
|
350573
|
+
};
|
|
350574
|
+
}
|
|
350575
|
+
}
|
|
350576
|
+
function getOpus41Option() {
|
|
350577
|
+
return {
|
|
350578
|
+
value: "opus",
|
|
350579
|
+
label: "Opus 4.1",
|
|
350580
|
+
description: `Opus 4.1 · Legacy`,
|
|
350581
|
+
descriptionForModel: "Opus 4.1 - legacy version"
|
|
350582
|
+
};
|
|
350583
|
+
}
|
|
350584
|
+
function getOpus46Option(fastMode = false) {
|
|
350585
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350586
|
+
return {
|
|
350587
|
+
value: is3P ? getModelStrings2().opus46 : "opus",
|
|
350588
|
+
label: "Opus",
|
|
350589
|
+
description: `Opus 4.6 · Most capable for complex work${getOpus46PricingSuffix(fastMode)}`,
|
|
350590
|
+
descriptionForModel: "Opus 4.6 - most capable for complex work"
|
|
350591
|
+
};
|
|
350592
|
+
}
|
|
350593
|
+
function getSonnet46_1MOption() {
|
|
350594
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350595
|
+
return {
|
|
350596
|
+
value: is3P ? getModelStrings2().sonnet46 + "[1m]" : "sonnet[1m]",
|
|
350597
|
+
label: "Sonnet (1M context)",
|
|
350598
|
+
description: `Sonnet 4.6 for long sessions${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
|
|
350599
|
+
descriptionForModel: "Sonnet 4.6 with 1M context window - for long sessions with large codebases"
|
|
350600
|
+
};
|
|
350601
|
+
}
|
|
350602
|
+
function getOpus46_1MOption(fastMode = false) {
|
|
350603
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350604
|
+
return {
|
|
350605
|
+
value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
|
|
350606
|
+
label: "Opus (1M context)",
|
|
350607
|
+
description: `Opus 4.6 for long sessions${getOpus46PricingSuffix(fastMode)}`,
|
|
350608
|
+
descriptionForModel: "Opus 4.6 with 1M context window - for long sessions with large codebases"
|
|
350609
|
+
};
|
|
350610
|
+
}
|
|
350611
|
+
function getCustomHaikuOption() {
|
|
350612
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350613
|
+
const customHaikuModel = process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
|
|
350614
|
+
if (is3P && customHaikuModel) {
|
|
350615
|
+
return {
|
|
350616
|
+
value: "haiku",
|
|
350617
|
+
label: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME ?? customHaikuModel,
|
|
350618
|
+
description: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model",
|
|
350619
|
+
descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model"} (${customHaikuModel})`
|
|
350620
|
+
};
|
|
350621
|
+
}
|
|
350622
|
+
}
|
|
350623
|
+
function getHaiku45Option() {
|
|
350624
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350625
|
+
return {
|
|
350626
|
+
value: "haiku",
|
|
350627
|
+
label: "Haiku",
|
|
350628
|
+
description: `Haiku 4.5 · Fastest for quick answers${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_45)}`}`,
|
|
350629
|
+
descriptionForModel: "Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6."
|
|
350630
|
+
};
|
|
350631
|
+
}
|
|
350632
|
+
function getHaiku35Option() {
|
|
350633
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350634
|
+
return {
|
|
350635
|
+
value: "haiku",
|
|
350636
|
+
label: "Haiku",
|
|
350637
|
+
description: `Haiku 3.5 for simple tasks${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_35)}`}`,
|
|
350638
|
+
descriptionForModel: "Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks."
|
|
350639
|
+
};
|
|
350640
|
+
}
|
|
350641
|
+
function getHaikuOption() {
|
|
350642
|
+
const haikuModel = getDefaultHaikuModel();
|
|
350643
|
+
return haikuModel === getModelStrings2().haiku45 ? getHaiku45Option() : getHaiku35Option();
|
|
350644
|
+
}
|
|
350645
|
+
function getMaxOpusOption(fastMode = false) {
|
|
350646
|
+
return {
|
|
350647
|
+
value: "opus",
|
|
350648
|
+
label: "Opus",
|
|
350649
|
+
description: `Opus 4.6 · Most capable for complex work${fastMode ? getOpus46PricingSuffix(true) : ""}`
|
|
350650
|
+
};
|
|
350651
|
+
}
|
|
350652
|
+
function getMaxSonnet46_1MOption() {
|
|
350653
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350654
|
+
const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
|
|
350655
|
+
return {
|
|
350656
|
+
value: "sonnet[1m]",
|
|
350657
|
+
label: "Sonnet (1M context)",
|
|
350658
|
+
description: `Sonnet 4.6 with 1M context${billingInfo}${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
|
|
350659
|
+
};
|
|
350660
|
+
}
|
|
350661
|
+
function getMaxOpus46_1MOption(fastMode = false) {
|
|
350662
|
+
const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
|
|
350663
|
+
return {
|
|
350664
|
+
value: "opus[1m]",
|
|
350665
|
+
label: "Opus (1M context)",
|
|
350666
|
+
description: `Opus 4.6 with 1M context${billingInfo}${getOpus46PricingSuffix(fastMode)}`
|
|
350667
|
+
};
|
|
350668
|
+
}
|
|
350669
|
+
function getMergedOpus1MOption(fastMode = false) {
|
|
350670
|
+
const is3P = getAPIProvider() !== "firstParty";
|
|
350671
|
+
return {
|
|
350672
|
+
value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
|
|
350673
|
+
label: "Opus (1M context)",
|
|
350674
|
+
description: `Opus 4.6 with 1M context · Most capable for complex work${!is3P && fastMode ? getOpus46PricingSuffix(fastMode) : ""}`,
|
|
350675
|
+
descriptionForModel: "Opus 4.6 with 1M context - most capable for complex work"
|
|
350676
|
+
};
|
|
350677
|
+
}
|
|
350678
|
+
function getOpusPlanOption() {
|
|
350679
|
+
return {
|
|
350680
|
+
value: "opusplan",
|
|
350681
|
+
label: "Opus Plan Mode",
|
|
350682
|
+
description: "Use Opus 4.6 in plan mode, Sonnet 4.6 otherwise"
|
|
350683
|
+
};
|
|
350684
|
+
}
|
|
350685
|
+
function getCodexPlanOption() {
|
|
350686
|
+
return {
|
|
350687
|
+
value: "codexplan",
|
|
350688
|
+
label: "Codex Plan",
|
|
350689
|
+
description: "GPT-5.4 on the Codex backend with high reasoning"
|
|
350690
|
+
};
|
|
350691
|
+
}
|
|
350692
|
+
function getCodexSparkOption() {
|
|
350693
|
+
return {
|
|
350694
|
+
value: "codexspark",
|
|
350695
|
+
label: "Codex Spark",
|
|
350696
|
+
description: "GPT-5.3 Codex Spark on the Codex backend for fast tool loops"
|
|
350697
|
+
};
|
|
350698
|
+
}
|
|
350699
|
+
function getModelOptionsBase(fastMode = false) {
|
|
350700
|
+
if (process.env.USER_TYPE === "ant") {
|
|
350701
|
+
const antModelOptions = getAntModels().map((m) => ({
|
|
350702
|
+
value: m.alias,
|
|
350703
|
+
label: m.label,
|
|
350704
|
+
description: m.description ?? `[ANT-ONLY] ${m.label} (${m.model})`
|
|
350705
|
+
}));
|
|
350706
|
+
return [
|
|
350707
|
+
getDefaultOptionForUser(),
|
|
350708
|
+
...antModelOptions,
|
|
350709
|
+
getMergedOpus1MOption(fastMode),
|
|
350710
|
+
getSonnet46Option(),
|
|
350711
|
+
getSonnet46_1MOption(),
|
|
350712
|
+
getHaiku45Option()
|
|
350713
|
+
];
|
|
350714
|
+
}
|
|
350715
|
+
if (isMaximoAISubscriber()) {
|
|
350716
|
+
if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
|
|
350717
|
+
const premiumOptions = [getDefaultOptionForUser(fastMode)];
|
|
350718
|
+
if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
|
|
350719
|
+
premiumOptions.push(getMaxOpus46_1MOption(fastMode));
|
|
350720
|
+
}
|
|
350721
|
+
premiumOptions.push(MaxSonnet46Option);
|
|
350722
|
+
if (checkSonnet1mAccess()) {
|
|
350723
|
+
premiumOptions.push(getMaxSonnet46_1MOption());
|
|
350724
|
+
}
|
|
350725
|
+
premiumOptions.push(MaxHaiku45Option);
|
|
350726
|
+
return premiumOptions;
|
|
350727
|
+
}
|
|
350728
|
+
const standardOptions = [getDefaultOptionForUser(fastMode)];
|
|
350729
|
+
if (checkSonnet1mAccess()) {
|
|
350730
|
+
standardOptions.push(getMaxSonnet46_1MOption());
|
|
350731
|
+
}
|
|
350732
|
+
if (isOpus1mMergeEnabled()) {
|
|
350733
|
+
standardOptions.push(getMergedOpus1MOption(fastMode));
|
|
350734
|
+
} else {
|
|
350735
|
+
standardOptions.push(getMaxOpusOption(fastMode));
|
|
350736
|
+
if (checkOpus1mAccess()) {
|
|
350737
|
+
standardOptions.push(getMaxOpus46_1MOption(fastMode));
|
|
350738
|
+
}
|
|
350739
|
+
}
|
|
350740
|
+
standardOptions.push(MaxHaiku45Option);
|
|
350741
|
+
return standardOptions;
|
|
350742
|
+
}
|
|
350743
|
+
if (getAPIProvider() === "firstParty") {
|
|
350744
|
+
const payg1POptions = [getDefaultOptionForUser(fastMode)];
|
|
350745
|
+
if (checkSonnet1mAccess()) {
|
|
350746
|
+
payg1POptions.push(getSonnet46_1MOption());
|
|
350747
|
+
}
|
|
350748
|
+
if (isOpus1mMergeEnabled()) {
|
|
350749
|
+
payg1POptions.push(getMergedOpus1MOption(fastMode));
|
|
350750
|
+
} else {
|
|
350751
|
+
payg1POptions.push(getOpus46Option(fastMode));
|
|
350752
|
+
if (checkOpus1mAccess()) {
|
|
350753
|
+
payg1POptions.push(getOpus46_1MOption(fastMode));
|
|
350754
|
+
}
|
|
350755
|
+
}
|
|
350756
|
+
payg1POptions.push(getHaiku45Option());
|
|
350757
|
+
return payg1POptions;
|
|
350758
|
+
}
|
|
350759
|
+
const payg3pOptions = [getDefaultOptionForUser(fastMode)];
|
|
350760
|
+
if (getAPIProvider() === "openai") {
|
|
350761
|
+
payg3pOptions.push(getCodexPlanOption(), getCodexSparkOption());
|
|
350762
|
+
}
|
|
350763
|
+
const customSonnet = getCustomSonnetOption();
|
|
350764
|
+
if (customSonnet !== undefined) {
|
|
350765
|
+
payg3pOptions.push(customSonnet);
|
|
350766
|
+
} else {
|
|
350767
|
+
payg3pOptions.push(getSonnet46Option());
|
|
350768
|
+
if (checkSonnet1mAccess()) {
|
|
350769
|
+
payg3pOptions.push(getSonnet46_1MOption());
|
|
350770
|
+
}
|
|
350771
|
+
}
|
|
350772
|
+
const customOpus = getCustomOpusOption();
|
|
350773
|
+
if (customOpus !== undefined) {
|
|
350774
|
+
payg3pOptions.push(customOpus);
|
|
350775
|
+
} else {
|
|
350776
|
+
payg3pOptions.push(getOpus41Option());
|
|
350777
|
+
payg3pOptions.push(getOpus46Option(fastMode));
|
|
350778
|
+
if (checkOpus1mAccess()) {
|
|
350779
|
+
payg3pOptions.push(getOpus46_1MOption(fastMode));
|
|
350780
|
+
}
|
|
350781
|
+
}
|
|
350782
|
+
const customHaiku = getCustomHaikuOption();
|
|
350783
|
+
if (customHaiku !== undefined) {
|
|
350784
|
+
payg3pOptions.push(customHaiku);
|
|
350785
|
+
} else {
|
|
350786
|
+
payg3pOptions.push(getHaikuOption());
|
|
350787
|
+
}
|
|
350788
|
+
return payg3pOptions;
|
|
350789
|
+
}
|
|
350790
|
+
function getModelFamilyInfo(model) {
|
|
350791
|
+
const canonical = getCanonicalName(model);
|
|
350792
|
+
if (canonical.includes("claude-sonnet-4-6") || canonical.includes("claude-sonnet-4-5") || canonical.includes("claude-sonnet-4-") || canonical.includes("claude-3-7-sonnet") || canonical.includes("claude-3-5-sonnet")) {
|
|
350793
|
+
const currentName = getMarketingNameForModel(getDefaultSonnetModel());
|
|
350794
|
+
if (currentName) {
|
|
350795
|
+
return { alias: "Sonnet", currentVersionName: currentName };
|
|
350796
|
+
}
|
|
350797
|
+
}
|
|
350798
|
+
if (canonical.includes("claude-opus-4")) {
|
|
350799
|
+
const currentName = getMarketingNameForModel(getDefaultOpusModel());
|
|
350800
|
+
if (currentName) {
|
|
350801
|
+
return { alias: "Opus", currentVersionName: currentName };
|
|
350802
|
+
}
|
|
350803
|
+
}
|
|
350804
|
+
if (canonical.includes("claude-haiku") || canonical.includes("claude-3-5-haiku")) {
|
|
350805
|
+
const currentName = getMarketingNameForModel(getDefaultHaikuModel());
|
|
350806
|
+
if (currentName) {
|
|
350807
|
+
return { alias: "Haiku", currentVersionName: currentName };
|
|
350808
|
+
}
|
|
350809
|
+
}
|
|
350810
|
+
return null;
|
|
350811
|
+
}
|
|
350812
|
+
function getKnownModelOption(model) {
|
|
350813
|
+
const marketingName = getMarketingNameForModel(model);
|
|
350814
|
+
if (!marketingName)
|
|
350815
|
+
return null;
|
|
350816
|
+
const familyInfo = getModelFamilyInfo(model);
|
|
350817
|
+
if (!familyInfo) {
|
|
350818
|
+
return {
|
|
350819
|
+
value: model,
|
|
350820
|
+
label: marketingName,
|
|
350821
|
+
description: model
|
|
350822
|
+
};
|
|
350823
|
+
}
|
|
350824
|
+
if (marketingName !== familyInfo.currentVersionName) {
|
|
350825
|
+
return {
|
|
350826
|
+
value: model,
|
|
350827
|
+
label: marketingName,
|
|
350828
|
+
description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`
|
|
350829
|
+
};
|
|
350830
|
+
}
|
|
350831
|
+
return {
|
|
350832
|
+
value: model,
|
|
350833
|
+
label: marketingName,
|
|
350834
|
+
description: model
|
|
350835
|
+
};
|
|
350836
|
+
}
|
|
350837
|
+
async function getModelOptionsAsync(fastMode = false) {
|
|
350838
|
+
const maximoOptions = await getMaximoModelOptions();
|
|
350839
|
+
if (maximoOptions) {
|
|
350840
|
+
return filterModelOptionsByAllowlist([
|
|
350841
|
+
getDefaultOptionForUser(fastMode),
|
|
350842
|
+
...maximoOptions
|
|
350843
|
+
]);
|
|
350844
|
+
}
|
|
350845
|
+
return getModelOptionsBase(fastMode);
|
|
350846
|
+
}
|
|
350847
|
+
function getModelOptions(fastMode = false) {
|
|
350848
|
+
const maximoOptions = getCachedMaximoModelOptions();
|
|
350849
|
+
if (maximoOptions) {
|
|
350850
|
+
return filterModelOptionsByAllowlist([
|
|
350851
|
+
getDefaultOptionForUser(fastMode),
|
|
350852
|
+
...maximoOptions
|
|
350853
|
+
]);
|
|
350854
|
+
}
|
|
350855
|
+
const options2 = getModelOptionsBase(fastMode);
|
|
350856
|
+
const envCustomModel = process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;
|
|
350857
|
+
if (envCustomModel && !options2.some((existing) => existing.value === envCustomModel)) {
|
|
350858
|
+
options2.push({
|
|
350859
|
+
value: envCustomModel,
|
|
350860
|
+
label: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME ?? envCustomModel,
|
|
350861
|
+
description: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION ?? `Custom model (${envCustomModel})`
|
|
350862
|
+
});
|
|
350863
|
+
}
|
|
350864
|
+
for (const opt of getGlobalConfig().additionalModelOptionsCache ?? []) {
|
|
350865
|
+
if (!options2.some((existing) => existing.value === opt.value)) {
|
|
350866
|
+
options2.push(opt);
|
|
350867
|
+
}
|
|
350868
|
+
}
|
|
350869
|
+
let customModel = null;
|
|
350870
|
+
const currentMainLoopModel = getUserSpecifiedModelSetting();
|
|
350871
|
+
const initialMainLoopModel = getInitialMainLoopModel();
|
|
350872
|
+
if (currentMainLoopModel !== undefined && currentMainLoopModel !== null) {
|
|
350873
|
+
customModel = currentMainLoopModel;
|
|
350874
|
+
} else if (initialMainLoopModel !== null) {
|
|
350875
|
+
customModel = initialMainLoopModel;
|
|
350876
|
+
}
|
|
350877
|
+
if (customModel === null || options2.some((opt) => opt.value === customModel)) {
|
|
350878
|
+
return filterModelOptionsByAllowlist(options2);
|
|
350879
|
+
} else if (customModel === "opusplan") {
|
|
350880
|
+
return filterModelOptionsByAllowlist([...options2, getOpusPlanOption()]);
|
|
350881
|
+
} else if (customModel === "codexplan") {
|
|
350882
|
+
return filterModelOptionsByAllowlist([...options2, getCodexPlanOption()]);
|
|
350883
|
+
} else if (customModel === "codexspark") {
|
|
350884
|
+
return filterModelOptionsByAllowlist([...options2, getCodexSparkOption()]);
|
|
350885
|
+
} else if (customModel === "opus" && getAPIProvider() === "firstParty") {
|
|
350886
|
+
return filterModelOptionsByAllowlist([
|
|
350887
|
+
...options2,
|
|
350888
|
+
getMaxOpusOption(fastMode)
|
|
350889
|
+
]);
|
|
350890
|
+
} else if (customModel === "opus[1m]" && getAPIProvider() === "firstParty") {
|
|
350891
|
+
return filterModelOptionsByAllowlist([
|
|
350892
|
+
...options2,
|
|
350893
|
+
getMergedOpus1MOption(fastMode)
|
|
350894
|
+
]);
|
|
350895
|
+
} else {
|
|
350896
|
+
const knownOption = getKnownModelOption(customModel);
|
|
350897
|
+
if (knownOption) {
|
|
350898
|
+
options2.push(knownOption);
|
|
350899
|
+
} else {
|
|
350900
|
+
options2.push({
|
|
350901
|
+
value: customModel,
|
|
350902
|
+
label: customModel,
|
|
350903
|
+
description: "Custom model"
|
|
350904
|
+
});
|
|
350905
|
+
}
|
|
350906
|
+
return filterModelOptionsByAllowlist(options2);
|
|
350907
|
+
}
|
|
350908
|
+
}
|
|
350909
|
+
function filterModelOptionsByAllowlist(options2) {
|
|
350910
|
+
const settings = getSettings_DEPRECATED() || {};
|
|
350911
|
+
if (!settings.availableModels) {
|
|
350912
|
+
return options2;
|
|
350913
|
+
}
|
|
350914
|
+
return options2.filter((opt) => opt.value === null || opt.value !== null && isModelAllowed(opt.value));
|
|
350915
|
+
}
|
|
350916
|
+
var MaxSonnet46Option, MaxHaiku45Option;
|
|
350917
|
+
var init_modelOptions = __esm(() => {
|
|
350918
|
+
init_state();
|
|
350919
|
+
init_antModels();
|
|
350920
|
+
init_auth2();
|
|
350921
|
+
init_modelStrings();
|
|
350922
|
+
init_modelCost();
|
|
350923
|
+
init_settings2();
|
|
350924
|
+
init_check1mAccess();
|
|
350925
|
+
init_providers();
|
|
350926
|
+
init_modelAllowlist();
|
|
350927
|
+
init_model();
|
|
350928
|
+
init_context();
|
|
350929
|
+
init_config2();
|
|
350930
|
+
init_maximoModels();
|
|
350931
|
+
MaxSonnet46Option = {
|
|
350932
|
+
value: "sonnet",
|
|
350933
|
+
label: "Sonnet",
|
|
350934
|
+
description: "Sonnet 4.6 · Best for everyday tasks"
|
|
350935
|
+
};
|
|
350936
|
+
MaxHaiku45Option = {
|
|
350937
|
+
value: "haiku",
|
|
350938
|
+
label: "Haiku",
|
|
350939
|
+
description: "Haiku 4.5 · Fastest for quick answers"
|
|
350940
|
+
};
|
|
350941
|
+
});
|
|
350942
|
+
|
|
350988
350943
|
// src/voice/voiceModeEnabled.ts
|
|
350989
350944
|
var init_voiceModeEnabled = __esm(() => {
|
|
350990
350945
|
init_growthbook();
|
|
@@ -354436,6 +354391,41 @@ function normalizeAgentToolInput(value) {
|
|
|
354436
354391
|
function listSubagentModelSlugs() {
|
|
354437
354392
|
return listSubagentDelegationCatalog().map((entry) => entry.slug);
|
|
354438
354393
|
}
|
|
354394
|
+
function listAccountCatalogSlugs() {
|
|
354395
|
+
const slugs = [];
|
|
354396
|
+
const seen = new Set;
|
|
354397
|
+
const add = (value) => {
|
|
354398
|
+
if (typeof value !== "string")
|
|
354399
|
+
return;
|
|
354400
|
+
const trimmed = value.trim();
|
|
354401
|
+
if (!trimmed || trimmed === "default" || seen.has(trimmed))
|
|
354402
|
+
return;
|
|
354403
|
+
seen.add(trimmed);
|
|
354404
|
+
slugs.push(trimmed);
|
|
354405
|
+
};
|
|
354406
|
+
try {
|
|
354407
|
+
for (const option of getCachedMaximoModelOptions() ?? []) {
|
|
354408
|
+
add(option.value);
|
|
354409
|
+
}
|
|
354410
|
+
} catch {}
|
|
354411
|
+
try {
|
|
354412
|
+
for (const option of getGlobalConfig().additionalModelOptionsCache ?? []) {
|
|
354413
|
+
add(option.value);
|
|
354414
|
+
}
|
|
354415
|
+
} catch {}
|
|
354416
|
+
return slugs;
|
|
354417
|
+
}
|
|
354418
|
+
function isAccountCatalogModel(model) {
|
|
354419
|
+
if (!model || isInheritAgentModel(model))
|
|
354420
|
+
return true;
|
|
354421
|
+
const trimmed = model.trim();
|
|
354422
|
+
if (!trimmed)
|
|
354423
|
+
return true;
|
|
354424
|
+
if (getCachedMaximoModel(trimmed))
|
|
354425
|
+
return true;
|
|
354426
|
+
const wanted = trimmed.toLowerCase();
|
|
354427
|
+
return listAccountCatalogSlugs().some((slug) => slug.toLowerCase() === wanted);
|
|
354428
|
+
}
|
|
354439
354429
|
function listSubagentDelegationCatalog() {
|
|
354440
354430
|
const entries = [
|
|
354441
354431
|
{ slug: "inherit", efforts: [] }
|
|
@@ -354447,19 +354437,15 @@ function listSubagentDelegationCatalog() {
|
|
|
354447
354437
|
return;
|
|
354448
354438
|
seen.add(trimmed);
|
|
354449
354439
|
const config2 = getCachedMaximoModelEffortConfig(trimmed);
|
|
354450
|
-
const supported = config2?.supportedEfforts?.length ? config2.supportedEfforts : getSupportedEffortLevelsForModel(trimmed);
|
|
354451
354440
|
entries.push({
|
|
354452
354441
|
slug: trimmed,
|
|
354453
|
-
efforts:
|
|
354442
|
+
efforts: config2?.supportedEfforts ? [...config2.supportedEfforts] : [],
|
|
354454
354443
|
...config2?.defaultEffort ? { defaultEffort: config2.defaultEffort } : {}
|
|
354455
354444
|
});
|
|
354456
354445
|
};
|
|
354457
|
-
|
|
354458
|
-
|
|
354459
|
-
|
|
354460
|
-
add(option.value);
|
|
354461
|
-
}
|
|
354462
|
-
} catch {}
|
|
354446
|
+
for (const slug of listAccountCatalogSlugs()) {
|
|
354447
|
+
add(slug);
|
|
354448
|
+
}
|
|
354463
354449
|
return entries;
|
|
354464
354450
|
}
|
|
354465
354451
|
function formatSubagentModelList(slugs) {
|
|
@@ -354495,9 +354481,9 @@ function formatSubagentDelegationCatalog(entries, limit = 40) {
|
|
|
354495
354481
|
var SENTINEL_STRINGS, SHARED_ISOLATION_STRINGS, WORKTREE_ISOLATION_STRINGS;
|
|
354496
354482
|
var init_agentToolParams = __esm(() => {
|
|
354497
354483
|
init_maximoModels();
|
|
354484
|
+
init_config2();
|
|
354498
354485
|
init_effort();
|
|
354499
354486
|
init_agent();
|
|
354500
|
-
init_modelOptions();
|
|
354501
354487
|
SENTINEL_STRINGS = new Set([
|
|
354502
354488
|
"",
|
|
354503
354489
|
"null",
|
|
@@ -355747,14 +355733,14 @@ A call that omits \`description\` or \`prompt\` is rejected. Do not start the su
|
|
|
355747
355733
|
|
|
355748
355734
|
Optional but supported on every spawn:
|
|
355749
355735
|
- \`subagent_type\`: one of the types listed above. If omitted, ${forkEnabled ? "a fork of yourself is created" : "the general-purpose agent is used"}.
|
|
355750
|
-
- \`model\`: an exact slug from the live catalog below,
|
|
355751
|
-
- \`effort\`: a level listed for that model in the catalog
|
|
355736
|
+
- \`model\`: an exact slug from the live logged-in account catalog below, or \`inherit\`. Do not invent slugs and do not use Claude family aliases (\`sonnet\`, \`opus\`, \`haiku\`) unless that exact id is in this catalog. Omit to inherit the parent model. Compact list: ${availableModels}.
|
|
355737
|
+
- \`effort\`: a level listed for that model in the catalog below. Omit to inherit the parent effort. Never pass an effort the chosen model does not list.
|
|
355752
355738
|
- \`isolation\`: \`"none"\` (default, shared workspace) or \`"worktree"\` (isolated git worktree). Never pass any other value. \`"none"\` is valid and means "do not isolate".
|
|
355753
355739
|
- \`run_in_background\`: \`true\` to return immediately and get a completion notification later.
|
|
355754
355740
|
|
|
355755
355741
|
## Live model and effort catalog
|
|
355756
355742
|
|
|
355757
|
-
This is the same
|
|
355743
|
+
This is the same logged-in account catalog \`/model\` shows (Maximo AI, MyTabulon, Cencori, OpenRouter, OpenCode, etc.). Use these exact \`model\` slugs and only the efforts listed on that row:
|
|
355758
355744
|
|
|
355759
355745
|
${catalogText}
|
|
355760
355746
|
|
|
@@ -355877,7 +355863,7 @@ ${agentListSection}
|
|
|
355877
355863
|
|
|
355878
355864
|
${forkEnabled ? `When using the ${AGENT_TOOL_NAME} tool, specify a subagent_type to use a specialized agent, or omit it to fork yourself — a fork inherits your full conversation context.` : `When using the ${AGENT_TOOL_NAME} tool, specify a subagent_type parameter to select which agent type to use. If omitted, the general-purpose agent is used.`}
|
|
355879
355865
|
|
|
355880
|
-
Always pass both \`description\` (3-5 word title) and \`prompt\` (full task). You may set \`model\` to
|
|
355866
|
+
Always pass both \`description\` (3-5 word title) and \`prompt\` (full task). You may set \`model\` to a slug from the live logged-in account catalog and \`effort\` to a level listed for that model; omit them to inherit the parent. \`isolation\` accepts only \`"none"\` (default, shared workspace) or \`"worktree"\`.`;
|
|
355881
355867
|
if (isCoordinator) {
|
|
355882
355868
|
return shared2;
|
|
355883
355869
|
}
|
|
@@ -355906,7 +355892,7 @@ Usage notes:
|
|
|
355906
355892
|
- Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.)${forkEnabled ? "" : ", since it is not aware of the user's intent"}
|
|
355907
355893
|
- If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.
|
|
355908
355894
|
- If the user specifies that they want you to run agents "in parallel", you MUST send a single message with multiple ${AGENT_TOOL_NAME} tool use content blocks. For example, if you need to launch both a build-validator agent and a test-runner agent in parallel, send a single message with both tool calls.
|
|
355909
|
-
- You can optionally set \`model\` to
|
|
355895
|
+
- You can optionally set \`model\` to a slug from the live catalog (or \`inherit\`) and \`effort\` to a level listed for that model. Omit both to inherit the parent conversation's model and effort.
|
|
355910
355896
|
- You can optionally set \`isolation: "none"\` (default, shared workspace) or \`isolation: "worktree"\` to run the agent in a temporary git worktree, giving it an isolated copy of the repository. The worktree is automatically cleaned up if the agent makes no changes; if changes are made, the worktree path and branch are returned in the result. Do not pass any isolation value other than \`"none"\` or \`"worktree"\`.${process.env.USER_TYPE === "ant" ? `
|
|
355911
355897
|
- You can set \`isolation: "remote"\` to run the agent in a remote CCR environment. This is always a background task; you'll be notified when it completes. Use for long-running tasks that need a fresh sandbox.` : ""}${isInProcessTeammate() ? `
|
|
355912
355898
|
- The run_in_background, name, team_name, and mode parameters are not available in this context. Only synchronous subagents are supported.` : isTeammate() ? `
|
|
@@ -355997,8 +355983,8 @@ var init_AgentTool = __esm(() => {
|
|
|
355997
355983
|
description: exports_external.string().describe("A short (3-5 word) title for the task. Required. Shown in the UI as the subagent name."),
|
|
355998
355984
|
prompt: exports_external.string().describe("The full task for the agent to perform. Required. The subagent starts with zero conversation context, so include everything it needs."),
|
|
355999
355985
|
subagent_type: exports_external.string().optional().describe("The type of specialized agent to use for this task. Built-in types include general-purpose, Explore, and Plan when enabled. If omitted, the general-purpose agent is used (or a fork, when forking is enabled)."),
|
|
356000
|
-
model: exports_external.string().optional().describe(`Optional model slug for this subagent. Pass an exact slug from the live catalog in this tool's description,
|
|
356001
|
-
effort: exports_external.string().optional().describe("Optional reasoning effort for this subagent. Pass a level
|
|
355986
|
+
model: exports_external.string().optional().describe(`Optional model slug for this subagent. Pass an exact slug from the live logged-in account catalog in this tool's description, or "inherit". If omitted, uses the agent definition's model or inherits the parent. Do not invent slugs and do not use Claude family aliases such as sonnet, opus, or haiku unless that exact slug is in the catalog.`),
|
|
355987
|
+
effort: exports_external.string().optional().describe("Optional reasoning effort for this subagent. Pass a level from the chosen model's row in this tool's live catalog. If omitted, inherits the parent effort or the agent definition's effort. Do not invent effort names."),
|
|
356002
355988
|
run_in_background: exports_external.boolean().optional().describe("Set to true to run this agent in the background. You will be notified when it completes.")
|
|
356003
355989
|
}));
|
|
356004
355990
|
fullInputSchema2 = lazySchema(() => {
|
|
@@ -356194,8 +356180,11 @@ var init_AgentTool = __esm(() => {
|
|
|
356194
356180
|
if (selectedAgent.color) {
|
|
356195
356181
|
setAgentColor(selectedAgent.agentType, selectedAgent.color);
|
|
356196
356182
|
}
|
|
356183
|
+
if (model && !isInheritAgentModel(model) && !isAccountCatalogModel(model)) {
|
|
356184
|
+
throw new Error(`Model '${model}' is not in the logged-in account catalog. Use inherit or one of: ${formatSubagentModelList(listSubagentModelSlugs())}.`);
|
|
356185
|
+
}
|
|
356197
356186
|
const resolvedAgentModel = getAgentModel(selectedAgent.model, toolUseContext.options.mainLoopModel, isForkPath ? undefined : model, permissionMode);
|
|
356198
|
-
if (model && !isModelAllowed(resolvedAgentModel)) {
|
|
356187
|
+
if (model && !isModelAllowed(resolvedAgentModel) && !isAccountCatalogModel(resolvedAgentModel)) {
|
|
356199
356188
|
throw new Error(`Model '${model}' is not available. Available models: ${formatSubagentModelList(listSubagentModelSlugs())}.`);
|
|
356200
356189
|
}
|
|
356201
356190
|
logEvent("tengu_agent_tool_selected", {
|
|
@@ -366748,7 +366737,7 @@ function getAnthropicEnvMetadata() {
|
|
|
366748
366737
|
function getBuildAgeMinutes() {
|
|
366749
366738
|
if (false)
|
|
366750
366739
|
;
|
|
366751
|
-
const buildTime = new Date("2026-08-15T17:
|
|
366740
|
+
const buildTime = new Date("2026-08-15T17:55:08.183Z").getTime();
|
|
366752
366741
|
if (isNaN(buildTime))
|
|
366753
366742
|
return;
|
|
366754
366743
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -432826,7 +432815,7 @@ function getRecentActivitySync() {
|
|
|
432826
432815
|
return cachedActivity;
|
|
432827
432816
|
}
|
|
432828
432817
|
function getLogoDisplayData() {
|
|
432829
|
-
const version2 = process.env.DEMO_VERSION ?? "0.1.
|
|
432818
|
+
const version2 = process.env.DEMO_VERSION ?? "0.1.37" ?? "99.0.0";
|
|
432830
432819
|
const serverUrl = getDirectConnectServerUrl();
|
|
432831
432820
|
const displayPath = process.env.DEMO_VERSION ? "/code/maximo" : getDisplayPath(getCwd());
|
|
432832
432821
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -462291,7 +462280,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
462291
462280
|
var call57 = async () => {
|
|
462292
462281
|
return {
|
|
462293
462282
|
type: "text",
|
|
462294
|
-
value: `${"99.0.0"} (built ${"2026-08-15T17:
|
|
462283
|
+
value: `${"99.0.0"} (built ${"2026-08-15T17:55:08.183Z"})`
|
|
462295
462284
|
};
|
|
462296
462285
|
}, version2, version_default;
|
|
462297
462286
|
var init_version = __esm(() => {
|
|
@@ -482174,7 +482163,7 @@ function getUsingYourToolsSection(enabledTools) {
|
|
|
482174
482163
|
`);
|
|
482175
482164
|
}
|
|
482176
482165
|
function getAgentToolSection() {
|
|
482177
|
-
return isForkSubagentEnabled() ? `Calling ${AGENT_TOOL_NAME} without a subagent_type creates a fork, which runs in the background and keeps its tool output out of your context — so you can keep chatting with the user while it works. Reach for it when research or multi-step implementation work would otherwise fill your context with raw output you won't need again. **If you ARE the fork** — execute directly; do not re-delegate.` : `Use the ${AGENT_TOOL_NAME} tool with specialized agents when the task at hand matches the agent's description. Subagents are valuable for parallelizing independent queries or for protecting the main context window from excessive results, but they should not be used excessively when not needed. Importantly, avoid duplicating work that subagents are already doing - if you delegate research to a subagent, do not also perform the same searches yourself. Every ${AGENT_TOOL_NAME} call must include \`description\` (3-5 word title) and \`prompt\` (full task). You may set \`model\` to
|
|
482166
|
+
return isForkSubagentEnabled() ? `Calling ${AGENT_TOOL_NAME} without a subagent_type creates a fork, which runs in the background and keeps its tool output out of your context — so you can keep chatting with the user while it works. Reach for it when research or multi-step implementation work would otherwise fill your context with raw output you won't need again. **If you ARE the fork** — execute directly; do not re-delegate.` : `Use the ${AGENT_TOOL_NAME} tool with specialized agents when the task at hand matches the agent's description. Subagents are valuable for parallelizing independent queries or for protecting the main context window from excessive results, but they should not be used excessively when not needed. Importantly, avoid duplicating work that subagents are already doing - if you delegate research to a subagent, do not also perform the same searches yourself. Every ${AGENT_TOOL_NAME} call must include \`description\` (3-5 word title) and \`prompt\` (full task). You may set \`model\` to a slug from the live provider catalog and \`effort\` to a level that catalog lists for that model; omit them to inherit the parent. \`isolation\` is \`"none"\` (default) or \`"worktree"\` — never any other value.`;
|
|
482178
482167
|
}
|
|
482179
482168
|
function getDiscoverSkillsGuidance() {
|
|
482180
482169
|
if (false) {}
|
|
@@ -536823,7 +536812,7 @@ function SetupRow({ children }) {
|
|
|
536823
536812
|
}
|
|
536824
536813
|
function WelcomeV2() {
|
|
536825
536814
|
const { columns } = useTerminalSize();
|
|
536826
|
-
const version3 = "0.1.
|
|
536815
|
+
const version3 = "0.1.37";
|
|
536827
536816
|
const width = Math.max(48, Math.min(columns || 92, 92));
|
|
536828
536817
|
const stacked = width < OCTOPUS_COMPACT_WIDTH + 42;
|
|
536829
536818
|
return /* @__PURE__ */ jsx_runtime479.jsx(ThemedBox_default, {
|
|
@@ -556759,7 +556748,7 @@ Usage: maximo --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
556759
556748
|
pendingHookMessages
|
|
556760
556749
|
}, renderAndRun);
|
|
556761
556750
|
}
|
|
556762
|
-
}).version("0.1.
|
|
556751
|
+
}).version("0.1.37 (Maximo Syntax)", "-v, --version", "Output the version number");
|
|
556763
556752
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
556764
556753
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
556765
556754
|
if (canUserConfigureAdvisor()) {
|
|
@@ -557298,7 +557287,7 @@ function validateProviderEnvOrExit() {
|
|
|
557298
557287
|
async function main2() {
|
|
557299
557288
|
const args = process.argv.slice(2);
|
|
557300
557289
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
557301
|
-
console.log(`${"0.1.
|
|
557290
|
+
console.log(`${"0.1.37"} (Maximo Syntax)`);
|
|
557302
557291
|
return;
|
|
557303
557292
|
}
|
|
557304
557293
|
validateProviderEnvOrExit();
|
|
@@ -557375,4 +557364,4 @@ async function main2() {
|
|
|
557375
557364
|
}
|
|
557376
557365
|
main2();
|
|
557377
557366
|
|
|
557378
|
-
//# debugId=
|
|
557367
|
+
//# debugId=FF97CF4ACB87F2D964756E2164756E21
|