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.