1. Function-Calling Reliability and Cost Impact
If an agent mis-formats a tool call, the program crashes or loops, costing tokens for retries. Claude 3.5 Sonnet has a high success rate on complex tool calls, which reduces retry loops and saves tokens compared to cheaper models.
2. Pricing Surcharges: GPT-4o vs. Sonnet
GPT-4o ($2.50 / $10.00 MTok) is 20-30% cheaper than Claude 3.5 Sonnet ($3.00 / $15.00 MTok) on base rates. However, Sonnet's 90% prompt caching discount is highly effective for agents carrying long conversation histories, making Sonnet cheaper for long sessions.
3. Verdict: Which to Choose for Agents?
For short agent tasks (1-2 steps, small context), GPT-4o-mini or GPT-4o offers the best cost profile. For long-running research agents (5+ steps, large memory context), Claude 3.5 Sonnet is more economical due to its prompt caching discounts.