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

Function getPerMessageBudgetLimit

src/utils/toolResultStorage.ts:440–453  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

438 * so a flag served as null/string/NaN leaks through.
439 */
440export function getPerMessageBudgetLimit(): number {
441 const override = getFeatureValue_CACHED_MAY_BE_STALE<number | null>(
442 'ncode_hawthorn_window',
443 null,
444 )
445 if (
446 typeof override === 'number' &&
447 Number.isFinite(override) &&
448 override > 0
449 ) {
450 return override
451 }
452 return MAX_TOOL_RESULTS_PER_MESSAGE_CHARS
453}
454
455/**
456 * Provision replacement state for a new conversation thread.

Callers 2

enforceToolResultBudgetFunction · 0.85

Tested by

no test coverage detected