1 2 stable Add option values in variant template [api]

Same as #3460 but targeted at 1-2-stable