React Agent with GPT-5

Hello Team,

I am trying to use react_agent with GPT-5. I see below error:

BadRequestError: Error code: 400 - {‘error’: {‘message’: “Unsupported parameter: ‘stop’ is not supported with this model.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘stop’, ‘code’: ‘unsupported_parameter’}}

When I change from react_agent to openai_tools_agent, I am able to use GPT-5 but I still want to use react_agent instead of tools agent. Any help will be appreciated.

Thank you.