Custom ai tool fails

Symptom:
Any custom tool having at least one parameter fails with the following:

Job exception: {
  "error": {
    "message": "Invalid schema for function 'custom-geocode': False is not of type 'array'.",
    "type": "invalid_request_error",
    "param": "tools[2].function.parameters",
    "code": "invalid_function_parameters"
  }
}

Tools created from presets do not exhibit this.
I pulled the table contents for ai_tools, and the tools created from scratch have an “enum”:false property while the preset ones do not have this. I think enum is supposed to be either an array or not be present, but not a bool, hence the error.
Someone else also already reported this:

Thanks for looking into this :slight_smile:

Apologies for the delay. We just fixed this:

4 Likes