"vscode:/vscode.git/clone" did not exist on "e6bae8d916d976d227489fe0daa57586472c6c4e"
Unverified Commit f065e5be authored by Chang Su's avatar Chang Su Committed by GitHub
Browse files

[router] Use `get_pooled` in `process_single_choice` (#11079)

parent 9de1320b
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment