MCPcopy
hub / github.com/codeaashu/claude-code / getCustomOpusOption

Function getCustomOpusOption

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

Source from the content-addressed store, hash-verified

105}
106
107function getCustomOpusOption(): ModelOption | undefined {
108 const is3P = getAPIProvider() !== 'firstParty'
109 const customOpusModel = process.env.ANTHROPIC_DEFAULT_OPUS_MODEL
110 // When a 3P user has a custom opus model string, show it directly
111 if (is3P && customOpusModel) {
112 const is1m = has1mContext(customOpusModel)
113 return {
114 value: 'opus',
115 label: process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_NAME ?? customOpusModel,
116 description:
117 process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ??
118 `Custom Opus model${is1m ? ' (1M context)' : ''}`,
119 descriptionForModel: `${process.env.ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION ?? `Custom Opus model${is1m ? ' with 1M context' : ''}`} (${customOpusModel})`,
120 }
121 }
122}
123
124function getOpus41Option(): ModelOption {
125 return {

Callers 1

getModelOptionsBaseFunction · 0.85

Calls 2

getAPIProviderFunction · 0.85
has1mContextFunction · 0.85

Tested by

no test coverage detected