Thanks for reporting the error; could you give me the entire curl for reproducing the error? Specifically I’d like to know model/temp/etc. so I can reproduce it.
Also, do you get this error every time, or a small subset of API calls?
Also, is your system prompt in Spanish by any chance?
No system prompt is not in spanish it is a subset of errors i.e. 90%+ are fine and its in a huge system that is constantly changing the request so I wouldbn’t be able to give you the exact curl request I am seeing it essentially try to function call but not quite doing the tool format the correct way
hi @HugoPodw – we’re actively working on many pieces of work to improve tool calling, specifically a new effort with constrained decoding which we’re hoping that lands in the next couple months. that new feature should resolve your errors and i’ll let you know when that lands.
in the meantime, @shreyas and @asharifr – we’ve updated our tool call parsing to be more aggressive in detecting when a model tried to call a tool and failed, so you should get a 400 error in the above case and you can use client-side retries to re-run the request.