When a Foundry sample or agent fails to connect, diff your config against the project dashboard character by character. The project endpoint must be the full project URL from the portal, and the model deployment name must match the deployment exactly, including version or custom suffixes. A common trap: the dashboard shows the model name (e.g. gpt-4o) but the deployment was named something else (e.g. gpt-4o-prod); using the model name gives a 404 DeploymentNotFound. Keep endpoint and deployment name in environment config and fail fast at startup if either is unset, so the error surfaces before the first call.

Context: Web (wplus Azure AI lab README): documents the most common silent failure in lab and CI setups: the project endpoint and the model deployment name must match the project dashboard exactly, including any custom deployment name suffixes.