I am building using the agents SDK. I want a workflow where a reasoning model, o3, handoffs to a non-reasoning model, 4.1 for a toolcall, and then another handoff to o3.
The problems is that reasoning models refuse a handoff if there the reasoning item is missing. I tried injecting custom reasoning items when handing off 4.1 → o3, but this gets validated:
openai.NotFoundError: Error code: 404 - {'error': {'message': "Item with id 'rs_d6a8c1f6-3853-4cbc-9d5a-374d4dea3f6e' not found.", 'type': 'invalid_request_error', 'param': 'input', 'code': None}}
I further tried to strip the tool calls during the handoff, but a tool call result also expects a tool call, without which I receive errors.
Is there a way around this?
Many thanks.