본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)79k · #1723

azure-openai-to-responses

하는 일

이 스킬은 Azure OpenAI를 쓰는 Python 앱을 최신 Responses API로 옮기는 과정을 안내합니다. 오래된 코드를 고치거나 새 모델에 대비하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓Azure OpenAI를 쓰는 Python 앱을 Responses API로 바꾸고 싶을 때.
  • ✓Azure에서 Responses API가 필요한 새 모델에 맞춰 코드를 준비할 때.
  • ✓AzureOpenAI 클라이언트의 지원 중단 경고를 보고 고치고 싶을 때.

스킬 링크

https://github.com/microsoft/ai-agents-for-beginners/blob/main/.agents/skills/azure-openai-to-responses/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/microsoft/ai-agents-for-beginners/blob/main/.agents/skills/azure-openai-to-responses/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 Python 챗봇을 Azure OpenAI chat completions에서 Responses API로 옮겨 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 먼저 작은 테스트로 Azure 모델이 새 API를 지원하는지 확인하라고 합니다. 그다음 클라이언트 설정, 스트리밍, 도구 호출을 새 형식에 맞게 고칩니다.

기술 내용 (원본 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/AsyncAzureOpenAI to standard OpenAI/AsyncOpenAI client with the v1 endpoint
  • Fix deprecation warnings related to AzureOpenAI constructors or api_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_tokens has 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

⚠️ Older model limitations

WARNING: Older models (those predating gpt-4.1) may not support all Responses API features fully.

Known limitations with older models:

  • reasoning parameter: Not supported on many non-reasoning models. Only migrate reasoning if it was already present in the original code.
  • seed parameter: Not supported in Responses API at all — remove from all requests.
  • Structured output via text.format: Older models may not enforce strict: true JSON 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 to 1. 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 be 1 (or omitted). O-series models do not accept other values.
  • max_completion_tokens → max_output_tokens: Apps using the Azure-specific max_completion_tokens must switch to max_output_tokens. Set high values (4096+) because reasoning tokens count against the limit.
  • reasoning_effort: If the app uses reasoning_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.delta may arrive after a longer delay than with GPT models.
  • top_p: Not supported on o-series — remove if present.
자주 묻는 질문

모델을 먼저 확인해야 하나요?

네. 모든 모델이 Responses API를 지원하지는 않으므로 옮기기 전에 배포를 테스트하라고 스킬이 말합니다.

다른 AI 제공자에게도 쓸 수 있나요?

아닙니다. 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

repo: microsoft/ai-agents-for-beginners

인기도

GitHub 스타
79k
순위
#1723
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