MCPcopy Create free account
hub / github.com/Noumena-Network/code / getCustomOpusOption

Function getCustomOpusOption

src/utils/model/modelOptions.ts:161–176  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159}
160
161function getCustomOpusOption(): ModelOption | undefined {
162 const is3P = getAPIProvider() !== 'firstParty'
163 const customOpusModel = process.env.ANTHROPIC_DEFAULT_OPUS_MODEL
164 // When a 3P user has a custom opus model string, show it directly
165 if (is3P && customOpusModel) {
166 const is1m = has1mContext(customOpusModel)
167 return {
168 value: 'opus',
169 label: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ?? customOpusModel,
170 description:
171 process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ??
172 `Custom reasoning model${is1m ? ' (1M context)' : ''}`,
173 descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom reasoning model${is1m ? ' with 1M context' : ''}`} (${customOpusModel})`,
174 }
175 }
176}
177
178function getOpus41Option(): ModelOption {
179 return {

Callers 1

getModelOptionsBaseFunction · 0.85

Calls 2

getAPIProviderFunction · 0.85
has1mContextFunction · 0.85

Tested by

no test coverage detected