(fastMode = false)
| 329 | // @[MODEL LAUNCH]: Update the model picker lists below to include/reorder options for the new model. |
| 330 | // Each user tier (ant, Max/Team Premium, Pro/Team Standard/Enterprise, PAYG 1P, PAYG 3P) has its own list. |
| 331 | function getModelOptionsBase(fastMode = false): ModelOption[] { |
| 332 | const session = getCurrentSubscriptionSessionState() |
| 333 | |
| 334 | if (isInternalBuild()) { |
| 335 | // Build options from antModels config |
| 336 | const antModelOptions: ModelOption[] = getAntModels().map(m => ({ |
| 337 | value: m.alias, |
| 338 | label: m.label, |
| 339 | description: m.description ?? `[NOUMENA-ONLY] ${m.label} (${m.model})`, |
| 340 | })) |
| 341 | |
| 342 | return dedupeModelOptions([ |
| 343 | getDefaultOptionForUser(), |
| 344 | ...getNCodeManagedModelOptions(), |
| 345 | ...antModelOptions, |
| 346 | getMergedOpus1MOption(fastMode), |
| 347 | getSonnet46Option(), |
| 348 | getSonnet46_1MOption(), |
| 349 | getHaiku45Option(), |
| 350 | ]) |
| 351 | } |
| 352 | |
| 353 | if (isOpenAICompatByokActive()) { |
| 354 | return getOpenAICompatByokModelOptions() |
| 355 | } |
| 356 | |
| 357 | if (isNCodeManagedFirstPartySurface()) { |
| 358 | return dedupeModelOptions([ |
| 359 | getDefaultOptionForUser(fastMode), |
| 360 | ...getNCodeManagedModelOptions(), |
| 361 | ]) |
| 362 | } |
| 363 | |
| 364 | if (session.isOauthBackedFirstPartySession) { |
| 365 | if (session.isMaxSubscriber || session.isTeamPremiumSubscriber) { |
| 366 | // Max and Team Premium users: Opus is default, show Sonnet as alternative |
| 367 | const premiumOptions = [getDefaultOptionForUser(fastMode)] |
| 368 | if (!isOpus1mMergeEnabled() && checkOpus1mAccess()) { |
| 369 | premiumOptions.push(getMaxOpus46_1MOption(fastMode)) |
| 370 | } |
| 371 | |
| 372 | premiumOptions.push(MaxSonnet46Option) |
| 373 | if (checkSonnet1mAccess()) { |
| 374 | premiumOptions.push(getMaxSonnet46_1MOption()) |
| 375 | } |
| 376 | |
| 377 | premiumOptions.push(...getNCodeManagedModelOptions()) |
| 378 | premiumOptions.push(MaxHaiku45Option) |
| 379 | return premiumOptions |
| 380 | } |
| 381 | |
| 382 | // Pro/Team Standard/Enterprise users: Sonnet is default, show Opus as alternative |
| 383 | const standardOptions = [getDefaultOptionForUser(fastMode)] |
| 384 | if (checkSonnet1mAccess()) { |
| 385 | standardOptions.push(getMaxSonnet46_1MOption()) |
| 386 | } |
| 387 | |
| 388 | if (isOpus1mMergeEnabled()) { |
no test coverage detected