Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(core): port compression admission fix to current main
  • Loading branch information
AaronZ345 committed Sep 29, 2026
commit 573b5b19c49b486edacfd42709ce2a7de69e937f
7 changes: 6 additions & 1 deletion packages/core/src/services/compactionInputSlimming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@ export function estimatePartChars(
return imageTokenEstimate * TOKEN_TO_CHAR_RATIO;
}
if (typeof part.text === 'string') {
return part.text.length;
return (
part.text.length +
(typeof part.thoughtSignature === 'string'
? part.thoughtSignature.length
: 0)
);
}
// Tool results in qwen-code carry media on `functionResponse.parts`
// (an extension to the @google/genai schema; see
Expand Down