passdrill
AI & LLM Engineering · Building with LLM APIs · Card 020/024 medium

An agent built on OpenAI's Responses API needs to look up two independent pieces of information in a single turn, using the same tool twice with different arguments. According to OpenAI's documentation, how does the API support this, and what must the client do in response?

  1. a single assistant turn can never include more than one function call; the model must wait for the client to answer the first call before it is permitted to request the second one
  2. the client may return one combined `function_call_output` message covering every function call made in that turn, as long as the message lists all of the relevant call IDs together
  3. `parallel_tool_calls` can only ever be set to true, since the API provides no way to restrict a response to at most one function call per turn
  4. a single assistant turn can include multiple function calls, each carrying its own `call_id`, and the client must send back one `function_call_output` item per `call_id` containing that call's result; setting `parallel_tool_calls` to false instead restricts the model to at most one function call per turn
Next card → Shuffle