automatically calculate api config for vanilla

Signed-off-by: TomWu <phperwuhan@gmail.com>