chenbhao commited on
Commit
a57c1d6
·
1 Parent(s): 6db367d

fix: config render

Browse files
Files changed (1) hide show
  1. src/utils/model/model.ts +2 -1
src/utils/model/model.ts CHANGED
@@ -552,6 +552,7 @@ export function getPublicModelName(model: ModelName): string {
552
  export function parseUserSpecifiedModel(
553
  modelInput: ModelName | ModelAlias,
554
  ): ModelName {
 
555
  const modelInputTrimmed = modelInput.trim()
556
  const normalizedModel = modelInputTrimmed.toLowerCase()
557
 
@@ -661,7 +662,7 @@ export function isLegacyModelRemapEnabled(): boolean {
661
  }
662
 
663
  export function modelDisplayString(model: ModelSetting): string {
664
- if (model === null) {
665
  if (process.env.USER_TYPE === 'ant') {
666
  return `Default for Ants (${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})`
667
  } else if (isClaudeAISubscriber()) {
 
552
  export function parseUserSpecifiedModel(
553
  modelInput: ModelName | ModelAlias,
554
  ): ModelName {
555
+ if (!modelInput) return getDefaultMainLoopModel()
556
  const modelInputTrimmed = modelInput.trim()
557
  const normalizedModel = modelInputTrimmed.toLowerCase()
558
 
 
662
  }
663
 
664
  export function modelDisplayString(model: ModelSetting): string {
665
+ if (model === null || model === undefined) {
666
  if (process.env.USER_TYPE === 'ant') {
667
  return `Default for Ants (${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})`
668
  } else if (isClaudeAISubscriber()) {