Calling custom Function during reasoning process

if anyone is interrested in the answer. It does not seems that making a function call during reasoning is available, couldn’t find any documentation about it.

but, if your fan of conspiracy theories continue reading.

in the new response API (according to the offical API Spec ) there are 5 types of “response.output” obj, the returned response object look like this ..

{
  "id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41",
  "object": "response",
  "created_at": 1741476777,
  "output": [

        // can be any of the following 5 types..
    ]

    // other field
}
  1. Output message : (An output message from the model.)
  2. File search tool call : ( The results of a file search tool call. See the file search guide for more information.)
  3. Function tool call : ( A tool call to run a function. See the function calling guide for more information.)
  4. Web search tool call ( The results of a web search tool call. See the web search guide for more information. )
  5. Computer tool call : (A tool call to a computer use tool. See the computer use guide for more information.)
  6. Reasoning : (A description of the chain of thought used by a reasoning model while generating a response.)

but when streaming is enabled, the user receive these object in junks, the api docs [https://platform.openai.com/docs/api-reference/responses-streaming/response/output_item] specify the specification of these junks for all of the above types except for the Reasoning type, under these names :

  1. response.output_text.?
  2. response.function_call_arguments.?
  3. response.file_search_call.?
  4. response.web_search_call.?

funny enough , the response.reasoning.? type is not mentioned at all in the streaming API docs for the new response API.

looking at this issue [ Responses API: invalid_request_error - 'function_call' was provided without its required 'reasoning' item ]
where the user is trying to send a message containing a pair of function_call and function_call_output, but receiving and error :
“Responses API: invalid_request_error - ‘function_call’ was provided without its required ‘reasoning’ item”

this suggest that the api currently (internally) supports associating/embedding function calls and theirs output in the reasoning process, but the API does not expose this feature to the user yet.

at the end its only a theory, but it would be great if this feature is available in the future :slight_smile: .