The basal ganglia (BG) performs an important functional role in cognition, but models disagree about the nature of the relationship between BG activity and activity in other cortical areas. Previous computational models can be categorized as implementing the effects of the BG on prefrontal cortex as either local and direct, or involving other regions and, therefore, modulatory. To test which of these two effects best represents the role of the BG, a large fMRI dataset of 200 participants performing six, representative cognitive tasks was analyzed through Dynamic Causal Modeling (DCM). To ensure that DCM models were realistic and representative of a general brain architecture, the models were implemented within the putative neural underpinnings of the Common Model of Cognition, an abstract blueprint for cognition. The comparison showed that Mixed model, including both Direct and Modulatory connectivity, consistently outperformed models that included only direct or modulatory connections. It was also found that the relative rankings of the Direct and Modulatory models depended on the specific task, suggesting that the BG is a flexible system that adapts to task demands.