Is this not using constrained decoding? You should pass the tool schemas to the "tools" parameter to make sure all tool calls are valid