Remove the API container struct and use env Upstream-commit: aa05170a82a857aa6f1257d4554828c08c2015f6 Component: engine