"Tool call start and end tokens must have the same length"
);
// Early exit if no tokens configured
iftool_call_start_tokens.is_empty(){
returnOk((vec![],Some(trimmed.to_string())));
}
// Iterate over all start and end tokens and try to extract the content between them
// Assumption : One message will not contain different tags for tool calls. Iteration over tags is to support different tags by default for multiple models
letmutjson=trimmed.to_string();
letmutnormal_text=trimmed.to_string();
// First, check if ANY start token exists in the input