Created
February 22, 2026 23:03
-
-
Save surajssd/561a9deb3d2e253c101438fab1b1e070 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Deploy GPT-5-mini model to Azure AI Foundry | |
| # Model: GPT-5-mini by OpenAI | |
| # Using existing resource group and AI Services account from Kimi K2.5 deployment | |
| # Set environment variables | |
| AZURE_SUBSCRIPTION_ID=$(az account show --query id --output tsv) | |
| export AZURE_SUBSCRIPTION_ID | |
| export AZURE_RESOURCE_GROUP="" | |
| export AZURE_REGION="" | |
| export AZURE_AI_NAME="" | |
| export AZURE_DEPLOYMENT_DOMAIN="" | |
| # These will change from model to model | |
| export AZURE_DEPLOYMENT_NAME="gpt-5-mini-deployment" | |
| export MODEL_NAME="gpt-5-mini" | |
| export MODEL_VERSION="2025-08-07" | |
| export MODEL_FORMAT="OpenAI" | |
| export SKU_CAPACITY=200 | |
| # Resource group and AI Services account already exist from previous deployment | |
| # Deploy GPT-5-mini model | |
| az cognitiveservices account deployment create \ | |
| --name "${AZURE_AI_NAME}" \ | |
| --resource-group "${AZURE_RESOURCE_GROUP}" \ | |
| --deployment-name "${AZURE_DEPLOYMENT_NAME}" \ | |
| --model-name "${MODEL_NAME}" \ | |
| --model-version "${MODEL_VERSION}" \ | |
| --model-format "${MODEL_FORMAT}" \ | |
| --sku-capacity "${SKU_CAPACITY}" \ | |
| --sku-name "GlobalStandard" | |
| # Get the API key | |
| AZURE_API_KEY=$(az cognitiveservices account keys list \ | |
| --name "${AZURE_AI_NAME}" \ | |
| --resource-group "${AZURE_RESOURCE_GROUP}" \ | |
| --subscription "${AZURE_SUBSCRIPTION_ID}" \ | |
| --query key1 -o tsv) | |
| export AZURE_API_KEY | |
| # Get the endpoint URL | |
| AZURE_ENDPOINT=$(az cognitiveservices account show \ | |
| --name "${AZURE_AI_NAME}" \ | |
| --resource-group "${AZURE_RESOURCE_GROUP}" \ | |
| --subscription "${AZURE_SUBSCRIPTION_ID}" \ | |
| --query "properties.endpoint" -o tsv) | |
| export AZURE_ENDPOINT | |
| echo "API Key: ${AZURE_API_KEY}" | |
| echo "Endpoint: ${AZURE_ENDPOINT}" | |
| # Test the deployment with a simple request | |
| curl -X POST "https://${AZURE_DEPLOYMENT_DOMAIN}.services.ai.azure.com/models/chat/completions?api-version=2024-05-01-preview" \ | |
| -H "Content-Type: application/json" \ | |
| -H "api-key: ${AZURE_API_KEY}" \ | |
| -d '{ | |
| "messages": [ | |
| {"role": "user", "content": "Hello, how are you?"} | |
| ], | |
| "max_completion_tokens": 100, | |
| "model": "'"${AZURE_DEPLOYMENT_NAME}"'" | |
| }' | jq | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment