@@ -309,16 +309,18 @@ export function ModelDialog({ onClose }: ModelDialogProps): React.JSX.Element {
309309 persistModelSelection ( settings , effectiveModelId ) ;
310310 persistAuthTypeSelection ( settings , effectiveAuthType ) ;
311311
312- const baseUrl = after ?. baseUrl ?? t ( '(default)' ) ;
313- const maskedKey = maskApiKey ( after ?. apiKey ) ;
312+ const showBaseUrlAndKey =
313+ effectiveAuthType !== AuthType . USE_ALIYUN &&
314+ effectiveAuthType !== AuthType . QWEN_OAUTH ;
314315 uiState ?. historyManager . addItem (
315316 {
316317 type : 'info' ,
317318 text :
318319 `authType: ${ effectiveAuthType } \n` +
319- `Using model: ${ effectiveModelId } \n` +
320- `Base URL: ${ baseUrl } \n` +
321- `API key: ${ maskedKey } ` ,
320+ `Using model: ${ effectiveModelId } ` +
321+ ( showBaseUrlAndKey
322+ ? `\nBase URL: ${ after ?. baseUrl ?? t ( '(default)' ) } \nAPI key: ${ maskApiKey ( after ?. apiKey ) } `
323+ : '' ) ,
322324 } ,
323325 Date . now ( ) ,
324326 ) ;
@@ -352,20 +354,21 @@ export function ModelDialog({ onClose }: ModelDialogProps): React.JSX.Element {
352354 badge = { formatSourceBadge ( sources [ 'model' ] ) }
353355 />
354356
355- { authType !== AuthType . QWEN_OAUTH && (
356- < >
357- < ConfigRow
358- label = "Base URL"
359- value = { effectiveConfig ?. baseUrl ?? t ( '(default)' ) }
360- badge = { formatSourceBadge ( sources [ 'baseUrl' ] ) }
361- />
362- < ConfigRow
363- label = "API Key"
364- value = { effectiveConfig ?. apiKey ? t ( '(set)' ) : t ( '(not set)' ) }
365- badge = { formatSourceBadge ( sources [ 'apiKey' ] ) }
366- />
367- </ >
368- ) }
357+ { authType !== AuthType . QWEN_OAUTH &&
358+ authType !== AuthType . USE_ALIYUN && (
359+ < >
360+ < ConfigRow
361+ label = "Base URL"
362+ value = { effectiveConfig ?. baseUrl ?? t ( '(default)' ) }
363+ badge = { formatSourceBadge ( sources [ 'baseUrl' ] ) }
364+ />
365+ < ConfigRow
366+ label = "API Key"
367+ value = { effectiveConfig ?. apiKey ? t ( '(set)' ) : t ( '(not set)' ) }
368+ badge = { formatSourceBadge ( sources [ 'apiKey' ] ) }
369+ />
370+ </ >
371+ ) }
369372 </ Box >
370373 </ Box >
371374
0 commit comments