Drug delivery vehicles that release one or more drugs, e.g., an opioid antagonist and/or an opioid, in response to changes in the chemistry of body fluids, specifically in response to changes in the partial pressure of CO2 in the environment of the hydrogel are described. The drug delivery vehicles include hydrogels that swell or shrink in response to changes in the partial pressure of CO2 in their environment, thus regulating release of an entrapped drug.