Generated banner for Preset
Generated logo for Preset

Preset

MicrosoftOfficialCreated by Microsoft

  • Skill
  • Workflow
  • Cloud and DevOps
  • MIT
  • No issues found

From the author

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).
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The preset skill streamlines the deployment of Azure OpenAI models by programmatically checking for capacity across regions. It first evaluates the user's current project region and, if capacity is unavailable, queries all regions to identify viable alternatives. The skill handles the end-to-end process, including authentication verification, project identification, model selection, and deployment execution using the GlobalStandard SKU.

What it does

  • Verifies Azure CLI authentication and subscription context.
  • Checks capacity for specific models in the current project region.
  • Scans all available regions for capacity if the primary region is exhausted.
  • Facilitates the selection of an alternative region and project.
  • Automates the deployment of models with the GlobalStandard SKU.
  • Monitors and reports on the status of the deployment process.

When to use it

  • When you need to deploy an Azure OpenAI model quickly without manual capacity checks.
  • When your primary region lacks sufficient capacity for a new deployment.
  • When you want to ensure high availability by selecting the best available region.
  • When setting up new AI projects within the Microsoft Foundry environment.

Advantages

  • Reduces manual effort by automating multi-region capacity lookups.
  • Prevents deployment failures caused by regional capacity constraints.
  • Ensures consistent deployment configurations using GlobalStandard SKU.
  • Provides clear paths for error handling and quota management.

Usage examples

“Deploy my GPT-4o model to the best available region.”
The agent checks the current project region, finds it full, scans other regions, presents the best options, and deploys the model to the selected location.
“I need to set up a new model deployment but I am not sure which region has space.”
The agent queries all regions for the specified model's capacity and guides you through selecting a region that can accommodate the deployment.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/preset/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip preset.zip -d .agents/skills

Documentation by Microsoft

Deploy Model to Optimal Region

Automates intelligent Azure OpenAI model deployment by checking capacity across regions and deploying to the best available option.

What This Skill Does

  1. Verifies Azure authentication and project scope

  2. Checks capacity in current project's region

  3. If no capacity: analyzes all regions and shows available alternatives

  4. Filters projects by selected region

  5. Supports creating new projects if needed

  6. Deploys model with GlobalStandard SKU

  7. Monitors deployment progress

Prerequisites

  • Azure CLI installed and configured

  • Active Azure subscription with Cognitive Services read/create permissions

  • Microsoft Foundry project resource ID (PROJECT_RESOURCE_ID env var or provided interactively)

    • Format: /subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.CognitiveServices/accounts/{account}/projects/{project}

    • Found in: Microsoft Foundry portal → Project → Overview → Resource ID

Quick Workflow

Fast Path (Current Region Has Capacity)
1. Check authentication → 2. Get project → 3. Check current region capacity
→ 4. Deploy immediately
Alternative Region Path (No Capacity)
1. Check authentication → 2. Get project → 3. Check current region (no capacity)
→ 4. Query all regions → 5. Show alternatives → 6. Select region + project
→ 7. Deploy

Deployment Phases

PhaseActionKey Commands
1. Verify AuthCheck Azure CLI login and subscriptionaz account show, az login
2. Get ProjectParse PROJECT_RESOURCE_ID ARM ID, verify existsaz cognitiveservices account show
3. Get ModelList available models, user selects model + versionaz cognitiveservices account list-models
4. Check Current RegionQuery capacity using GlobalStandard SKUaz rest --method GET .../modelCapacities
5. Multi-Region QueryIf no local capacity, query all regionsSame capacity API without location filter
6. Select Region + ProjectUser picks region; find or create projectaz cognitiveservices account list, az cognitiveservices account create
7. DeployGenerate unique name, calculate capacity (50% available, min 50 TPM), create deploymentaz cognitiveservices account deployment create

For detailed step-by-step instructions, see workflow reference.


Error Handling

ErrorSymptomResolution
Auth failureaz account show returns errorRun az login then az account set --subscription <id>
No quotaAll regions show 0 capacityDefer to the quota skill for increase requests and troubleshooting; check existing deployments; try alternative models
Model not foundEmpty capacity listVerify model name with az cognitiveservices account list-models; check case sensitivity
Name conflict"deployment already exists"Append suffix to deployment name (handled automatically by generate_deployment_name script)
Region unavailableRegion doesn't support modelSelect a different region from the available list
Permission denied"Forbidden" or "Unauthorized"Verify Cognitive Services Contributor role: az role assignment list --assignee <user>

