[Fix] system role for o-series models
This PR fixes the prompt role issue for O-Series models (o4-mini and o3), which were previously receiving "role": "system". As per the OpenAI docs, these models should use "role": "developer".
Updated the role to "developer" for these models to align with the OpenAI specification.
The fix has been tested successfully. Please refer to the attached screenshot showcasing the correct prompt role in the API request after the change.
@animeshlego5 do you know if this applies to Azure models as well?
@zpg6 If you check the Azure OpenAI documentation, it's the same. https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/reasoning?tabs=python-secure%2Cpy#developer-messages
This was put into place for gemini models, can we make the logic this instead?: | system -> system | gemini -> system | developer -> developer Thanks!
@andrewpareles I have changed the logic as you suggested and tested for a Gemini model (gemini-2.5-flash-preview-04-17), following is the screenshot. Lmk if you need anything changed :)