It so depends. My first guinea pig, Arnold needed surgery that cost around $600--at the time, DH was temping (I'm in graduate school) and the money was really tight. But the surgery, if he made it through, was guaranteed to fix the problem, so we did it and I never regretted it, even though the money we spent had been set aside for some medical testing I needed.
Now, I'm facing the loss of another guinea pig, Jake, we could do surgery, probably around the same price, but it wouldn't by any means guarantee a solution to the problem, and I'm not at all sure he's strong enough to make it through. So even though the money isn't an issue (DH now has a real job), we're not going to do it, instead we're keeping him comfortable.
So money might be part of the decision, but it's only part, and I don't know that I can say that I would spend X amount, and no more--every situation is so different.