()
| 193 | * @returns The default model setting to use |
| 194 | */ |
| 195 | export function getDefaultMainLoopModelSetting(): ModelName | ModelAlias { |
| 196 | // Ants default to defaultModel from flag config, or Opus 1M if not configured |
| 197 | if (process.env.USER_TYPE === 'ant') { |
| 198 | return ( |
| 199 | getAntModelOverrideConfig()?.defaultModel ?? |
| 200 | getDefaultOpusModel() + '[1m]' |
| 201 | ) |
| 202 | } |
| 203 | |
| 204 | const configuredDefaultModel = getConfiguredProviderModel('defaultModel') |
| 205 | if (configuredDefaultModel) { |
| 206 | return configuredDefaultModel |
| 207 | } |
| 208 | |
| 209 | // Max users get Opus as default |
| 210 | if (isMaxSubscriber()) { |
| 211 | return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '') |
| 212 | } |
| 213 | |
| 214 | // Team Premium gets Opus (same as Max) |
| 215 | if (isTeamPremiumSubscriber()) { |
| 216 | return getDefaultOpusModel() + (isOpus1mMergeEnabled() ? '[1m]' : '') |
| 217 | } |
| 218 | |
| 219 | // PAYG (1P and 3P), Enterprise, Team Standard, and Pro get Sonnet as default |
| 220 | // Note that PAYG (3P) may default to an older Sonnet model |
| 221 | return getDefaultSonnetModel() |
| 222 | } |
| 223 | |
| 224 | /** |
| 225 | * Synchronous operation to get the default main loop model to use |
no test coverage detected