fix: display selected model in startup screen instead of hardcoded sonnet 4.6 (#587)
This commit is contained in:
@@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
import { isLocalProviderUrl } from '../services/api/providerConfig.js'
|
import { isLocalProviderUrl } from '../services/api/providerConfig.js'
|
||||||
import { getLocalOpenAICompatibleProviderLabel } from '../utils/providerDiscovery.js'
|
import { getLocalOpenAICompatibleProviderLabel } from '../utils/providerDiscovery.js'
|
||||||
|
import { getSettings_DEPRECATED } from '../utils/settings/settings.js'
|
||||||
|
import { parseUserSpecifiedModel } from '../utils/model/model.js'
|
||||||
|
|
||||||
declare const MACRO: { VERSION: string; DISPLAY_VERSION?: string }
|
declare const MACRO: { VERSION: string; DISPLAY_VERSION?: string }
|
||||||
|
|
||||||
@@ -139,9 +141,11 @@ function detectProvider(): { name: string; model: string; baseUrl: string; isLoc
|
|||||||
return { name, model: displayModel, baseUrl, isLocal }
|
return { name, model: displayModel, baseUrl, isLocal }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default: Anthropic
|
// Default: Anthropic - check settings.model first, then env vars
|
||||||
const model = process.env.ANTHROPIC_MODEL || process.env.CLAUDE_MODEL || 'claude-sonnet-4-6'
|
const settings = getSettings_DEPRECATED() || {}
|
||||||
return { name: 'Anthropic', model, baseUrl: 'https://api.anthropic.com', isLocal: false }
|
const modelSetting = settings.model || process.env.ANTHROPIC_MODEL || process.env.CLAUDE_MODEL || 'claude-sonnet-4-6'
|
||||||
|
const resolvedModel = parseUserSpecifiedModel(modelSetting)
|
||||||
|
return { name: 'Anthropic', model: resolvedModel, baseUrl: 'https://api.anthropic.com', isLocal: false }
|
||||||
}
|
}
|
||||||
|
|
||||||
// ─── Box drawing ──────────────────────────────────────────────────────────────
|
// ─── Box drawing ──────────────────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user