[router] Use get_pooled in process_single_choice (#11079)
This commit is contained in:
@@ -769,10 +769,13 @@ impl GrpcRouter {
|
||||
|
||||
// Check if reasoning parsing is enabled and separate_reasoning is requested
|
||||
if original_request.separate_reasoning {
|
||||
if let Ok(mut parser) = self
|
||||
let pooled_parser = self
|
||||
.reasoning_parser_factory
|
||||
.create(&original_request.model)
|
||||
{
|
||||
.get_pooled(&original_request.model);
|
||||
|
||||
let mut parser = pooled_parser
|
||||
.lock()
|
||||
.map_err(|e| format!("Failed to acquire reasoning parser lock: {}", e))?;
|
||||
match parser.detect_and_parse_reasoning(&processed_text) {
|
||||
Ok(result) => {
|
||||
if !result.reasoning_text.is_empty() {
|
||||
@@ -785,7 +788,6 @@ impl GrpcRouter {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Step 2: Handle tool call parsing
|
||||
let mut tool_calls: Option<Vec<crate::protocols::spec::ToolCall>> = None;
|
||||
|
||||
Reference in New Issue
Block a user