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

Function getSonnet1mExpTreatmentEnabled

src/utils/context.ts:100–112  ·  view source on GitHub ↗
(model: string)

Source from the content-addressed store, hash-verified

98}
99
100export function getSonnet1mExpTreatmentEnabled(model: string): boolean {
101 if (is1mContextDisabled()) {
102 return false
103 }
104 // Only applies to sonnet 4.6 without an explicit [1m] suffix
105 if (has1mContext(model)) {
106 return false
107 }
108 if (!getCanonicalName(model).includes('sonnet-4-6')) {
109 return false
110 }
111 return getGlobalConfig().clientDataCache?.['coral_reef_sonnet'] === 'true'
112}
113
114/**
115 * Calculate context window usage percentage from token usage data.

Callers 2

getContextWindowForModelFunction · 0.85
paramsFromContextFunction · 0.85

Calls 4

is1mContextDisabledFunction · 0.85
has1mContextFunction · 0.85
getCanonicalNameFunction · 0.85
getGlobalConfigFunction · 0.85

Tested by

no test coverage detected