developer messages are not converted automatically for 4o, that’s a lie, see this:
openai.BadRequestError: Error code: 400 - {‘error’: {‘message’: “Unsupported value: ‘messages[0].role’ does not support ‘developer’ with this model.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘messages[0].role’, ‘code’: ‘unsupported_value’}}
Also I cannot understand how I am using the OFFICIAL OPENAI’S LIBRARY yet I have to write my own library to interact with the library because it’s so bad, something that should be as simple as changing a string value from “gpt-4o” to “o1-preview” is a pain in the ass. You have to ensure you use SYSTEM instead of DEVELOPER and vice-versa, then you cannot use formatted responses with o1, but you cannot pass ANY value of response_format to the completions.create() function because it rejects it, even rejects None and OpenAI’s NotGiven() class and the NOT_GIVEN object. So you end up having to make two functions, one that is invoked without that argument for o1 and one that is invoked with the argument for 4o. Might as well just run deepseek R1 on my smart fridge.