JSON format difference in tools in assistant API vs. chat completions

I originally worked most of my system against the assistants API and started to use multiple formats for a type – so in the attached screenshot where you see the type for “location” as “string”, I’ve been using “type”: [“string”, “number”] to allow more than 1 type. Works great for assistant API.

However recently decided to use chat completions instead and I see the input parser for tools doesn’t accept an array of formats in this case.

Looked at docs and seeing no clarification – so before I recode all my functions to remove this “array of types” for chat completions API thought I’d check here in case I’m missing something.

Thanks
-J

Thu Mar 06 2025 09:49:18 GMT-0800 (Pacific Standard Time) POST /v1/ai/chat: "400 Invalid schema for function 'doAction': In context=('properties', 'value1'), schema must have a 'type' key.": stacktrace follows =>