If definitions is used, the function token cannot be calculated successfully This is widely used in structured-outputs , you can see the document https://platform.openai.com/docs/guides/structured-outputs/definitions-are-supported