Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Build and deploy AI applications on Azure AI Foundry using Microsoft's model catalog and AI services
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
models/deploy-model/preset/SKILL.md
1---2name: preset3description: "Intelligently deploys Azure OpenAI models to optimal regions by analyzing capacity across all available regions. Automatically checks current region first and shows alternatives if needed. USE FOR: quick deployment, optimal region, best region, automatic region selection, fast setup, multi-region capacity check, high availability deployment, deploy to best location. DO NOT USE FOR: custom SKU selection (use customize), specific version selection (use customize), custom capacity configuration (use customize), PTU deployments (use customize)."4license: MIT5metadata:6author: Microsoft7version: "1.0.1"8---910# Deploy Model to Optimal Region1112Automates intelligent Azure OpenAI model deployment by checking capacity across regions and deploying to the best available option.1314## What This Skill Does15161. Verifies Azure authentication and project scope172. Checks capacity in current project's region183. If no capacity: analyzes all regions and shows available alternatives194. Filters projects by selected region205. Supports creating new projects if needed216. Deploys model with GlobalStandard SKU227. Monitors deployment progress2324## Prerequisites2526- Azure CLI installed and configured27- Active Azure subscription with Cognitive Services read/create permissions28- Azure AI Foundry project resource ID (`PROJECT_RESOURCE_ID` env var or provided interactively)29- Format: `/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.CognitiveServices/accounts/{account}/projects/{project}`30- Found in: Azure AI Foundry portal → Project → Overview → Resource ID3132## Quick Workflow3334### Fast Path (Current Region Has Capacity)35```361. Check authentication → 2. Get project → 3. Check current region capacity37→ 4. Deploy immediately38```3940### Alternative Region Path (No Capacity)41```421. Check authentication → 2. Get project → 3. Check current region (no capacity)43→ 4. Query all regions → 5. Show alternatives → 6. Select region + project44→ 7. Deploy45```4647---4849## Deployment Phases5051| Phase | Action | Key Commands |52|-------|--------|-------------|53| 1. Verify Auth | Check Azure CLI login and subscription | `az account show`, `az login` |54| 2. Get Project | Parse `PROJECT_RESOURCE_ID` ARM ID, verify exists | `az cognitiveservices account show` |55| 3. Get Model | List available models, user selects model + version | `az cognitiveservices account list-models` |56| 4. Check Current Region | Query capacity using GlobalStandard SKU | `az rest --method GET .../modelCapacities` |57| 5. Multi-Region Query | If no local capacity, query all regions | Same capacity API without location filter |58| 6. Select Region + Project | User picks region; find or create project | `az cognitiveservices account list`, `az cognitiveservices account create` |59| 7. Deploy | Generate unique name, calculate capacity (50% available, min 50 TPM), create deployment | `az cognitiveservices account deployment create` |6061For detailed step-by-step instructions, see [workflow reference](references/workflow.md).6263---6465## Error Handling6667| Error | Symptom | Resolution |68|-------|---------|------------|69| Auth failure | `az account show` returns error | Run `az login` then `az account set --subscription <id>` |70| No quota | All regions show 0 capacity | Defer to the [quota skill](../../../quota/quota.md) for increase requests and troubleshooting; check existing deployments; try alternative models |71| Model not found | Empty capacity list | Verify model name with `az cognitiveservices account list-models`; check case sensitivity |72| Name conflict | "deployment already exists" | Append suffix to deployment name (handled automatically by `generate_deployment_name` script) |73| Region unavailable | Region doesn't support model | Select a different region from the available list |74| Permission denied | "Forbidden" or "Unauthorized" | Verify Cognitive Services Contributor role: `az role assignment list --assignee <user>` |7576---7778## Advanced Usage7980```bash81# Custom capacity82az cognitiveservices account deployment create ... --sku-capacity <value>8384# Check deployment status85az cognitiveservices account deployment show --name <acct> --resource-group <rg> --deployment-name <name> --query "{Status:properties.provisioningState}"8687# Delete deployment88az cognitiveservices account deployment delete --name <acct> --resource-group <rg> --deployment-name <name>89```9091## Notes9293- **SKU:** GlobalStandard only — **API Version:** 2024-10-01 (GA stable)9495---9697## Related Skills9899- **microsoft-foundry** - Parent skill for Azure AI Foundry operations100- **[quota](../../../quota/quota.md)** — For quota viewing, increase requests, and troubleshooting quota errors, defer to this skill101- **azure-quick-review** - Review Azure resources for compliance102- **azure-cost-estimation** - Estimate costs for Azure deployments103- **azure-validate** - Validate Azure infrastructure before deployment104