MCPcopy Index your code
hub / github.com/Noumena-Network/code / getDefaultOptionForUser

Function getDefaultOptionForUser

src/utils/model/modelOptions.ts:97–128  ·  view source on GitHub ↗
(fastMode = false)

Source from the content-addressed store, hash-verified

95}
96
97export 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
130function getCustomSonnetOption(): ModelOption | undefined {
131 const is3P = getAPIProvider() !== 'firstParty'

Callers 2

getModelOptionsBaseFunction · 0.85

Calls 6

isInternalBuildFunction · 0.85
getAPIProviderFunction · 0.85
formatModelPricingFunction · 0.85

Tested by

no test coverage detected