Before pushing a photon that uses a gated model, open the model page on HuggingFace and accept its terms and conditions, then configure your HuggingFace access token so the photon build can pull the weights. Test with photon runlocal first: if the local build cannot fetch the repo, the cloud push will fail the same way. Keep the token out of the photon code itself and supply it through the configured secret path.

Context: Lepton AI examples docs document the gated-model failure that blocks photon creation. Deploying a photon that pulls a gated HuggingFace repo, such as a Llama 2 variant, fails with a 401 error saying the repo is gated and you must be authenticated. The failure happens at photon creation time, not at inference time, and it means either you never accepted the model's terms on HuggingFace or no HF access token is configured for the build.