"Functions is too long" - Error

I’m trying to use an OpenAPI 3.0 spec with the OpenAI API. I try to use one of the functions in the API and get the following error:
BadRequestError: Error code: 400 - {‘error’: {‘message’: “‘$.functions’ is too long. Maximum length is 128, but got 174 items.”, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: None}}

Does it mean that the number of api endpoints I’m passing is 174? How can I mitigate this issue?
Any pointers, much appreciated,
Thank you.

Curious about this one! Seems to indicate you are trying to pass 178 functions? Maybe share some code?

The error indicates that the JSON path '$.functions' in your OpenAPI 3.0 spec is exceeding the maximum length allowed (128 items). It doesn’t directly refer to the number of API endpoints. To mitigate this, review your OpenAPI spec and check if there are excessively long paths or definitions within the ‘functions’ section.

Consider simplifying or breaking down your API definitions to reduce the length. If the issue persists, you may need to reorganize or modularize your API spec. Additionally, ensure that your OpenAPI spec adheres to OpenAI API documentation guidelines.