refactor: remove configurable toolcall policy and fix to feature matching with high-confidence early emit

This commit is contained in:
CJACK
2026-03-30 01:56:25 +08:00
parent 822b14ed6b
commit a7c9dfd7c0
20 changed files with 38 additions and 179 deletions

View File

@@ -12,12 +12,10 @@ function resolveToolcallPolicy(prepBody, payloadTools) {
if (toolNames.length === 0 && Array.isArray(payloadTools) && payloadTools.length > 0) {
toolNames = ['__any_tool__'];
}
const featureMatchEnabled = boolDefaultTrue(prepBody && prepBody.toolcall_feature_match);
const emitEarlyToolDeltas = featureMatchEnabled && boolDefaultTrue(prepBody && prepBody.toolcall_early_emit_high);
return {
toolNames,
toolSieveEnabled: toolNames.length > 0,
emitEarlyToolDeltas,
emitEarlyToolDeltas: true,
};
}