[router][tool call] Clean up redundant detect_format and has_tool_markers (#11270)

This commit is contained in:
Chang Su
2025-10-06 14:04:02 -07:00
committed by GitHub
parent 155cbb51f0
commit 466992b2d0
25 changed files with 73 additions and 114 deletions

View File

@@ -1859,7 +1859,7 @@ impl GrpcPDRouter {
// Check format detection first
let can_parse = {
let parser = pooled_parser.lock().await;
parser.detect_format(processed_text)
parser.has_tool_markers(processed_text)
// Lock is dropped here
};

View File

@@ -306,7 +306,7 @@ impl GrpcRouter {
// Check format detection first
let can_parse = {
let parser = pooled_parser.lock().await;
parser.detect_format(processed_text)
parser.has_tool_markers(processed_text)
// Lock is dropped here
};