azure-openai-to-responses
यह क्या करती है
यह स्किल Azure OpenAI इस्तेमाल करने वाले Python ऐप को नए Responses API पर ले जाने का मार्गदर्शन करती है। जो डेवलपर पुराना कोड अपडेट करना चाहते हैं या नए मॉडल के लिए तैयारी कर रहे हैं, उनके लिए यह है।
कब इस्तेमाल करें
- ✓जब आपके पास Azure OpenAI इस्तेमाल करने वाला Python ऐप हो और आप Responses API पर जाना चाहें।
- ✓जब नए मॉडल के लिए कोड तैयार करना हो जिसे Azure पर Responses API चाहिए।
- ✓जब AzureOpenAI client से deprecation चेतावनियाँ दिखें और उन्हें ठीक करना हो।
Skill का लिंक
https://github.com/microsoft/ai-agents-for-beginners/blob/main/.agents/skills/azure-openai-to-responses/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Python chatbot को Azure OpenAI chat completions से Responses API पर ले जाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट पहले एक छोटी जाँच से देखता है कि आपका Azure मॉडल नया API सपोर्ट करता है। फिर वह client सेटअप, streaming और tool calls को नए फ़ॉर्मेट में अपडेट करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Migrate Python Apps from Azure OpenAI Chat Completions to Responses API
AUTHORITATIVE GUIDANCE — FOLLOW EXACTLY
This skill migrates Python codebases using Azure OpenAI Chat Completions to the unified Responses API. Follow these instructions precisely. Do not improvise parameter mappings or invent API shapes.
Triggers
Activate this skill when user wants to:
- Migrate a Python app from Azure OpenAI Chat Completions to Responses API
- Upgrade Python OpenAI SDK usage to the latest API shape against Azure OpenAI
- Prepare Python code for GPT-5 or newer models that require Responses on Azure
- Switch from
AzureOpenAI/AsyncAzureOpenAIto standardOpenAI/AsyncOpenAIclient with the v1 endpoint - Fix deprecation warnings related to
AzureOpenAIconstructors orapi_version
⚠️ Model Compatibility — CHECK FIRST
Before migrating, verify your Azure OpenAI deployment supports the Responses API.
1. Smoke-test your deployment (fastest)
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AZURE_OPENAI_API_KEY"],
base_url=f"{os.environ['AZURE_OPENAI_ENDPOINT'].rstrip('/')}/openai/v1/",
)
try:
resp = client.responses.create(
model=os.environ["AZURE_OPENAI_DEPLOYMENT"],
input="ping",
max_output_tokens=50,
store=False,
)
print(f"✅ Deployment supports Responses API: {resp.output_text}")
except Exception as e:
print(f"❌ Deployment does NOT support Responses API: {e}")
Note:
max_output_tokenshas a minimum of 16 on Azure OpenAI. Values below 16 return a 400 error. Use 50+ for smoke tests.
If this returns a 404, the deployment's model doesn't support Responses yet — check the reference below or redeploy with a supported model.
2. Check available models in your region (recommended)
Run the built-in model compatibility tool to see what's available with Responses API support in your specific region:
python migrate.py models --subscription YOUR_SUB_ID --location YOUR_REGION
This queries Azure ARM live and shows a compatibility matrix — which models support Responses, structured output, tools, etc. Use --filter gpt-5.1,gpt-5.2 to narrow results or --json for scripting.
3. Full model support reference
- Live query:
python migrate.py models(see above — region-specific, always up to date) - Browse availability: Model summary table and region availability
- Quickstart & guidance: https://aka.ms/openai/start
⚠️ Older model limitations
WARNING: Older models (those predating
gpt-4.1) may not support all Responses API features fully.Known limitations with older models:
reasoningparameter: Not supported on many non-reasoning models. Only migratereasoningif it was already present in the original code.seedparameter: Not supported in Responses API at all — remove from all requests.- Structured output via
text.format: Older models may not enforcestrict: trueJSON schemas reliably.- Tool orchestration: GPT-5+ orchestrates tool calls as part of internal reasoning. Older models on Responses still work but lack this deep integration.
- Temperature constraints: When migrating to
gpt-5, temperature must be omitted or set to1. Older models have no such constraint.
O-series reasoning models (o1, o3-mini, o3, o4-mini)
O-series models have unique parameter constraints. When migrating apps that target o-series models:
temperature: Must be1(or omitted). O-series models do not accept other values.max_completion_tokens→max_output_tokens: Apps using the Azure-specificmax_completion_tokensmust switch tomax_output_tokens. Set high values (4096+) because reasoning tokens count against the limit.reasoning_effort: If the app usesreasoning_effort(low/medium/high), keep it — the Responses API supports this parameter for o-series models.- Streaming behavior: O-series models may buffer output until reasoning completes before emitting text delta events. Streaming still works, but the first
response.output_text.deltamay arrive after a longer delay than with GPT models. top_p: Not supported on o-series — remove if present.
अक्सर पूछे जाने वाले सवाल
क्या पहले मॉडल जाँचना ज़रूरी है?
हाँ। स्किल कहती है कि माइग्रेट करने से पहले अपनी deployment जाँच लें, क्योंकि हर मॉडल Responses API सपोर्ट नहीं करता।
क्या यह दूसरे AI providers के लिए काम करती है?
नहीं। यह Azure OpenAI इस्तेमाल करने वाले Python कोड के लिए है।
क्या इसमें Entra ID लॉगिन शामिल है?
हाँ। माइग्रेशन चरणों में EntraID प्रमाणीकरण भी शामिल है।
जानकारी
लेखक का मूल विवरण
Migrate Python apps from Azure OpenAI Chat Completions to the Responses API. Covers AzureOpenAI/AsyncAzureOpenAI client migration to the v1 endpoint, streaming, tools, structured output, multi-turn, EntraID auth, and model compatibility checks. Python-focused, Azure OpenAI-specific. USE FOR: migrate to responses API, switch from chat completions, openai responses, upgrade openai SDK, responses API migration, move from completions to responses, gpt-5 migration, azure openai python migration, chat completions to responses, AzureOpenAI to OpenAI client, python azure openai upgrade. DO NOT USE FOR
लोकप्रियता
- GitHub स्टार
- 79k
- रैंकिंग में स्थान
- #1723
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
deploying-scalable-agents
79kयह आपके एजेंट को काम करने वाले AI एजेंट को Microsoft Foundry पर स्केलेबल और निगरानी वाले प्रोडक्शन सेटअप में ले जाने में मदद करती है।
jupyter-notebook
79kप्रयोगों या चरण-दर-चरण ट्यूटोरियल के लिए तैयार टेम्पलेट से Jupyter notebook बनाने या सँवारने में आपके एजेंट की मदद करती है।
local-ai-agents
79kसिखाती है कि स्थानीय मॉडल और टूल्स से अपने कंप्यूटर पर पूरी तरह चलने वाले AI सहायक कैसे बनाएँ, बिना क्लाउड की ज़रूरत के।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।