MCPcopy Create free account
hub / github.com/cortexkit/magic-context / isSaneLimit

Function isSaneLimit

packages/plugin/src/shared/models-dev-cache.ts:53–55  ·  view source on GitHub ↗
(limit: number | undefined)

Source from the content-addressed store, hash-verified

51 * unconfigured-default garbage in BOTH harnesses (OpenCode's SDK values and
52 * Pi's reported `contextWindow`). Exported so Pi applies the identical bound. */
53export function isSaneLimit(limit: number | undefined): limit is number {
54 return typeof limit === "number" && limit >= MIN_SANE_LIMIT && limit <= MAX_SANE_LIMIT;
55}
56
57interface CachedModelMetadata {
58 limit?: number;

Callers 8

registerPiContextHandlerFunction · 0.90
maybeFireHistorianFunction · 0.90
persistApiCacheFunction · 0.85
setCachedModelMetadataFunction · 0.85
getSdkContextLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected