-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Question
I have a non-reasoning model, gpt-4.1, that does some tool calls, and then hands off to a reasoning model, o3.
I am seeing that the server wants reasoning items with a tool call.
openai.BadRequestError: Error code: 400 - {'error': {'message': "Item 'fc_682ce5bd92248191940996c8d9a04dbb0a9f269894a5abbf' of type 'function_call' was provided without its required 'reasoning' item: 'rs_682ce5b7b5ac8191ac7a77406c8ef8780a9f269894a5abbf'.", 'type': 'invalid_request_error', 'param': 'input', 'code': None}}
I tried providing custom reasoning items during hand off using hooks, but the reasoning Id is validated; that will not work. Tried leaving the Id blank so maybe the backend will create it, also failed.
openai.NotFoundError: Error code: 404 - {'error': {'message': "Item with id 'rs_682ce817c17081919e38004aaf16b288031dc804e3dfc07c' not found.", 'type': 'invalid_request_error', 'param': 'input', 'code': None}}
I tried removing the tool call items, but then the server says no tool call results without a tool call item.
openai.BadRequestError: Error code: 400 - {'error': {'message': 'No tool call found for function call output with call_id call_4GvznfhXXkBVbpXwu2bpLjRS.', 'type': 'invalid_request_error', 'param': 'input', 'code': None}}
I do need the tool call results to be present in the context so o3 knows what happened. What do you suggest?
P.S. Switching from gpt-4.1 and o3 works great in the playground. From o3 to gpt-4.1 it does remove reasoning items, yes, but in the reverse, nothing seems to be the problem.
Many thanks.