Where did enums go?
# support
e
The new tool calling interface as well as API reference doesn't show support for enums anymore - temporarily because you're still working on it? If a tool is created via API with enums, the frontend removes anything related to enums when editing the function.
It was working fine before - please look into this ASAP since this is a major issue imo
s
+1 also requesting enums
p
Copy code
markdown
{
  "type": "function",
  "function": {
    "name": "get_weather",
    "description": "Retrieves current weather for the given location.",
    "parameters": {
      "type": "object",
      "properties": {
        "location": {
          "type": "string",
          "description": "City and country e.g. Bogotá, Colombia"
        },
        "units": {
          "type": "string",
          "description": "Units the temperature will be returned in.",
          "enum": ["celsius", "fahrenheit"]
        }
      },
      "required": ["location", "units"]
    }
  }
}
When creating a function tool via the API, you need to follow the OpenAI Function Calling schema format, which Vapi has implemented. Above's how to define an enum in your function parameters.
Let me know if you require further help.