System Role not supported error o1-mini

Hi, im getting this error when i swapped to o1-mini from 4o.


'message': "Unsupported value: 'messages[0].role' does not support 'system' with this model.", 'type': 'invalid_request_error', 'param': 'messages[0].role', 'code': 'unsupported_value'

I’ve removed the system role and use user now, but i still get the error, this is my code;

   messages = [
                {"role": "user", "content": prompt}
                
            ]
            



            logger.info("Sending request to OpenAI API")
            response = client.chat.completions.create(
                model=base_model,
                messages=messages
            )

            content = response.choices[0].message.content

Please help this is driving me insane இ௰இ

1 Like

Hi @matthewdakeng and welcome to the community!

Yes it’s a bit confusing :sweat_smile:!

So the new reasoning models have essentially moved from system messages to developer messages (see here). Saying that however, we are in some unchartered territory right now where o1-mini doesn’t support neither developer nor system messages. o1 and o3-mini do.

1 Like