azure-openai-to-responses
Was er macht
Dieser Skill begleitet die Umstellung einer Python-App, die Azure OpenAI nutzt, auf die neuere Responses API. Er richtet sich an Entwickler, die alten Code aktualisieren oder sich auf neuere Modelle vorbereiten wollen.
Wann du ihn nutzt
- ✓Wenn du eine Python-App mit Azure OpenAI hast und auf die Responses API wechseln willst.
- ✓Wenn du Code für ein neueres Modell vorbereitest, das auf Azure die Responses API braucht.
- ✓Wenn du Warnungen zur Ablösung des AzureOpenAI-Clients siehst und sie beheben willst.
Link zum Skill
https://github.com/microsoft/ai-agents-for-beginners/blob/main/.agents/skills/azure-openai-to-responses/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Stelle meinen Python-Chatbot von Azure-OpenAI-Chat-Completions auf die Responses API um.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent prüft zuerst mit einem kleinen Test, ob dein Azure-Modell die neue API unterstützt. Danach passt er die Client-Einrichtung, das Streaming und die Tool-Aufrufe an das neue Format an.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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.
Häufige Fragen
Muss ich zuerst mein Modell prüfen?
Ja. Laut Skill solltest du dein Deployment testen, bevor du migrierst, da nicht jedes Modell die Responses API unterstützt.
Funktioniert es auch für andere KI-Anbieter?
Nein. Er ist für Python-Code gedacht, der Azure OpenAI nutzt.
Deckt er die Anmeldung über Entra ID ab?
Ja. Die EntraID-Authentifizierung gehört zu den Migrationsschritten.
Details
Originalbeschreibung des Autors
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
Beliebtheit
- GitHub-Sterne
- 79k
- Platz im Ranking
- #1723
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
deploying-scalable-agents
79kHilft deinem Agenten, einen funktionierenden KI-Agenten in eine skalierbare, überwachte Produktivumgebung auf Microsoft Foundry zu bringen.
jupyter-notebook
79kHilft deinem Agenten, Jupyter-Notebooks für Experimente oder Schritt-für-Schritt-Anleitungen zu erstellen oder aufzuräumen, mit fertigen Vorlagen.
local-ai-agents
79kBringt deinem Agenten bei, KI-Helfer zu bauen, die komplett auf deinem eigenen Computer mit lokalen Modellen und Werkzeugen laufen, ganz ohne Cloud.
Ähnliche Skills
api-connector-builder
280kLässt deinen Agenten neue API-Anbindungen nach dem bestehenden Muster bauen. Nutze es, wenn du eine weitere Integration ergänzen willst, ohne neue Wege einzuführen.
api-design
280kHilft deinem Agenten, REST-APIs nach Best Practices zu entwerfen. Nützlich für die Kommunikation, die Fehlerausgabe und die Organisation von Daten.
backend-patterns
280kHilft deinem Agenten bei Architekturmustern für die Serverseite und bei der Datenbankoptimierung. Nützlich zum Bauen und Prüfen von Server-Code.