ModelSettings, timeouts and retries
Tune each model request with ModelSettings, stop a model call that takes too long, and let the Runner try again after a temporary failure. See also when a retry is refused for safety.
11 minPro
Checking your access…
Inside this lesson
- An animation you play, pause and step through, with each part saying what it is doing.
- The real code beside it, with the lines for each step lit up.
- Practice mode, where you route each message yourself, and a short quiz.
- About 11 minutes.
Written from the official documentation
In this module: Models and configuration
- OpenAI models and defaultsThe default model, how to change it and the two model classes.Pro
- ModelSettings, timeouts and retriesTune requests, cap model call time and retry failed calls.Pro
- Other model providersNon OpenAI models, mixed providers and third party adapters.Pro
- WebSocket transport and hosted subagentsReuse one Responses connection and run server hosted subagents.Pro
- SDK configurationAPI keys, clients, provider defaults and debug logging.Pro