fix(core): Minor fixes for generalist profile. (#26357)

This commit is contained in:
joshualitt
2026-05-05 12:32:13 -07:00
committed by GitHub
parent f5c0977e96
commit 0803007c8f
7 changed files with 37 additions and 14 deletions
+3 -2
View File
@@ -78,6 +78,7 @@ export const generalistProfile: ContextProfile = {
budget: {
retainedTokens: 65000,
maxTokens: 150000,
coalescingThresholdTokens: 5000,
},
},
@@ -117,14 +118,14 @@ export const generalistProfile: ContextProfile = {
'NodeDistillation',
env,
resolveProcessorOptions(config, 'NodeDistillation', {
nodeThresholdTokens: 1000,
nodeThresholdTokens: 3000,
}),
),
createNodeTruncationProcessor(
'NodeTruncation',
env,
resolveProcessorOptions(config, 'NodeTruncation', {
maxTokensPerNode: 1200,
maxTokensPerNode: 4000,
}),
),
],
@@ -42,6 +42,11 @@ export function getContextManagementConfigSchema(
description:
'The absolute maximum token count allowed before synchronous truncation kicks in.',
},
coalescingThresholdTokens: {
type: 'number',
description:
'Only trigger background consolidation (snapshots) when at least this many tokens have aged out. Prevents "turn-by-turn" utility model churn.',
},
},
},
processorOptions: {
@@ -29,6 +29,11 @@ export interface AsyncPipelineDef {
export interface ContextBudget {
retainedTokens: number;
maxTokens: number;
/**
* Only trigger background consolidation (snapshots) when at least this many
* tokens have aged out. Prevents "turn-by-turn" utility model churn.
*/
coalescingThresholdTokens?: number;
}
/**