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/SKILL.md
1---2name: deploy-model3description: "Unified Azure OpenAI model deployment skill with intelligent intent-based routing. Handles quick preset deployments, fully customized deployments (version/SKU/capacity/RAI policy), and capacity discovery across regions and projects. USE FOR: deploy model, deploy gpt, create deployment, model deployment, deploy openai model, set up model, provision model, find capacity, check model availability, where can I deploy, best region for model, capacity analysis. DO NOT USE FOR: listing existing deployments (use foundry_models_deployments_list MCP tool), deleting deployments, agent creation (use agent/create), project creation (use project/create)."4license: MIT5metadata:6author: Microsoft7version: "1.0.0"8---910# Deploy Model1112> **Scope — read this first.** This skill creates model deployments **out-of-band** via Azure CLI / MCP / portal. For azd-managed Foundry projects (those scaffolded from `azd-ai-starter-basic` or via `azd ai agent init`), declare deployments in `azure.yaml services.<name>.config.deployments[]` instead — `azd ai agent init` writes the entry from the sample manifest and `azd provision` creates the deployment through Bicep. See [foundry-agent/create/create-hosted.md](../../foundry-agent/create/create-hosted.md) for the Golden Path. Use this skill only for: (a) Foundry projects not managed by an azd project, (b) ad-hoc deployments outside the azd lifecycle.1314Unified entry point for all Azure OpenAI model deployment workflows. Analyzes user intent and routes to the appropriate deployment mode.1516## Quick Reference1718| Mode | When to Use | Sub-Skill |19|------|-------------|-----------|20| **Preset** | Quick deployment, no customization needed | [preset/SKILL.md](preset/SKILL.md) |21| **Customize** | Full control: version, SKU, capacity, RAI policy | [customize/SKILL.md](customize/SKILL.md) |22| **Capacity Discovery** | Find where you can deploy with specific capacity | [capacity/SKILL.md](capacity/SKILL.md) |2324## Intent Detection2526Analyze the user's prompt and route to the correct mode:2728```29User Prompt30│31├─ Simple deployment (no modifiers)32│ "deploy gpt-4o", "set up a model"33│ └─> PRESET mode34│35├─ Customization keywords present36│ "custom settings", "choose version", "select SKU",37│ "set capacity to X", "configure content filter",38│ "PTU deployment", "with specific quota"39│ └─> CUSTOMIZE mode40│41├─ Capacity/availability query42│ "find where I can deploy", "check capacity",43│ "which region has X capacity", "best region for 10K TPM",44│ "where is this model available"45│ └─> CAPACITY DISCOVERY mode46│47└─ Ambiguous (has capacity target + deploy intent)48"deploy gpt-4o with 10K capacity to best region"49└─> CAPACITY DISCOVERY first → then PRESET or CUSTOMIZE50```5152### Routing Rules5354| Signal in Prompt | Route To | Reason |55|------------------|----------|--------|56| Just model name, no options | **Preset** | User wants quick deployment |57| "custom", "configure", "choose", "select" | **Customize** | User wants control |58| "find", "check", "where", "which region", "available" | **Capacity** | User wants discovery |59| Specific capacity number + "best region" | **Capacity → Preset** | Discover then deploy quickly |60| Specific capacity number + "custom" keywords | **Capacity → Customize** | Discover then deploy with options |61| "PTU", "provisioned throughput" | **Customize** | PTU requires SKU selection |62| "optimal region", "best region" (no capacity target) | **Preset** | Region optimization is preset's specialty |6364### Multi-Mode Chaining6566Some prompts require two modes in sequence:6768**Pattern: Capacity → Deploy**69When a user specifies a capacity requirement AND wants deployment:701. Run **Capacity Discovery** to find regions/projects with sufficient quota712. Present findings to user723. Ask: "Would you like to deploy with **quick defaults** or **customize settings**?"734. Route to **Preset** or **Customize** based on answer7475> 💡 **Tip:** If unsure which mode the user wants, default to **Preset** (quick deployment). Users who want customization will typically use explicit keywords like "custom", "configure", or "with specific settings".7677## Project Selection (All Modes)7879Before any deployment, resolve which project to deploy to. This applies to **all** modes (preset, customize, and after capacity discovery).8081### Resolution Order82831. **Check `PROJECT_RESOURCE_ID` env var** — if set, use it as the default842. **Check user prompt** — if user named a specific project or region, use that853. **If neither** — query the user's projects and suggest the current one8687### Confirmation Step (Required)8889**Always confirm the target before deploying.** Show the user what will be used and give them a chance to change it:9091```92Deploying to:93Project: <project-name>94Region: <region>95Resource: <resource-group>9697Is this correct? Or choose a different project:981. ✅ Yes, deploy here (default)992. 📋 Show me other projects in this region1003. 🌍 Choose a different region101```102103If user picks option 2, show top 5 projects in that region:104105```106Projects in <region>:1071. project-alpha (rg-alpha)1082. project-beta (rg-beta)1093. project-gamma (rg-gamma)110...111```112113> ⚠️ **Never deploy without showing the user which project will be used.** This prevents accidental deployments to the wrong resource.114115## Pre-Deployment Validation (All Modes)116117Before presenting any deployment options (SKU, capacity), always validate both of these:1181191. **Model supports the SKU** — query the model catalog to confirm the selected model+version supports the target SKU:120```bash121az cognitiveservices model list --location <region> --subscription <sub-id> -o json122```123Filter for the model, extract `.model.skus[].name` to get supported SKUs.1241252. **Subscription has available quota** — check that the user's subscription has unallocated quota for the SKU+model combination:126```bash127az cognitiveservices usage list --location <region> --subscription <sub-id> -o json128```129Match by usage name pattern `OpenAI.<SKU>.<model-name>` (e.g., `OpenAI.GlobalStandard.gpt-4o`). Compute `available = limit - currentValue`.130131> ⚠️ **Warning:** Only present options that pass both checks. Do NOT show hardcoded SKU lists — always query dynamically. SKUs with 0 available quota should be shown as ❌ informational items, not selectable options.132133> 💡 **Quota management:** For quota increase requests, usage monitoring, and troubleshooting quota errors, defer to the [quota skill](../../quota/quota.md) instead of duplicating that guidance inline.134135## Prerequisites136137All deployment modes require:138- Azure CLI installed and authenticated (`az login`)139- Active Azure subscription with deployment permissions140- Azure AI Foundry project resource ID (or agent will help discover it via `PROJECT_RESOURCE_ID` env var)141142## Sub-Skills143144- **[preset/SKILL.md](preset/SKILL.md)** — Quick deployment to optimal region with sensible defaults145- **[customize/SKILL.md](customize/SKILL.md)** — Interactive guided flow with full configuration control146- **[capacity/SKILL.md](capacity/SKILL.md)** — Discover available capacity across regions and projects147