(fastMode = false)
| 95 | } |
| 96 | |
| 97 | export function getDefaultOptionForUser(fastMode = false): ModelOption { |
| 98 | const session = getCurrentSubscriptionSessionState() |
| 99 | |
| 100 | if (isInternalBuild()) { |
| 101 | const currentModel = renderDefaultModelSetting( |
| 102 | getDefaultMainLoopModelSetting(), |
| 103 | ) |
| 104 | return { |
| 105 | value: null, |
| 106 | label: 'Default (recommended)', |
| 107 | description: `Use the default model for Ants (currently ${currentModel})`, |
| 108 | descriptionForModel: `Default model (currently ${currentModel})`, |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | // Subscribers |
| 113 | if (session.isOauthBackedFirstPartySession) { |
| 114 | return { |
| 115 | value: null, |
| 116 | label: 'Default (recommended)', |
| 117 | description: 'Use the default model for your plan', |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | // PAYG |
| 122 | const is3P = getAPIProvider() !== 'firstParty' |
| 123 | return { |
| 124 | value: null, |
| 125 | label: 'Default (recommended)', |
| 126 | description: `Use the default model (currently ${renderDefaultModelSetting(getDefaultMainLoopModelSetting())})${is3P ? '' : ` · ${formatModelPricing(COST_TIER_3_15)}`}`, |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | function getCustomSonnetOption(): ModelOption | undefined { |
| 131 | const is3P = getAPIProvider() !== 'firstParty' |
no test coverage detected