WebSocket transport and hosted subagents
Keep one connection to the Responses API open across several turns, then watch an experimental model create subagents on OpenAI's servers while your own function tools still run in your app.
12 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 12 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