The oceans buffer against climate change via biogeochemical cycles underpinned by microbial metabolic activities. While planetary-scale surveys provide baseline microbiome data, inferring metabolic and biogeochemical impacts remains challenging. Here, we constructed a model for each TARA Ocean metagenome or metatranscriptome representing heterotrophic prokaryotes and their viruses and assessed these as community-wide metabolic phenotypes. To validate, we showed that even with reaction-mappable genes only (~1/4 of the total genes), the composition of these models revealed metabolism-inferred ecological zones that matched taxonomy-inferred zones. Model inferences include providing a new metric of community-wide metabolic cooperation and new insights into connections between microbial metabolism and organism diversity, and the ecological role of viruses. The latter suggests they genomically target community-critical metabolic reactions and estimates where viruses remineralize versus sink carbon. While this new constraints-based, agile, and mechanistic modeling framework is highly upgradable, it already begins to convert molecular-scale environmental omics data to ecological and even planetary-scale biogeochemical features that will better bring microbes and their viruses into earth system and climate models.