Let the model pick and invoke tools. Build at least three: a calculator, a live HTTP call (e.g. Open-Meteo, no key needed), and a text formatter. The model must route correctly and handle a tool error gracefully.
Apply these immediately:
| Pattern | Purpose |
|---|---|
| Retries with backoff + jitter | Transient errors (timeouts, 429s, some 5xx) |
| Fallback chains | Cheaper → stronger, or Provider A → Provider B |
| Circuit breakers | Prevent a failing provider from cascading into an incident |
OpenAI function calling · Claude tool use