If you really want to get technical, the nutrients made available during the fermentation in the cecum are produced by the guinea pig's gut fauna and flora rather than being produced by the guinea pig itself.
If the piggy stops eating, B vitamins are a minor concern ... gut stasis would be the major concern, and the piggy would need a vet visit to address the issue. Likewise, if a piggy stops cecotrophagy, there's an issue that needs to be identified and addressed.
If a guinea pig's gut microbiome is disturbed from illness or treatment (such as antibiotics for an infection), then probiotics can help rebalance, or if one has another guinea pig that is healthy and not undergoing treatment, one can make "poop soup" for the ailing piggy to provide them with replacement good bacteria.
In sum, if the piggy is ill, it needs to see a veterinarian. Vitamins B would be a lesser matter than getting the piggy healthy. The vet can also advise if the vitamins are of special concern during or in follow-up to said treatment. A veterinarian would be the one to determine whether any supplements, oral or by injection, are necessary or would be helpful; they would likely need to run tests to determine this.