Advanced Usage

# Custom capacity
az cognitiveservices account deployment create ... --sku-capacity <value>

# Check deployment status
az cognitiveservices account deployment show --name <acct> --resource-group <rg> --deployment-name <name> --query "{Status:properties.provisioningState}"

# Delete deployment
az cognitiveservices account deployment delete --name <acct> --resource-group <rg> --deployment-name <name>

Notes

  • SKU: GlobalStandard only — API Version: 2024-10-01 (GA stable)


  • microsoft-foundry - Parent skill for Microsoft Foundry operations

  • quota — For quota viewing, increase requests, and troubleshooting quota errors, defer to this skill

  • azure-quick-review - Review Azure resources for compliance

  • cost-estimation - Estimate costs through the separately installed azure-cost plugin

  • azure-validate - Validate Azure infrastructure before deployment

Files

EXAMPLES.md

Examples: preset

Example 1: Fast Path — Current Region Has Capacity

Scenario: Deploy gpt-4o to project in East US, which has capacity. Result: Deployed in ~45s. No region selection needed. 100K TPM default, GlobalStandard SKU.

Example 2: Alternative Region — No Capacity in Current Region

Scenario: Deploy gpt-4-turbo to dev project in West US 2 (no capacity). Result: Queried all regions → user selected East US 2 (120K available) → deployed in ~2 min.

Example 3: Create New Project in Optimal Region

Scenario: Deploy gpt-4o-mini in Europe for data residency; no existing European project. Result: Created AI Services hub + project in Sweden Central → deployed in ~4 min with 150K TPM.

Example 4: Insufficient Quota Everywhere

Scenario: Deploy gpt-4 but all regions have exhausted quota. Result: Graceful failure with actionable guidance:

  1. Request quota increase via the quota skill

  2. List existing deployments consuming quota

  3. Suggest alternative models (gpt-4o, gpt-4o-mini)

Example 5: First-Time User — No Project

Scenario: Deploy gpt-4o with no existing Microsoft Foundry project. Result: Full onboarding in ~5 min — created resource group, AI Services hub, project, then deployed.

Example 6: Deployment Name Conflict

Scenario: Auto-generated deployment name already exists. Result: Appended random hex suffix (e.g., -7b9e) and retried automatically.

Example 7: Multi-Version Model Selection

Scenario: Deploy "latest gpt-4o" when multiple versions exist. Result: Latest stable version auto-selected. Capacity aggregated across versions.

Example 8: Anthropic Model (claude-sonnet-4-6)

Scenario: Deploy claude-sonnet-4-6 (Anthropic model requiring modelProviderData). Result: User prompted for industry selection → tenant country code and org name fetched automatically → deployed via ARM REST API with modelProviderData payload in ~2 min. Capacity set to 1 (MaaS billing).


Summary of Scenarios

ScenarioDurationKey Features
1: Fast Path~45sCurrent region has capacity, direct deploy
2: Alt Region~2mRegion selection, project switch
3: New Project~4mProject creation in optimal region
4: No QuotaN/AGraceful failure, actionable guidance
5: First-Time~5mComplete onboarding
6: Name Conflict~1mAuto-retry with suffix
7: Multi-Version~1mLatest version auto-selected
8: Anthropic~2mIndustry prompt, tenant info, REST API deploy

Common Patterns

A: Quick Deploy     Auth → Get Project → Check Region (✓) → Deploy
B: Region Select    Auth → Get Project → Region (✗) → Query All → Select → Deploy
C: Full Onboarding  Auth → No Projects → Create Project → Deploy
D: Error Recovery   Deploy (✗) → Analyze → Fix → Retry

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs a command-line tool

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Microsoft
Publisher
Microsoft (Official)
Source
microsoft/skills · .github/plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/preset · commit 0696600
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from .github/plugins/azure-skills/LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Also distributed in
microsoft/azure-skills

AutoGineer is not affiliated with or endorsed by Microsoft.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download preset.zip