The model produced invalid content. Consider modifying your prompt if you are seeing this error persistently

I am using CrewAI and the models I tried using are o1-preview as well as o1-mini. The error is below:

OpenAIException - Error code: 500 - {'error': {'message': 'The model produced invalid content. Consider modifying your prompt if you are seeing this error persistently.', 'type': 'model_error', 'param': None, 'code': None}}

Do you have Tier 5 on your account? Could be that you are not Tier 5 which means you would not have access to the model yet. To get to Tier 5 your whole account over how long your subbed must be over $1k spent on it If I recall correctly what others mentioned.

See belowost likey, this is not related as pointed out it has another message for tier 5

note: the error message is not “your organization does not have access to this model”.

o1-preview and o1-mini as described are broadly deployed. The newest ‘01’ is available to few, not even all tier-5 still. So the above reply can be discounted.

“invalid content” is something that the endpoint internals cannot understand or parse being produced by the AI model. This can be a structured response that is not closed because you set max_completion_tokens to low, reasoning that was incomplete before any user output because you set max_completion_tokens too low, or on other models, temperature or sampling settings that cause bad output that cannot be used. Even audio tokens that cannot be decoded.

1 Like