Build vs Buy for AI Agents: Quantifying the Decision Boundary Between External APIs and Fine-Tuned Internal Capabilities