@maximoai/maximo-syntax-cli 0.1.36 → 0.1.38

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +563 -532
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -108412,14 +108412,23 @@ var init_betas = __esm(() => {
108412
108412
 
108413
108413
  // src/utils/model/modelDefaults.ts
108414
108414
  function normalizeRetiredMytabulonModel(value) {
108415
- if (value === RETIRED_MYTABULON_MODEL)
108415
+ if (value !== undefined && RETIRED_MYTABULON_MODEL_SET.has(value)) {
108416
108416
  return MYTABULON_DEFAULT_MODEL;
108417
+ }
108417
108418
  return value;
108418
108419
  }
108419
108420
  function chooseMytabulonDefaultModel(modelIds) {
108420
- return modelIds.find((id) => id === MYTABULON_DEFAULT_MODEL) ?? modelIds.find((id) => id !== RETIRED_MYTABULON_MODEL) ?? MYTABULON_DEFAULT_MODEL;
108421
- }
108422
- var MYTABULON_DEFAULT_MODEL = "maximo-atlas-1.2", RETIRED_MYTABULON_MODEL = "maximo-atlas-preview";
108421
+ return modelIds.find((id) => id === MYTABULON_DEFAULT_MODEL) ?? modelIds.find((id) => !RETIRED_MYTABULON_MODEL_SET.has(id)) ?? MYTABULON_DEFAULT_MODEL;
108422
+ }
108423
+ var MYTABULON_DEFAULT_MODEL = "maximo-atlas-1.2", RETIRED_MYTABULON_MODELS, RETIRED_MYTABULON_MODEL_SET;
108424
+ var init_modelDefaults = __esm(() => {
108425
+ RETIRED_MYTABULON_MODELS = [
108426
+ "maximo-atlas-preview",
108427
+ "maximo-atlas-1.1",
108428
+ "atlas-1.1"
108429
+ ];
108430
+ RETIRED_MYTABULON_MODEL_SET = new Set(RETIRED_MYTABULON_MODELS);
108431
+ });
108423
108432
 
108424
108433
  // src/services/api/maximoModels.ts
108425
108434
  function normalizedBaseUrl(baseUrl) {
@@ -109025,6 +109034,7 @@ var init_maximoModels = __esm(() => {
109025
109034
  init_config2();
109026
109035
  init_log3();
109027
109036
  init_auth2();
109037
+ init_modelDefaults();
109028
109038
  CACHE_TTL = 5 * 60 * 1000;
109029
109039
  OPENCODE_CHAT_COMPLETION_MODELS = {
109030
109040
  zen: new Set([
@@ -110194,6 +110204,7 @@ var init_model = __esm(() => {
110194
110204
  init_context();
110195
110205
  init_envUtils();
110196
110206
  init_modelStrings();
110207
+ init_modelDefaults();
110197
110208
  init_modelCost();
110198
110209
  init_settings2();
110199
110210
  init_providers();
@@ -124000,7 +124011,7 @@ var init_metadata = __esm(() => {
124000
124011
  isMaximoAiAuth: isMaximoAISubscriber(),
124001
124012
  version: "99.0.0",
124002
124013
  versionBase: getVersionBase(),
124003
- buildTime: "2026-08-15T17:46:38.288Z",
124014
+ buildTime: "2026-08-20T22:52:41.981Z",
124004
124015
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
124005
124016
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
124006
124017
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -169873,7 +169884,7 @@ var init_exploreAgent = __esm(() => {
169873
169884
  ],
169874
169885
  source: "built-in",
169875
169886
  baseDir: "built-in",
169876
- model: process.env.USER_TYPE === "ant" ? "inherit" : "haiku",
169887
+ model: "inherit",
169877
169888
  omitMaximoMd: true,
169878
169889
  getSystemPrompt: () => getExploreSystemPrompt()
169879
169890
  };
@@ -170127,7 +170138,7 @@ var init_statuslineSetup = __esm(() => {
170127
170138
  tools: ["Read", "Edit"],
170128
170139
  source: "built-in",
170129
170140
  baseDir: "built-in",
170130
- model: "sonnet",
170141
+ model: "inherit",
170131
170142
  color: "orange",
170132
170143
  getSystemPrompt: () => STATUSLINE_SYSTEM_PROMPT
170133
170144
  };
@@ -263668,486 +263679,6 @@ var init_registerFrontmatterHooks = __esm(() => {
263668
263679
  init_sessionHooks();
263669
263680
  });
263670
263681
 
263671
- // src/utils/model/check1mAccess.ts
263672
- function isExtraUsageEnabled() {
263673
- const reason = getGlobalConfig().cachedExtraUsageDisabledReason;
263674
- if (reason === undefined) {
263675
- return false;
263676
- }
263677
- if (reason === null) {
263678
- return true;
263679
- }
263680
- switch (reason) {
263681
- case "out_of_credits":
263682
- return true;
263683
- case "overage_not_provisioned":
263684
- case "org_level_disabled":
263685
- case "org_level_disabled_until":
263686
- case "seat_tier_level_disabled":
263687
- case "member_level_disabled":
263688
- case "seat_tier_zero_credit_limit":
263689
- case "group_zero_credit_limit":
263690
- case "member_zero_credit_limit":
263691
- case "org_service_level_disabled":
263692
- case "org_service_zero_credit_limit":
263693
- case "no_limits_configured":
263694
- case "unknown":
263695
- return false;
263696
- default:
263697
- return false;
263698
- }
263699
- }
263700
- function checkOpus1mAccess() {
263701
- if (is1mContextDisabled()) {
263702
- return false;
263703
- }
263704
- if (isMaximoAISubscriber()) {
263705
- return isExtraUsageEnabled();
263706
- }
263707
- return true;
263708
- }
263709
- function checkSonnet1mAccess() {
263710
- if (is1mContextDisabled()) {
263711
- return false;
263712
- }
263713
- if (isMaximoAISubscriber()) {
263714
- return isExtraUsageEnabled();
263715
- }
263716
- return true;
263717
- }
263718
- var init_check1mAccess = __esm(() => {
263719
- init_auth2();
263720
- init_config2();
263721
- init_context();
263722
- });
263723
-
263724
- // src/utils/model/modelOptions.ts
263725
- function getDefaultOptionForUser(fastMode = false) {
263726
- if (process.env.USER_TYPE === "ant") {
263727
- const currentModel = renderDefaultModelSetting(getDefaultMainLoopModelSetting());
263728
- return {
263729
- value: null,
263730
- label: "Default (recommended)",
263731
- description: `Use the default model for Ants (currently ${currentModel})`,
263732
- descriptionForModel: `Default model (currently ${currentModel})`
263733
- };
263734
- }
263735
- if (isMaximoAISubscriber()) {
263736
- return {
263737
- value: null,
263738
- label: "Default (recommended)",
263739
- description: getMaximoAiUserDefaultModelDescription(fastMode)
263740
- };
263741
- }
263742
- const is3P = getAPIProvider() !== "firstParty";
263743
- return {
263744
- value: null,
263745
- label: "Default (recommended)",
263746
- description: `Use the default model (currently ${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
263747
- };
263748
- }
263749
- function getCustomSonnetOption() {
263750
- const is3P = getAPIProvider() !== "firstParty";
263751
- const customSonnetModel = process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;
263752
- if (is3P && customSonnetModel) {
263753
- const is1m = has1mContext(customSonnetModel);
263754
- return {
263755
- value: "sonnet",
263756
- label: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME ?? customSonnetModel,
263757
- description: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " (1M context)" : ""}`,
263758
- descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " with 1M context" : ""}`} (${customSonnetModel})`
263759
- };
263760
- }
263761
- }
263762
- function getSonnet46Option() {
263763
- const is3P = getAPIProvider() !== "firstParty";
263764
- return {
263765
- value: is3P ? getModelStrings2().sonnet46 : "sonnet",
263766
- label: "Sonnet",
263767
- description: `Sonnet 4.6 · Best for everyday tasks${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
263768
- descriptionForModel: "Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks"
263769
- };
263770
- }
263771
- function getCustomOpusOption() {
263772
- const is3P = getAPIProvider() !== "firstParty";
263773
- const customOpusModel = process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
263774
- if (is3P && customOpusModel) {
263775
- const is1m = has1mContext(customOpusModel);
263776
- return {
263777
- value: "opus",
263778
- label: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ?? customOpusModel,
263779
- description: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " (1M context)" : ""}`,
263780
- descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " with 1M context" : ""}`} (${customOpusModel})`
263781
- };
263782
- }
263783
- }
263784
- function getOpus41Option() {
263785
- return {
263786
- value: "opus",
263787
- label: "Opus 4.1",
263788
- description: `Opus 4.1 · Legacy`,
263789
- descriptionForModel: "Opus 4.1 - legacy version"
263790
- };
263791
- }
263792
- function getOpus46Option(fastMode = false) {
263793
- const is3P = getAPIProvider() !== "firstParty";
263794
- return {
263795
- value: is3P ? getModelStrings2().opus46 : "opus",
263796
- label: "Opus",
263797
- description: `Opus 4.6 · Most capable for complex work${getOpus46PricingSuffix(fastMode)}`,
263798
- descriptionForModel: "Opus 4.6 - most capable for complex work"
263799
- };
263800
- }
263801
- function getSonnet46_1MOption() {
263802
- const is3P = getAPIProvider() !== "firstParty";
263803
- return {
263804
- value: is3P ? getModelStrings2().sonnet46 + "[1m]" : "sonnet[1m]",
263805
- label: "Sonnet (1M context)",
263806
- description: `Sonnet 4.6 for long sessions${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
263807
- descriptionForModel: "Sonnet 4.6 with 1M context window - for long sessions with large codebases"
263808
- };
263809
- }
263810
- function getOpus46_1MOption(fastMode = false) {
263811
- const is3P = getAPIProvider() !== "firstParty";
263812
- return {
263813
- value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
263814
- label: "Opus (1M context)",
263815
- description: `Opus 4.6 for long sessions${getOpus46PricingSuffix(fastMode)}`,
263816
- descriptionForModel: "Opus 4.6 with 1M context window - for long sessions with large codebases"
263817
- };
263818
- }
263819
- function getCustomHaikuOption() {
263820
- const is3P = getAPIProvider() !== "firstParty";
263821
- const customHaikuModel = process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
263822
- if (is3P && customHaikuModel) {
263823
- return {
263824
- value: "haiku",
263825
- label: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME ?? customHaikuModel,
263826
- description: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model",
263827
- descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model"} (${customHaikuModel})`
263828
- };
263829
- }
263830
- }
263831
- function getHaiku45Option() {
263832
- const is3P = getAPIProvider() !== "firstParty";
263833
- return {
263834
- value: "haiku",
263835
- label: "Haiku",
263836
- description: `Haiku 4.5 · Fastest for quick answers${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_45)}`}`,
263837
- descriptionForModel: "Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6."
263838
- };
263839
- }
263840
- function getHaiku35Option() {
263841
- const is3P = getAPIProvider() !== "firstParty";
263842
- return {
263843
- value: "haiku",
263844
- label: "Haiku",
263845
- description: `Haiku 3.5 for simple tasks${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_35)}`}`,
263846
- descriptionForModel: "Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks."
263847
- };
263848
- }
263849
- function getHaikuOption() {
263850
- const haikuModel = getDefaultHaikuModel();
263851
- return haikuModel === getModelStrings2().haiku45 ? getHaiku45Option() : getHaiku35Option();
263852
- }
263853
- function getMaxOpusOption(fastMode = false) {
263854
- return {
263855
- value: "opus",
263856
- label: "Opus",
263857
- description: `Opus 4.6 · Most capable for complex work${fastMode ? getOpus46PricingSuffix(true) : ""}`
263858
- };
263859
- }
263860
- function getMaxSonnet46_1MOption() {
263861
- const is3P = getAPIProvider() !== "firstParty";
263862
- const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
263863
- return {
263864
- value: "sonnet[1m]",
263865
- label: "Sonnet (1M context)",
263866
- description: `Sonnet 4.6 with 1M context${billingInfo}${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
263867
- };
263868
- }
263869
- function getMaxOpus46_1MOption(fastMode = false) {
263870
- const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
263871
- return {
263872
- value: "opus[1m]",
263873
- label: "Opus (1M context)",
263874
- description: `Opus 4.6 with 1M context${billingInfo}${getOpus46PricingSuffix(fastMode)}`
263875
- };
263876
- }
263877
- function getMergedOpus1MOption(fastMode = false) {
263878
- const is3P = getAPIProvider() !== "firstParty";
263879
- return {
263880
- value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
263881
- label: "Opus (1M context)",
263882
- description: `Opus 4.6 with 1M context · Most capable for complex work${!is3P && fastMode ? getOpus46PricingSuffix(fastMode) : ""}`,
263883
- descriptionForModel: "Opus 4.6 with 1M context - most capable for complex work"
263884
- };
263885
- }
263886
- function getOpusPlanOption() {
263887
- return {
263888
- value: "opusplan",
263889
- label: "Opus Plan Mode",
263890
- description: "Use Opus 4.6 in plan mode, Sonnet 4.6 otherwise"
263891
- };
263892
- }
263893
- function getCodexPlanOption() {
263894
- return {
263895
- value: "codexplan",
263896
- label: "Codex Plan",
263897
- description: "GPT-5.4 on the Codex backend with high reasoning"
263898
- };
263899
- }
263900
- function getCodexSparkOption() {
263901
- return {
263902
- value: "codexspark",
263903
- label: "Codex Spark",
263904
- description: "GPT-5.3 Codex Spark on the Codex backend for fast tool loops"
263905
- };
263906
- }
263907
- function getModelOptionsBase(fastMode = false) {
263908
- if (process.env.USER_TYPE === "ant") {
263909
- const antModelOptions = getAntModels().map((m) => ({
263910
- value: m.alias,
263911
- label: m.label,
263912
- description: m.description ?? `[ANT-ONLY] ${m.label} (${m.model})`
263913
- }));
263914
- return [
263915
- getDefaultOptionForUser(),
263916
- ...antModelOptions,
263917
- getMergedOpus1MOption(fastMode),
263918
- getSonnet46Option(),
263919
- getSonnet46_1MOption(),
263920
- getHaiku45Option()
263921
- ];
263922
- }
263923
- if (isMaximoAISubscriber()) {
263924
- if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
263925
- const premiumOptions = [getDefaultOptionForUser(fastMode)];
263926
- if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
263927
- premiumOptions.push(getMaxOpus46_1MOption(fastMode));
263928
- }
263929
- premiumOptions.push(MaxSonnet46Option);
263930
- if (checkSonnet1mAccess()) {
263931
- premiumOptions.push(getMaxSonnet46_1MOption());
263932
- }
263933
- premiumOptions.push(MaxHaiku45Option);
263934
- return premiumOptions;
263935
- }
263936
- const standardOptions = [getDefaultOptionForUser(fastMode)];
263937
- if (checkSonnet1mAccess()) {
263938
- standardOptions.push(getMaxSonnet46_1MOption());
263939
- }
263940
- if (isOpus1mMergeEnabled()) {
263941
- standardOptions.push(getMergedOpus1MOption(fastMode));
263942
- } else {
263943
- standardOptions.push(getMaxOpusOption(fastMode));
263944
- if (checkOpus1mAccess()) {
263945
- standardOptions.push(getMaxOpus46_1MOption(fastMode));
263946
- }
263947
- }
263948
- standardOptions.push(MaxHaiku45Option);
263949
- return standardOptions;
263950
- }
263951
- if (getAPIProvider() === "firstParty") {
263952
- const payg1POptions = [getDefaultOptionForUser(fastMode)];
263953
- if (checkSonnet1mAccess()) {
263954
- payg1POptions.push(getSonnet46_1MOption());
263955
- }
263956
- if (isOpus1mMergeEnabled()) {
263957
- payg1POptions.push(getMergedOpus1MOption(fastMode));
263958
- } else {
263959
- payg1POptions.push(getOpus46Option(fastMode));
263960
- if (checkOpus1mAccess()) {
263961
- payg1POptions.push(getOpus46_1MOption(fastMode));
263962
- }
263963
- }
263964
- payg1POptions.push(getHaiku45Option());
263965
- return payg1POptions;
263966
- }
263967
- const payg3pOptions = [getDefaultOptionForUser(fastMode)];
263968
- if (getAPIProvider() === "openai") {
263969
- payg3pOptions.push(getCodexPlanOption(), getCodexSparkOption());
263970
- }
263971
- const customSonnet = getCustomSonnetOption();
263972
- if (customSonnet !== undefined) {
263973
- payg3pOptions.push(customSonnet);
263974
- } else {
263975
- payg3pOptions.push(getSonnet46Option());
263976
- if (checkSonnet1mAccess()) {
263977
- payg3pOptions.push(getSonnet46_1MOption());
263978
- }
263979
- }
263980
- const customOpus = getCustomOpusOption();
263981
- if (customOpus !== undefined) {
263982
- payg3pOptions.push(customOpus);
263983
- } else {
263984
- payg3pOptions.push(getOpus41Option());
263985
- payg3pOptions.push(getOpus46Option(fastMode));
263986
- if (checkOpus1mAccess()) {
263987
- payg3pOptions.push(getOpus46_1MOption(fastMode));
263988
- }
263989
- }
263990
- const customHaiku = getCustomHaikuOption();
263991
- if (customHaiku !== undefined) {
263992
- payg3pOptions.push(customHaiku);
263993
- } else {
263994
- payg3pOptions.push(getHaikuOption());
263995
- }
263996
- return payg3pOptions;
263997
- }
263998
- function getModelFamilyInfo(model) {
263999
- const canonical = getCanonicalName(model);
264000
- 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")) {
264001
- const currentName = getMarketingNameForModel(getDefaultSonnetModel());
264002
- if (currentName) {
264003
- return { alias: "Sonnet", currentVersionName: currentName };
264004
- }
264005
- }
264006
- if (canonical.includes("claude-opus-4")) {
264007
- const currentName = getMarketingNameForModel(getDefaultOpusModel());
264008
- if (currentName) {
264009
- return { alias: "Opus", currentVersionName: currentName };
264010
- }
264011
- }
264012
- if (canonical.includes("claude-haiku") || canonical.includes("claude-3-5-haiku")) {
264013
- const currentName = getMarketingNameForModel(getDefaultHaikuModel());
264014
- if (currentName) {
264015
- return { alias: "Haiku", currentVersionName: currentName };
264016
- }
264017
- }
264018
- return null;
264019
- }
264020
- function getKnownModelOption(model) {
264021
- const marketingName = getMarketingNameForModel(model);
264022
- if (!marketingName)
264023
- return null;
264024
- const familyInfo = getModelFamilyInfo(model);
264025
- if (!familyInfo) {
264026
- return {
264027
- value: model,
264028
- label: marketingName,
264029
- description: model
264030
- };
264031
- }
264032
- if (marketingName !== familyInfo.currentVersionName) {
264033
- return {
264034
- value: model,
264035
- label: marketingName,
264036
- description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`
264037
- };
264038
- }
264039
- return {
264040
- value: model,
264041
- label: marketingName,
264042
- description: model
264043
- };
264044
- }
264045
- async function getModelOptionsAsync(fastMode = false) {
264046
- const maximoOptions = await getMaximoModelOptions();
264047
- if (maximoOptions) {
264048
- return filterModelOptionsByAllowlist([
264049
- getDefaultOptionForUser(fastMode),
264050
- ...maximoOptions
264051
- ]);
264052
- }
264053
- return getModelOptionsBase(fastMode);
264054
- }
264055
- function getModelOptions(fastMode = false) {
264056
- const maximoOptions = getCachedMaximoModelOptions();
264057
- if (maximoOptions) {
264058
- return filterModelOptionsByAllowlist([
264059
- getDefaultOptionForUser(fastMode),
264060
- ...maximoOptions
264061
- ]);
264062
- }
264063
- const options2 = getModelOptionsBase(fastMode);
264064
- const envCustomModel = process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;
264065
- if (envCustomModel && !options2.some((existing) => existing.value === envCustomModel)) {
264066
- options2.push({
264067
- value: envCustomModel,
264068
- label: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME ?? envCustomModel,
264069
- description: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION ?? `Custom model (${envCustomModel})`
264070
- });
264071
- }
264072
- for (const opt of getGlobalConfig().additionalModelOptionsCache ?? []) {
264073
- if (!options2.some((existing) => existing.value === opt.value)) {
264074
- options2.push(opt);
264075
- }
264076
- }
264077
- let customModel = null;
264078
- const currentMainLoopModel = getUserSpecifiedModelSetting();
264079
- const initialMainLoopModel = getInitialMainLoopModel();
264080
- if (currentMainLoopModel !== undefined && currentMainLoopModel !== null) {
264081
- customModel = currentMainLoopModel;
264082
- } else if (initialMainLoopModel !== null) {
264083
- customModel = initialMainLoopModel;
264084
- }
264085
- if (customModel === null || options2.some((opt) => opt.value === customModel)) {
264086
- return filterModelOptionsByAllowlist(options2);
264087
- } else if (customModel === "opusplan") {
264088
- return filterModelOptionsByAllowlist([...options2, getOpusPlanOption()]);
264089
- } else if (customModel === "codexplan") {
264090
- return filterModelOptionsByAllowlist([...options2, getCodexPlanOption()]);
264091
- } else if (customModel === "codexspark") {
264092
- return filterModelOptionsByAllowlist([...options2, getCodexSparkOption()]);
264093
- } else if (customModel === "opus" && getAPIProvider() === "firstParty") {
264094
- return filterModelOptionsByAllowlist([
264095
- ...options2,
264096
- getMaxOpusOption(fastMode)
264097
- ]);
264098
- } else if (customModel === "opus[1m]" && getAPIProvider() === "firstParty") {
264099
- return filterModelOptionsByAllowlist([
264100
- ...options2,
264101
- getMergedOpus1MOption(fastMode)
264102
- ]);
264103
- } else {
264104
- const knownOption = getKnownModelOption(customModel);
264105
- if (knownOption) {
264106
- options2.push(knownOption);
264107
- } else {
264108
- options2.push({
264109
- value: customModel,
264110
- label: customModel,
264111
- description: "Custom model"
264112
- });
264113
- }
264114
- return filterModelOptionsByAllowlist(options2);
264115
- }
264116
- }
264117
- function filterModelOptionsByAllowlist(options2) {
264118
- const settings = getSettings_DEPRECATED() || {};
264119
- if (!settings.availableModels) {
264120
- return options2;
264121
- }
264122
- return options2.filter((opt) => opt.value === null || opt.value !== null && isModelAllowed(opt.value));
264123
- }
264124
- var MaxSonnet46Option, MaxHaiku45Option;
264125
- var init_modelOptions = __esm(() => {
264126
- init_state();
264127
- init_antModels();
264128
- init_auth2();
264129
- init_modelStrings();
264130
- init_modelCost();
264131
- init_settings2();
264132
- init_check1mAccess();
264133
- init_providers();
264134
- init_modelAllowlist();
264135
- init_model();
264136
- init_context();
264137
- init_config2();
264138
- init_maximoModels();
264139
- MaxSonnet46Option = {
264140
- value: "sonnet",
264141
- label: "Sonnet",
264142
- description: "Sonnet 4.6 · Best for everyday tasks"
264143
- };
264144
- MaxHaiku45Option = {
264145
- value: "haiku",
264146
- label: "Haiku",
264147
- description: "Haiku 4.5 · Fastest for quick answers"
264148
- };
264149
- });
264150
-
264151
263682
  // src/utils/model/agent.ts
264152
263683
  function getDefaultSubagentModel() {
264153
263684
  return "inherit";
@@ -264222,7 +263753,11 @@ function getAgentModelOptions() {
264222
263753
  ];
264223
263754
  const seen = new Set(["inherit"]);
264224
263755
  try {
264225
- for (const option of getModelOptions()) {
263756
+ const catalog = [
263757
+ ...getCachedMaximoModelOptions() ?? [],
263758
+ ...getGlobalConfig().additionalModelOptionsCache ?? []
263759
+ ];
263760
+ for (const option of catalog) {
264226
263761
  if (typeof option.value !== "string" || !option.value.trim())
264227
263762
  continue;
264228
263763
  if (seen.has(option.value))
@@ -264230,32 +263765,11 @@ function getAgentModelOptions() {
264230
263765
  seen.add(option.value);
264231
263766
  options2.push({
264232
263767
  value: option.value,
264233
- label: option.label,
264234
- description: option.description
263768
+ label: option.label || option.value,
263769
+ description: option.description || "From the logged-in account catalog"
264235
263770
  });
264236
263771
  }
264237
263772
  } catch {}
264238
- const aliasFallbacks = [
264239
- {
264240
- value: "sonnet",
264241
- label: "Sonnet",
264242
- description: "Balanced performance - best for most agents"
264243
- },
264244
- {
264245
- value: "opus",
264246
- label: "Opus",
264247
- description: "Most capable for complex reasoning tasks"
264248
- },
264249
- {
264250
- value: "haiku",
264251
- label: "Haiku",
264252
- description: "Fast and efficient for simple tasks"
264253
- }
264254
- ];
264255
- for (const alias of aliasFallbacks) {
264256
- if (!seen.has(alias.value))
264257
- options2.push(alias);
264258
- }
264259
263773
  return options2;
264260
263774
  }
264261
263775
  var AGENT_MODEL_OPTIONS;
@@ -264264,7 +263778,8 @@ var init_agent = __esm(() => {
264264
263778
  init_aliases();
264265
263779
  init_bedrock();
264266
263780
  init_model();
264267
- init_modelOptions();
263781
+ init_maximoModels();
263782
+ init_config2();
264268
263783
  init_providers();
264269
263784
  AGENT_MODEL_OPTIONS = [...MODEL_ALIASES, "inherit"];
264270
263785
  });
@@ -267730,6 +267245,59 @@ var init_AssistantRedactedThinkingMessage = __esm(() => {
267730
267245
  jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
267731
267246
  });
267732
267247
 
267248
+ // src/utils/model/check1mAccess.ts
267249
+ function isExtraUsageEnabled() {
267250
+ const reason = getGlobalConfig().cachedExtraUsageDisabledReason;
267251
+ if (reason === undefined) {
267252
+ return false;
267253
+ }
267254
+ if (reason === null) {
267255
+ return true;
267256
+ }
267257
+ switch (reason) {
267258
+ case "out_of_credits":
267259
+ return true;
267260
+ case "overage_not_provisioned":
267261
+ case "org_level_disabled":
267262
+ case "org_level_disabled_until":
267263
+ case "seat_tier_level_disabled":
267264
+ case "member_level_disabled":
267265
+ case "seat_tier_zero_credit_limit":
267266
+ case "group_zero_credit_limit":
267267
+ case "member_zero_credit_limit":
267268
+ case "org_service_level_disabled":
267269
+ case "org_service_zero_credit_limit":
267270
+ case "no_limits_configured":
267271
+ case "unknown":
267272
+ return false;
267273
+ default:
267274
+ return false;
267275
+ }
267276
+ }
267277
+ function checkOpus1mAccess() {
267278
+ if (is1mContextDisabled()) {
267279
+ return false;
267280
+ }
267281
+ if (isMaximoAISubscriber()) {
267282
+ return isExtraUsageEnabled();
267283
+ }
267284
+ return true;
267285
+ }
267286
+ function checkSonnet1mAccess() {
267287
+ if (is1mContextDisabled()) {
267288
+ return false;
267289
+ }
267290
+ if (isMaximoAISubscriber()) {
267291
+ return isExtraUsageEnabled();
267292
+ }
267293
+ return true;
267294
+ }
267295
+ var init_check1mAccess = __esm(() => {
267296
+ init_auth2();
267297
+ init_config2();
267298
+ init_context();
267299
+ });
267300
+
267733
267301
  // src/utils/model/contextWindowUpgradeCheck.ts
267734
267302
  function getAvailableUpgrade() {
267735
267303
  const currentModelSetting = getUserSpecifiedModelSetting();
@@ -277217,7 +276785,7 @@ import { access as access3, writeFile as writeFile13 } from "fs/promises";
277217
276785
  import { homedir as homedir22 } from "os";
277218
276786
  import { join as join65 } from "path";
277219
276787
  function getCurrentRealVersion() {
277220
- return "0.1.36";
276788
+ return "0.1.38";
277221
276789
  }
277222
276790
  async function getRolloutConfig() {
277223
276791
  try {
@@ -350956,6 +350524,433 @@ var init_ExitWorktreeTool = __esm(() => {
350956
350524
  // src/tools/ConfigTool/constants.ts
350957
350525
  var CONFIG_TOOL_NAME = "Config";
350958
350526
 
350527
+ // src/utils/model/modelOptions.ts
350528
+ function getDefaultOptionForUser(fastMode = false) {
350529
+ if (process.env.USER_TYPE === "ant") {
350530
+ const currentModel = renderDefaultModelSetting(getDefaultMainLoopModelSetting());
350531
+ return {
350532
+ value: null,
350533
+ label: "Default (recommended)",
350534
+ description: `Use the default model for Ants (currently ${currentModel})`,
350535
+ descriptionForModel: `Default model (currently ${currentModel})`
350536
+ };
350537
+ }
350538
+ if (isMaximoAISubscriber()) {
350539
+ return {
350540
+ value: null,
350541
+ label: "Default (recommended)",
350542
+ description: getMaximoAiUserDefaultModelDescription(fastMode)
350543
+ };
350544
+ }
350545
+ const is3P = getAPIProvider() !== "firstParty";
350546
+ return {
350547
+ value: null,
350548
+ label: "Default (recommended)",
350549
+ description: `Use the default model (currently ${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
350550
+ };
350551
+ }
350552
+ function getCustomSonnetOption() {
350553
+ const is3P = getAPIProvider() !== "firstParty";
350554
+ const customSonnetModel = process.env.ANTHROPIC_DEFAULT_SONNET_MODEL;
350555
+ if (is3P && customSonnetModel) {
350556
+ const is1m = has1mContext(customSonnetModel);
350557
+ return {
350558
+ value: "sonnet",
350559
+ label: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_NAME ?? customSonnetModel,
350560
+ description: process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " (1M context)" : ""}`,
350561
+ descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION ?? `Custom Sonnet model${is1m ? " with 1M context" : ""}`} (${customSonnetModel})`
350562
+ };
350563
+ }
350564
+ }
350565
+ function getSonnet46Option() {
350566
+ const is3P = getAPIProvider() !== "firstParty";
350567
+ return {
350568
+ value: is3P ? getModelStrings2().sonnet46 : "sonnet",
350569
+ label: "Sonnet",
350570
+ description: `Sonnet 4.6 · Best for everyday tasks${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
350571
+ descriptionForModel: "Sonnet 4.6 - best for everyday tasks. Generally recommended for most coding tasks"
350572
+ };
350573
+ }
350574
+ function getCustomOpusOption() {
350575
+ const is3P = getAPIProvider() !== "firstParty";
350576
+ const customOpusModel = process.env.ANTHROPIC_DEFAULT_OPUS_MODEL;
350577
+ if (is3P && customOpusModel) {
350578
+ const is1m = has1mContext(customOpusModel);
350579
+ return {
350580
+ value: "opus",
350581
+ label: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ?? customOpusModel,
350582
+ description: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " (1M context)" : ""}`,
350583
+ descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? " with 1M context" : ""}`} (${customOpusModel})`
350584
+ };
350585
+ }
350586
+ }
350587
+ function getOpus41Option() {
350588
+ return {
350589
+ value: "opus",
350590
+ label: "Opus 4.1",
350591
+ description: `Opus 4.1 · Legacy`,
350592
+ descriptionForModel: "Opus 4.1 - legacy version"
350593
+ };
350594
+ }
350595
+ function getOpus46Option(fastMode = false) {
350596
+ const is3P = getAPIProvider() !== "firstParty";
350597
+ return {
350598
+ value: is3P ? getModelStrings2().opus46 : "opus",
350599
+ label: "Opus",
350600
+ description: `Opus 4.6 · Most capable for complex work${getOpus46PricingSuffix(fastMode)}`,
350601
+ descriptionForModel: "Opus 4.6 - most capable for complex work"
350602
+ };
350603
+ }
350604
+ function getSonnet46_1MOption() {
350605
+ const is3P = getAPIProvider() !== "firstParty";
350606
+ return {
350607
+ value: is3P ? getModelStrings2().sonnet46 + "[1m]" : "sonnet[1m]",
350608
+ label: "Sonnet (1M context)",
350609
+ description: `Sonnet 4.6 for long sessions${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`,
350610
+ descriptionForModel: "Sonnet 4.6 with 1M context window - for long sessions with large codebases"
350611
+ };
350612
+ }
350613
+ function getOpus46_1MOption(fastMode = false) {
350614
+ const is3P = getAPIProvider() !== "firstParty";
350615
+ return {
350616
+ value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
350617
+ label: "Opus (1M context)",
350618
+ description: `Opus 4.6 for long sessions${getOpus46PricingSuffix(fastMode)}`,
350619
+ descriptionForModel: "Opus 4.6 with 1M context window - for long sessions with large codebases"
350620
+ };
350621
+ }
350622
+ function getCustomHaikuOption() {
350623
+ const is3P = getAPIProvider() !== "firstParty";
350624
+ const customHaikuModel = process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL;
350625
+ if (is3P && customHaikuModel) {
350626
+ return {
350627
+ value: "haiku",
350628
+ label: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME ?? customHaikuModel,
350629
+ description: process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model",
350630
+ descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION ?? "Custom Haiku model"} (${customHaikuModel})`
350631
+ };
350632
+ }
350633
+ }
350634
+ function getHaiku45Option() {
350635
+ const is3P = getAPIProvider() !== "firstParty";
350636
+ return {
350637
+ value: "haiku",
350638
+ label: "Haiku",
350639
+ description: `Haiku 4.5 · Fastest for quick answers${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_45)}`}`,
350640
+ descriptionForModel: "Haiku 4.5 - fastest for quick answers. Lower cost but less capable than Sonnet 4.6."
350641
+ };
350642
+ }
350643
+ function getHaiku35Option() {
350644
+ const is3P = getAPIProvider() !== "firstParty";
350645
+ return {
350646
+ value: "haiku",
350647
+ label: "Haiku",
350648
+ description: `Haiku 3.5 for simple tasks${is3P ? "" : ` · ${formatModelPricing(COST_HAIKU_35)}`}`,
350649
+ descriptionForModel: "Haiku 3.5 - faster and lower cost, but less capable than Sonnet. Use for simple tasks."
350650
+ };
350651
+ }
350652
+ function getHaikuOption() {
350653
+ const haikuModel = getDefaultHaikuModel();
350654
+ return haikuModel === getModelStrings2().haiku45 ? getHaiku45Option() : getHaiku35Option();
350655
+ }
350656
+ function getMaxOpusOption(fastMode = false) {
350657
+ return {
350658
+ value: "opus",
350659
+ label: "Opus",
350660
+ description: `Opus 4.6 · Most capable for complex work${fastMode ? getOpus46PricingSuffix(true) : ""}`
350661
+ };
350662
+ }
350663
+ function getMaxSonnet46_1MOption() {
350664
+ const is3P = getAPIProvider() !== "firstParty";
350665
+ const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
350666
+ return {
350667
+ value: "sonnet[1m]",
350668
+ label: "Sonnet (1M context)",
350669
+ description: `Sonnet 4.6 with 1M context${billingInfo}${is3P ? "" : ` · ${formatModelPricing(COST_TIER_3_15)}`}`
350670
+ };
350671
+ }
350672
+ function getMaxOpus46_1MOption(fastMode = false) {
350673
+ const billingInfo = isMaximoAISubscriber() ? " · Billed as extra usage" : "";
350674
+ return {
350675
+ value: "opus[1m]",
350676
+ label: "Opus (1M context)",
350677
+ description: `Opus 4.6 with 1M context${billingInfo}${getOpus46PricingSuffix(fastMode)}`
350678
+ };
350679
+ }
350680
+ function getMergedOpus1MOption(fastMode = false) {
350681
+ const is3P = getAPIProvider() !== "firstParty";
350682
+ return {
350683
+ value: is3P ? getModelStrings2().opus46 + "[1m]" : "opus[1m]",
350684
+ label: "Opus (1M context)",
350685
+ description: `Opus 4.6 with 1M context · Most capable for complex work${!is3P && fastMode ? getOpus46PricingSuffix(fastMode) : ""}`,
350686
+ descriptionForModel: "Opus 4.6 with 1M context - most capable for complex work"
350687
+ };
350688
+ }
350689
+ function getOpusPlanOption() {
350690
+ return {
350691
+ value: "opusplan",
350692
+ label: "Opus Plan Mode",
350693
+ description: "Use Opus 4.6 in plan mode, Sonnet 4.6 otherwise"
350694
+ };
350695
+ }
350696
+ function getCodexPlanOption() {
350697
+ return {
350698
+ value: "codexplan",
350699
+ label: "Codex Plan",
350700
+ description: "GPT-5.4 on the Codex backend with high reasoning"
350701
+ };
350702
+ }
350703
+ function getCodexSparkOption() {
350704
+ return {
350705
+ value: "codexspark",
350706
+ label: "Codex Spark",
350707
+ description: "GPT-5.3 Codex Spark on the Codex backend for fast tool loops"
350708
+ };
350709
+ }
350710
+ function getModelOptionsBase(fastMode = false) {
350711
+ if (process.env.USER_TYPE === "ant") {
350712
+ const antModelOptions = getAntModels().map((m) => ({
350713
+ value: m.alias,
350714
+ label: m.label,
350715
+ description: m.description ?? `[ANT-ONLY] ${m.label} (${m.model})`
350716
+ }));
350717
+ return [
350718
+ getDefaultOptionForUser(),
350719
+ ...antModelOptions,
350720
+ getMergedOpus1MOption(fastMode),
350721
+ getSonnet46Option(),
350722
+ getSonnet46_1MOption(),
350723
+ getHaiku45Option()
350724
+ ];
350725
+ }
350726
+ if (isMaximoAISubscriber()) {
350727
+ if (isMaxSubscriber() || isTeamPremiumSubscriber()) {
350728
+ const premiumOptions = [getDefaultOptionForUser(fastMode)];
350729
+ if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) {
350730
+ premiumOptions.push(getMaxOpus46_1MOption(fastMode));
350731
+ }
350732
+ premiumOptions.push(MaxSonnet46Option);
350733
+ if (checkSonnet1mAccess()) {
350734
+ premiumOptions.push(getMaxSonnet46_1MOption());
350735
+ }
350736
+ premiumOptions.push(MaxHaiku45Option);
350737
+ return premiumOptions;
350738
+ }
350739
+ const standardOptions = [getDefaultOptionForUser(fastMode)];
350740
+ if (checkSonnet1mAccess()) {
350741
+ standardOptions.push(getMaxSonnet46_1MOption());
350742
+ }
350743
+ if (isOpus1mMergeEnabled()) {
350744
+ standardOptions.push(getMergedOpus1MOption(fastMode));
350745
+ } else {
350746
+ standardOptions.push(getMaxOpusOption(fastMode));
350747
+ if (checkOpus1mAccess()) {
350748
+ standardOptions.push(getMaxOpus46_1MOption(fastMode));
350749
+ }
350750
+ }
350751
+ standardOptions.push(MaxHaiku45Option);
350752
+ return standardOptions;
350753
+ }
350754
+ if (getAPIProvider() === "firstParty") {
350755
+ const payg1POptions = [getDefaultOptionForUser(fastMode)];
350756
+ if (checkSonnet1mAccess()) {
350757
+ payg1POptions.push(getSonnet46_1MOption());
350758
+ }
350759
+ if (isOpus1mMergeEnabled()) {
350760
+ payg1POptions.push(getMergedOpus1MOption(fastMode));
350761
+ } else {
350762
+ payg1POptions.push(getOpus46Option(fastMode));
350763
+ if (checkOpus1mAccess()) {
350764
+ payg1POptions.push(getOpus46_1MOption(fastMode));
350765
+ }
350766
+ }
350767
+ payg1POptions.push(getHaiku45Option());
350768
+ return payg1POptions;
350769
+ }
350770
+ const payg3pOptions = [getDefaultOptionForUser(fastMode)];
350771
+ if (getAPIProvider() === "openai") {
350772
+ payg3pOptions.push(getCodexPlanOption(), getCodexSparkOption());
350773
+ }
350774
+ const customSonnet = getCustomSonnetOption();
350775
+ if (customSonnet !== undefined) {
350776
+ payg3pOptions.push(customSonnet);
350777
+ } else {
350778
+ payg3pOptions.push(getSonnet46Option());
350779
+ if (checkSonnet1mAccess()) {
350780
+ payg3pOptions.push(getSonnet46_1MOption());
350781
+ }
350782
+ }
350783
+ const customOpus = getCustomOpusOption();
350784
+ if (customOpus !== undefined) {
350785
+ payg3pOptions.push(customOpus);
350786
+ } else {
350787
+ payg3pOptions.push(getOpus41Option());
350788
+ payg3pOptions.push(getOpus46Option(fastMode));
350789
+ if (checkOpus1mAccess()) {
350790
+ payg3pOptions.push(getOpus46_1MOption(fastMode));
350791
+ }
350792
+ }
350793
+ const customHaiku = getCustomHaikuOption();
350794
+ if (customHaiku !== undefined) {
350795
+ payg3pOptions.push(customHaiku);
350796
+ } else {
350797
+ payg3pOptions.push(getHaikuOption());
350798
+ }
350799
+ return payg3pOptions;
350800
+ }
350801
+ function getModelFamilyInfo(model) {
350802
+ const canonical = getCanonicalName(model);
350803
+ 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")) {
350804
+ const currentName = getMarketingNameForModel(getDefaultSonnetModel());
350805
+ if (currentName) {
350806
+ return { alias: "Sonnet", currentVersionName: currentName };
350807
+ }
350808
+ }
350809
+ if (canonical.includes("claude-opus-4")) {
350810
+ const currentName = getMarketingNameForModel(getDefaultOpusModel());
350811
+ if (currentName) {
350812
+ return { alias: "Opus", currentVersionName: currentName };
350813
+ }
350814
+ }
350815
+ if (canonical.includes("claude-haiku") || canonical.includes("claude-3-5-haiku")) {
350816
+ const currentName = getMarketingNameForModel(getDefaultHaikuModel());
350817
+ if (currentName) {
350818
+ return { alias: "Haiku", currentVersionName: currentName };
350819
+ }
350820
+ }
350821
+ return null;
350822
+ }
350823
+ function getKnownModelOption(model) {
350824
+ const marketingName = getMarketingNameForModel(model);
350825
+ if (!marketingName)
350826
+ return null;
350827
+ const familyInfo = getModelFamilyInfo(model);
350828
+ if (!familyInfo) {
350829
+ return {
350830
+ value: model,
350831
+ label: marketingName,
350832
+ description: model
350833
+ };
350834
+ }
350835
+ if (marketingName !== familyInfo.currentVersionName) {
350836
+ return {
350837
+ value: model,
350838
+ label: marketingName,
350839
+ description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`
350840
+ };
350841
+ }
350842
+ return {
350843
+ value: model,
350844
+ label: marketingName,
350845
+ description: model
350846
+ };
350847
+ }
350848
+ async function getModelOptionsAsync(fastMode = false) {
350849
+ const maximoOptions = await getMaximoModelOptions();
350850
+ if (maximoOptions) {
350851
+ return filterModelOptionsByAllowlist([
350852
+ getDefaultOptionForUser(fastMode),
350853
+ ...maximoOptions
350854
+ ]);
350855
+ }
350856
+ return getModelOptionsBase(fastMode);
350857
+ }
350858
+ function getModelOptions(fastMode = false) {
350859
+ const maximoOptions = getCachedMaximoModelOptions();
350860
+ if (maximoOptions) {
350861
+ return filterModelOptionsByAllowlist([
350862
+ getDefaultOptionForUser(fastMode),
350863
+ ...maximoOptions
350864
+ ]);
350865
+ }
350866
+ const options2 = getModelOptionsBase(fastMode);
350867
+ const envCustomModel = process.env.ANTHROPIC_CUSTOM_MODEL_OPTION;
350868
+ if (envCustomModel && !options2.some((existing) => existing.value === envCustomModel)) {
350869
+ options2.push({
350870
+ value: envCustomModel,
350871
+ label: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_NAME ?? envCustomModel,
350872
+ description: process.env.ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION ?? `Custom model (${envCustomModel})`
350873
+ });
350874
+ }
350875
+ for (const opt of getGlobalConfig().additionalModelOptionsCache ?? []) {
350876
+ if (!options2.some((existing) => existing.value === opt.value)) {
350877
+ options2.push(opt);
350878
+ }
350879
+ }
350880
+ let customModel = null;
350881
+ const currentMainLoopModel = getUserSpecifiedModelSetting();
350882
+ const initialMainLoopModel = getInitialMainLoopModel();
350883
+ if (currentMainLoopModel !== undefined && currentMainLoopModel !== null) {
350884
+ customModel = currentMainLoopModel;
350885
+ } else if (initialMainLoopModel !== null) {
350886
+ customModel = initialMainLoopModel;
350887
+ }
350888
+ if (customModel === null || options2.some((opt) => opt.value === customModel)) {
350889
+ return filterModelOptionsByAllowlist(options2);
350890
+ } else if (customModel === "opusplan") {
350891
+ return filterModelOptionsByAllowlist([...options2, getOpusPlanOption()]);
350892
+ } else if (customModel === "codexplan") {
350893
+ return filterModelOptionsByAllowlist([...options2, getCodexPlanOption()]);
350894
+ } else if (customModel === "codexspark") {
350895
+ return filterModelOptionsByAllowlist([...options2, getCodexSparkOption()]);
350896
+ } else if (customModel === "opus" && getAPIProvider() === "firstParty") {
350897
+ return filterModelOptionsByAllowlist([
350898
+ ...options2,
350899
+ getMaxOpusOption(fastMode)
350900
+ ]);
350901
+ } else if (customModel === "opus[1m]" && getAPIProvider() === "firstParty") {
350902
+ return filterModelOptionsByAllowlist([
350903
+ ...options2,
350904
+ getMergedOpus1MOption(fastMode)
350905
+ ]);
350906
+ } else {
350907
+ const knownOption = getKnownModelOption(customModel);
350908
+ if (knownOption) {
350909
+ options2.push(knownOption);
350910
+ } else {
350911
+ options2.push({
350912
+ value: customModel,
350913
+ label: customModel,
350914
+ description: "Custom model"
350915
+ });
350916
+ }
350917
+ return filterModelOptionsByAllowlist(options2);
350918
+ }
350919
+ }
350920
+ function filterModelOptionsByAllowlist(options2) {
350921
+ const settings = getSettings_DEPRECATED() || {};
350922
+ if (!settings.availableModels) {
350923
+ return options2;
350924
+ }
350925
+ return options2.filter((opt) => opt.value === null || opt.value !== null && isModelAllowed(opt.value));
350926
+ }
350927
+ var MaxSonnet46Option, MaxHaiku45Option;
350928
+ var init_modelOptions = __esm(() => {
350929
+ init_state();
350930
+ init_antModels();
350931
+ init_auth2();
350932
+ init_modelStrings();
350933
+ init_modelCost();
350934
+ init_settings2();
350935
+ init_check1mAccess();
350936
+ init_providers();
350937
+ init_modelAllowlist();
350938
+ init_model();
350939
+ init_context();
350940
+ init_config2();
350941
+ init_maximoModels();
350942
+ MaxSonnet46Option = {
350943
+ value: "sonnet",
350944
+ label: "Sonnet",
350945
+ description: "Sonnet 4.6 · Best for everyday tasks"
350946
+ };
350947
+ MaxHaiku45Option = {
350948
+ value: "haiku",
350949
+ label: "Haiku",
350950
+ description: "Haiku 4.5 · Fastest for quick answers"
350951
+ };
350952
+ });
350953
+
350959
350954
  // src/voice/voiceModeEnabled.ts
350960
350955
  var init_voiceModeEnabled = __esm(() => {
350961
350956
  init_growthbook();
@@ -354407,6 +354402,41 @@ function normalizeAgentToolInput(value) {
354407
354402
  function listSubagentModelSlugs() {
354408
354403
  return listSubagentDelegationCatalog().map((entry) => entry.slug);
354409
354404
  }
354405
+ function listAccountCatalogSlugs() {
354406
+ const slugs = [];
354407
+ const seen = new Set;
354408
+ const add = (value) => {
354409
+ if (typeof value !== "string")
354410
+ return;
354411
+ const trimmed = value.trim();
354412
+ if (!trimmed || trimmed === "default" || seen.has(trimmed))
354413
+ return;
354414
+ seen.add(trimmed);
354415
+ slugs.push(trimmed);
354416
+ };
354417
+ try {
354418
+ for (const option of getCachedMaximoModelOptions() ?? []) {
354419
+ add(option.value);
354420
+ }
354421
+ } catch {}
354422
+ try {
354423
+ for (const option of getGlobalConfig().additionalModelOptionsCache ?? []) {
354424
+ add(option.value);
354425
+ }
354426
+ } catch {}
354427
+ return slugs;
354428
+ }
354429
+ function isAccountCatalogModel(model) {
354430
+ if (!model || isInheritAgentModel(model))
354431
+ return true;
354432
+ const trimmed = model.trim();
354433
+ if (!trimmed)
354434
+ return true;
354435
+ if (getCachedMaximoModel(trimmed))
354436
+ return true;
354437
+ const wanted = trimmed.toLowerCase();
354438
+ return listAccountCatalogSlugs().some((slug) => slug.toLowerCase() === wanted);
354439
+ }
354410
354440
  function listSubagentDelegationCatalog() {
354411
354441
  const entries = [
354412
354442
  { slug: "inherit", efforts: [] }
@@ -354424,12 +354454,9 @@ function listSubagentDelegationCatalog() {
354424
354454
  ...config2?.defaultEffort ? { defaultEffort: config2.defaultEffort } : {}
354425
354455
  });
354426
354456
  };
354427
- try {
354428
- for (const option of getModelOptions()) {
354429
- if (typeof option.value === "string")
354430
- add(option.value);
354431
- }
354432
- } catch {}
354457
+ for (const slug of listAccountCatalogSlugs()) {
354458
+ add(slug);
354459
+ }
354433
354460
  return entries;
354434
354461
  }
354435
354462
  function formatSubagentModelList(slugs) {
@@ -354465,9 +354492,9 @@ function formatSubagentDelegationCatalog(entries, limit = 40) {
354465
354492
  var SENTINEL_STRINGS, SHARED_ISOLATION_STRINGS, WORKTREE_ISOLATION_STRINGS;
354466
354493
  var init_agentToolParams = __esm(() => {
354467
354494
  init_maximoModels();
354495
+ init_config2();
354468
354496
  init_effort();
354469
354497
  init_agent();
354470
- init_modelOptions();
354471
354498
  SENTINEL_STRINGS = new Set([
354472
354499
  "",
354473
354500
  "null",
@@ -355717,14 +355744,14 @@ A call that omits \`description\` or \`prompt\` is rejected. Do not start the su
355717
355744
 
355718
355745
  Optional but supported on every spawn:
355719
355746
  - \`subagent_type\`: one of the types listed above. If omitted, ${forkEnabled ? "a fork of yourself is created" : "the general-purpose agent is used"}.
355720
- - \`model\`: an exact slug from the live catalog below, a family alias (\`sonnet\`, \`opus\`, \`haiku\`), or \`inherit\`. Do not invent slugs. Omit to inherit the parent model. Compact list: ${availableModels}.
355747
+ - \`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}.
355721
355748
  - \`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.
355722
355749
  - \`isolation\`: \`"none"\` (default, shared workspace) or \`"worktree"\` (isolated git worktree). Never pass any other value. \`"none"\` is valid and means "do not isolate".
355723
355750
  - \`run_in_background\`: \`true\` to return immediately and get a completion notification later.
355724
355751
 
355725
355752
  ## Live model and effort catalog
355726
355753
 
355727
- This is the same provider catalog the CLI uses for \`/model\` and \`/effort\`. Use these exact \`model\` slugs and only the efforts listed on that row:
355754
+ 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:
355728
355755
 
355729
355756
  ${catalogText}
355730
355757
 
@@ -355847,7 +355874,7 @@ ${agentListSection}
355847
355874
 
355848
355875
  ${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.`}
355849
355876
 
355850
- Always pass both \`description\` (3-5 word title) and \`prompt\` (full task). You may set \`model\` to a slug from the live 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"\`.`;
355877
+ 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"\`.`;
355851
355878
  if (isCoordinator) {
355852
355879
  return shared2;
355853
355880
  }
@@ -355967,7 +355994,7 @@ var init_AgentTool = __esm(() => {
355967
355994
  description: exports_external.string().describe("A short (3-5 word) title for the task. Required. Shown in the UI as the subagent name."),
355968
355995
  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."),
355969
355996
  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)."),
355970
- 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, a family alias (sonnet, opus, haiku), or "inherit". If omitted, uses the agent definition's model or inherits the parent. Do not invent slugs.`),
355997
+ 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.`),
355971
355998
  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."),
355972
355999
  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.")
355973
356000
  }));
@@ -356164,8 +356191,11 @@ var init_AgentTool = __esm(() => {
356164
356191
  if (selectedAgent.color) {
356165
356192
  setAgentColor(selectedAgent.agentType, selectedAgent.color);
356166
356193
  }
356194
+ if (model && !isInheritAgentModel(model) && !isAccountCatalogModel(model)) {
356195
+ throw new Error(`Model '${model}' is not in the logged-in account catalog. Use inherit or one of: ${formatSubagentModelList(listSubagentModelSlugs())}.`);
356196
+ }
356167
356197
  const resolvedAgentModel = getAgentModel(selectedAgent.model, toolUseContext.options.mainLoopModel, isForkPath ? undefined : model, permissionMode);
356168
- if (model && !isModelAllowed(resolvedAgentModel)) {
356198
+ if (model && !isModelAllowed(resolvedAgentModel) && !isAccountCatalogModel(resolvedAgentModel)) {
356169
356199
  throw new Error(`Model '${model}' is not available. Available models: ${formatSubagentModelList(listSubagentModelSlugs())}.`);
356170
356200
  }
356171
356201
  logEvent("tengu_agent_tool_selected", {
@@ -366718,7 +366748,7 @@ function getAnthropicEnvMetadata() {
366718
366748
  function getBuildAgeMinutes() {
366719
366749
  if (false)
366720
366750
  ;
366721
- const buildTime = new Date("2026-08-15T17:46:38.288Z").getTime();
366751
+ const buildTime = new Date("2026-08-20T22:52:41.981Z").getTime();
366722
366752
  if (isNaN(buildTime))
366723
366753
  return;
366724
366754
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -432796,7 +432826,7 @@ function getRecentActivitySync() {
432796
432826
  return cachedActivity;
432797
432827
  }
432798
432828
  function getLogoDisplayData() {
432799
- const version2 = process.env.DEMO_VERSION ?? "0.1.36" ?? "99.0.0";
432829
+ const version2 = process.env.DEMO_VERSION ?? "0.1.38" ?? "99.0.0";
432800
432830
  const serverUrl = getDirectConnectServerUrl();
432801
432831
  const displayPath = process.env.DEMO_VERSION ? "/code/maximo" : getDisplayPath(getCwd());
432802
432832
  const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
@@ -462261,7 +462291,7 @@ var init_bridge_kick = __esm(() => {
462261
462291
  var call57 = async () => {
462262
462292
  return {
462263
462293
  type: "text",
462264
- value: `${"99.0.0"} (built ${"2026-08-15T17:46:38.288Z"})`
462294
+ value: `${"99.0.0"} (built ${"2026-08-20T22:52:41.981Z"})`
462265
462295
  };
462266
462296
  }, version2, version_default;
462267
462297
  var init_version = __esm(() => {
@@ -487454,6 +487484,7 @@ var init_managedEnv = __esm(() => {
487454
487484
  init_managedEnvConstants();
487455
487485
  init_mtls();
487456
487486
  init_proxy();
487487
+ init_modelDefaults();
487457
487488
  init_constants2();
487458
487489
  init_settings2();
487459
487490
  TRUSTED_SETTING_SOURCES = [
@@ -536793,7 +536824,7 @@ function SetupRow({ children }) {
536793
536824
  }
536794
536825
  function WelcomeV2() {
536795
536826
  const { columns } = useTerminalSize();
536796
- const version3 = "0.1.36";
536827
+ const version3 = "0.1.38";
536797
536828
  const width = Math.max(48, Math.min(columns || 92, 92));
536798
536829
  const stacked = width < OCTOPUS_COMPACT_WIDTH + 42;
536799
536830
  return /* @__PURE__ */ jsx_runtime479.jsx(ThemedBox_default, {
@@ -556729,7 +556760,7 @@ Usage: maximo --remote "your task description"`, () => gracefulShutdown(1));
556729
556760
  pendingHookMessages
556730
556761
  }, renderAndRun);
556731
556762
  }
556732
- }).version("0.1.36 (Maximo Syntax)", "-v, --version", "Output the version number");
556763
+ }).version("0.1.38 (Maximo Syntax)", "-v, --version", "Output the version number");
556733
556764
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
556734
556765
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
556735
556766
  if (canUserConfigureAdvisor()) {
@@ -557268,7 +557299,7 @@ function validateProviderEnvOrExit() {
557268
557299
  async function main2() {
557269
557300
  const args = process.argv.slice(2);
557270
557301
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
557271
- console.log(`${"0.1.36"} (Maximo Syntax)`);
557302
+ console.log(`${"0.1.38"} (Maximo Syntax)`);
557272
557303
  return;
557273
557304
  }
557274
557305
  validateProviderEnvOrExit();
@@ -557345,4 +557376,4 @@ async function main2() {
557345
557376
  }
557346
557377
  main2();
557347
557378
 
557348
- //# debugId=137C1FE392A2B04A64756E2164756E21
557379
+ //# debugId=E6A3D8375CCFC23E64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maximoai/maximo-syntax-cli",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "description": "Maximo Syntax CLI - A powerful AI-powered command-line interface for code development with any LLM",
5
5
  "type": "module",
6
6
  "bin": {