Official agent skill

Azure Openai To Responses

by microsoft in microsoft/ai-agents-for-beginners

Migrate Python apps from Azure OpenAI Chat Completions to the Responses API.

OfficialMITAuto-check: notesAI & LLM Engineering

Install Azure Openai To Responses

skills CLI
$ npx skills add microsoft/ai-agents-for-beginners --skill azure-openai-to-responses -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/ai-agents-for-beginners azure-openai-to-responses --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/ai-agents-for-beginners.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/azure-openai-to-responses .claude/skills/azure-openai-to-responses && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
azure-openai-to-responses
GitHub stars
77k
Token cost
~6k tokens
SKILL.md length
2,164 words
Files
5 (incl. scripts, references)
Skills in repo
122
Repo updated
First seen
Licence
MIT

At a glance

Migrate Python apps from Azure OpenAI Chat Completions to the Responses API.

  • Works in 3 steps: Smoke-test your deployment (fastest) → Check available models in your region… → Full model support reference
  • : migrate to responses API
  • SKILL.md covers Triggers, ⚠️ Model Compatibility — CHECK…, Framework Migration and Frontend Migration Guidance, plus 7 more sections
  • Runs Python scripts from its folder; calls rg, python and git; reaches cdn.jsdelivr.net; needs AZURE_OPENAI_API_KEY

What it does

Azure Openai To Responses is an agent skill from microsoft/ai-agents-for-beginners, published by the product's own GitHub organization. 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…

Its SKILL.md is about 6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/cheat-sheet.md`, `references/test-migration.md` and `references/troubleshooting.md`).

It sits in AI & LLM Engineering, covering LLM API integration and Structured output and tool calling. It works with OpenAI, Azure OpenAI, Microsoft Azure and Python. The repository describes itself as: 18 Lessons to Get Started Building AI Agents. The licence is MIT.

When your agent uses it

  • : migrate to responses API
  • Switch from chat completions
  • Openai responses
  • Upgrade openai SDK

Example prompts

  • “/azure-openai-to-responses”

Requirements

  • Python 3
  • A credential in AZURE_OPENAI_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Smoke-test your deployment (fastest)
  2. Check available models in your region (recommended)
  3. Full model support reference

What it can do on your machine

Read from SKILL.md and the folder at commit ff2ba66. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • rg
    • python
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • cdn.jsdelivr.net

    Also links to:

    • learn.microsoft.com
    • aka.ms
    • npmjs.com
    • platform.openai.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AZURE_OPENAI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Azure Openai To Responses loads about 6k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 212 tokens; SKILL.md has 2,164 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~212
When it runs · the whole SKILL.md, loaded when a task matches
~6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:229
    API_VERSION` environment variables from `.env`, app settings, and Bicep/infra files.
  • NoteMentions a .env fileSKILL.md:230
    PENAI_CLIENT_ID` → `AZURE_CLIENT_ID` in `.env`, app settings, Bicep/infra, and test fixtures (standard Azure Identity SD

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from microsoft/ai-agents-for-beginners at commit ff2ba66, republished under its MIT licence (© microsoft). 2,164 words, ~5,966 tokens.

Download SKILL.mdSave it as .claude/skills/azure-openai-to-responses/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
azure-openai-to-responses
description
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: building new apps from scratch (start with responses directly), Node/TypeScript/C#/Java/Go migrations (this skill is Python-only), Azure infrastructure setup (use azure-prepare), deploying models (use microsoft-foundry).
license
MIT

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)
python
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.

Run the built-in model compatibility tool to see what's available with Responses API support in your specific region:

bash
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.
  • Tool use: O-series models support tools via the Responses API the same as GPT models, but tool call orchestration quality varies by model.

Action — proactive model advisory: During the scan phase, check which model the app targets (deployment names, env vars, config). If the model predates gpt-4.1 (not gpt-4.1+), proactively tell the user:

  • The migration will work for basic text, chat, streaming, and tools on their current model.
  • Newer models (gpt-5.1, gpt-5.2) offer better tool orchestration, structured output enforcement, reasoning, and cross-region availability.
  • They should consider upgrading their deployment when ready — it's not blocking the migration.

Do not block or refuse to migrate based on model version. The advisory is informational.

GitHub Models does NOT support the Responses API

GitHub Models (models.github.ai, models.inference.ai.azure.com) does not support the Responses API.

If the codebase has a GitHub Models code path (look for base_url pointing to models.github.ai or models.inference.ai.azure.com), remove it entirely during migration. The Responses API requires Azure OpenAI, OpenAI, or a compatible local endpoint (e.g., Ollama with Responses support).

Action during scan:

  • Flag any GitHub Models code paths for removal.

Framework Migration

Many apps use higher-level frameworks on top of OpenAI. When migrating these, the framework's own API changes — not just the underlying OpenAI calls.

Microsoft Agent Framework (MAF)

Check your MAF version first — the migration depends on whether you are on MAF 1.0.0+ or a pre-1.0.0 beta/rc.

MAF 1.0.0+ (agent-framework-openai >= 1.0.0)

OpenAIChatClient already uses the Responses API — no migration needed. If the codebase uses the legacy OpenAIChatCompletionClient (which uses chat.completions.create), replace it with OpenAIChatClient.

BeforeAfter
from agent_framework.openai import OpenAIChatCompletionClientfrom agent_framework.openai import OpenAIChatClient
OpenAIChatCompletionClient(...)OpenAIChatClient(...)

To check your version: python -c "import agent_framework_openai; print(agent_framework_openai.__version__)"

MAF pre-1.0.0 (beta/rc releases)

In pre-1.0.0 MAF, OpenAIChatClient used Chat Completions. Upgrade to agent-framework-openai>=1.0.0 where OpenAIChatClient uses the Responses API by default.

No other changes needed — the Agent and tool APIs remain the same.

LangChain (langchain-openai)

Add use_responses_api=True to ChatOpenAI(). Also update response access from .content to .text.

BeforeAfter
ChatOpenAI(model=..., base_url=..., api_key=...)ChatOpenAI(model=..., base_url=..., api_key=..., use_responses_api=True)
result['messages'][-1].contentresult['messages'][-1].text

For complete before/after code examples, see cheat-sheet.md.


Frontend Migration Guidance

The Responses API is a server-side concern. Migrate your Python backend; the frontend's HTTP contract should stay unchanged unless your backend is a thin pass-through — in that case, consider adopting the Responses request shape to eliminate a translation layer. If the frontend calls OpenAI directly with a client-side key, move those calls to a backend first.

@microsoft/ai-chat-protocol deprecation

The @microsoft/ai-chat-protocol npm package is deprecated and should be replaced with ndjson-readablestream. If you encounter it in a frontend:

  1. Replace the CDN script tag:
    html
    <!-- Before -->
    <script src="https://cdn.jsdelivr.net/npm/@microsoft/ai-chat-protocol@.../dist/iife/index.js"></script>
    <!-- After -->
    <script src="https://cdn.jsdelivr.net/npm/ndjson-readablestream@1.0.7/dist/ndjson-readablestream.umd.js"></script>
  2. Remove the AIChatProtocolClient instantiation (new ChatProtocol.AIChatProtocolClient("/chat")).
  3. Replace client.getStreamedCompletion(messages) with a direct fetch() call to the backend streaming endpoint.
  4. Replace for await (const response of result) with for await (const chunk of readNDJSONStream(response.body)).
  5. Update property access from response.delta.content / response.error to chunk.delta.content / chunk.error.

Goals

  • Enumerate all Python call sites using Chat Completions or legacy Completions against Azure OpenAI.
  • Propose a migration plan and sequencing for the Python codebase.
  • Apply safe, minimal edits to switch to Responses API.
  • Update callers to consume the Responses output schema; no backcompat wrappers.
  • Run tests/lints; fix trivial breakages introduced by the migration.
  • Prepare small, reviewable change sets and provide a final summary with diffs (do not commit).

Guardrails

  • Only modify files inside the git workspace. Never write outside.
  • Do not preserve backward-compatibility shims; migrate code to the new API shape.
  • Do not leave tombstone/transition comments or backup files.
  • Preserve streaming semantics if previously used; otherwise use non-streaming.
  • Ask for approval before running commands or network calls if in approval mode.
  • Do not run git add/git commit/git push; produce working-tree edits only.

Step 0: Azure OpenAI Client Migration (Prerequisite)

If the codebase uses AzureOpenAI or AsyncAzureOpenAI constructors, migrate to the standard OpenAI / AsyncOpenAI constructors first. The Azure-specific constructors are deprecated in openai>=1.108.1.

Why the v1 API path?

The new /openai/v1 endpoint uses the standard OpenAI() client instead of AzureOpenAI(), requires no api_version parameter, and works identically across OpenAI and Azure OpenAI. The same client code is future-proof — no version management needed.

Key changes
BeforeAfter
AzureOpenAIOpenAI
AsyncAzureOpenAIAsyncOpenAI
azure_endpointbase_url
azure_ad_token_providerapi_key
api_version=...Remove entirely
Cleanup checklist
  • Remove api_version argument from client construction.
  • Remove AZURE_OPENAI_VERSION / AZURE_OPENAI_API_VERSION environment variables from .env, app settings, and Bicep/infra files.
  • Rename AZURE_OPENAI_CLIENT_ID → AZURE_CLIENT_ID in .env, app settings, Bicep/infra, and test fixtures (standard Azure Identity SDK convention).
  • Ensure openai>=1.108.1 in requirements.txt or pyproject.toml.
Environment variable migration
Old env varActionNotes
AZURE_OPENAI_VERSIONRemoveNo api_version needed with v1 endpoint
AZURE_OPENAI_API_VERSIONRemoveSame as above
AZURE_OPENAI_CLIENT_IDRename → AZURE_CLIENT_IDStandard Azure Identity SDK convention for ManagedIdentityCredential(client_id=...)
AZURE_OPENAI_ENDPOINTKeepStill needed for base_url construction
AZURE_OPENAI_CHAT_DEPLOYMENTKeepUsed as model param in responses.create
AZURE_OPENAI_API_KEYKeepUsed as api_key for key-based auth

For client setup code examples (sync, async, EntraID, API key, multi-tenant), see cheat-sheet.md.


Step 1: Detect Legacy Call Sites

Run the detect_legacy.py script to find all call sites that need migration:

bash
python skills/azure-openai-to-responses/scripts/detect_legacy.py .

Or run these searches manually — every match is a migration target:

bash
# Legacy API calls (must rewrite)
rg "chat\.completions\.create"
rg "ChatCompletion\.create"
rg "Completion\.create"

# Deprecated Azure client constructors (must replace)
rg "AzureOpenAI\("
rg "AsyncAzureOpenAI\("

# Response shape access patterns (must update)
rg "choices\[0\]\.message\.content"
rg "choices\[0\]\.delta\.content"
rg "choices\[0\]\.message\.function_call"
rg "choices\[0\]\.message\.tool_calls"

# Tool definitions in old nested format (must flatten)
rg '"function":\s*{\s*"name"'
rg "pydantic_function_tool"

# Tool results in old format (must convert to function_call_output)
rg '"role":\s*"tool"'
rg '"tool_call_id"'

# Deprecated parameters (must remove or rename)
rg "response_format"
rg "max_tokens\b"        # rename to max_output_tokens
rg "['\"]seed['\"]"      # remove entirely

# Deprecated env vars (clean up)
rg "AZURE_OPENAI_API_VERSION|AZURE_OPENAI_VERSION"
rg "AZURE_OPENAI_CLIENT_ID"  # should be AZURE_CLIENT_ID

# GitHub Models endpoints (must remove — Responses API not supported)
rg "models\.github\.ai|models\.inference\.ai\.azure"

# Framework-level legacy patterns (must update)
rg "OpenAIChatCompletionClient"  # MAF 1.0.0+: replace with OpenAIChatClient
rg "ChatOpenAI\(" | grep -v "use_responses_api"  # LangChain: needs use_responses_api=True

# Test infrastructure (must update)
rg "ChatCompletionChunk|AsyncCompletions\.create" tests/
rg "_azure_ad_token_provider" tests/
rg "prompt_filter_results|content_filter_results" tests/
rg "choices\[0\]" tests/

# Content filter error body access (must update — structure changed)
rg 'innererror.*content_filter_result|error\.body\["innererror"\]'
rg "content_filter_result\[" # old singular form — now content_filter_results (plural) inside content_filters array

# Raw HTTP calls to Chat Completions endpoint (must update URL)
rg "/openai/deployments/.*/chat/completions"
rg "api-version="
Show full SKILL.md (858 more words)Show less
Heuristics (detect and rewrite)
  • Chat Completions client: client.chat.completions.create → client.responses.create(...).
  • Azure client constructors: AzureOpenAI(...) → OpenAI(base_url=..., api_key=...).
  • Tools: convert function-calling tool definitions from nested format ({"type": "function", "function": {"name": ...}}) to flat Responses format ({"type": "function", "name": ...}); use tool_choice; return tool results as {"type": "function_call_output", "call_id": ..., "output": ...} items (not {"role": "tool", ...}).
  • Tool round-trips: when the model returns function calls, append response.output items to the conversation (not a manual {"role": "assistant", "tool_calls": [...]} dict), then append function_call_output items for each result.
  • Few-shot tool examples: if the conversation includes hardcoded tool call examples, convert them to {"type": "function_call", "id": "fc_...", "call_id": "fc_...", ...} + {"type": "function_call_output", ...} items. IDs must start with fc_.
  • pydantic_function_tool(): this helper still generates the old nested format and is not compatible with responses.create(). Replace with manual tool definitions or a flattening wrapper.
  • Multi-turn: maintain conversation history in the app; pass prior turns via input items.
  • Formatting: replace Chat's top-level response_format with text.format in Responses. Canonical shape: text={"format": {"type": "json_schema", "name": "Output", "strict": True, "schema": {...}}}.
  • Content items: replace Chat content[].type: "text" with Responses content[].type: "input_text" for user/system turns.
  • Image content items: replace Chat content[].type: "image_url" with Responses content[].type: "input_image". The image_url field changes from a nested object {"url": "..."} to a flat string. See the cheat sheet for before/after examples.
  • Reasoning effort: only migrate reasoning if it already exists in the original code.
  • Content filter error handling: the error body structure changed. Chat Completions used error.body["innererror"]["content_filter_result"] (singular); Responses API uses error.body["content_filters"][0]["content_filter_results"] (plural, inside an array). Code that accesses innererror will raise KeyError. Rewrite to use the new path.
  • Raw HTTP calls: if the app calls the Azure OpenAI REST API directly (via requests, httpx, etc.) using /openai/deployments/{name}/chat/completions?api-version=..., rewrite to /openai/v1/responses. The request body changes: messages → input, add max_output_tokens and store: false, remove api-version query param. The response body changes: choices[0].message.content → output[0].content[0].text (note: output_text is an SDK convenience property not present in raw REST JSON).

Step 2: Apply Migration

Migration notes (Chat Completions → Responses)
  • Why migrate: Responses is the unified API for text, tools, and streaming; Chat Completions is legacy. With GPT-5, Responses is required for best performance.
  • HTTP: Azure endpoint switches from /openai/deployments/{name}/chat/completions to /openai/v1/responses.
  • Fields: messages → input, max_tokens → max_output_tokens. temperature remains.
  • Formatting: response_format → text.format with a proper object.
  • Content items: Replace Chat content[].type: "text" with Responses content[].type: "input_text" for system/user turns.
  • Image content items: Replace Chat content[].type: "image_url" with Responses content[].type: "input_image". Flatten the image_url field from {"image_url": {"url": "..."}} to {"image_url": "..."} (a plain string — either an HTTPS URL or a data:image/...;base64,... data URI).
Parameter mapping reference
Chat CompletionsResponses API
promptinput
messagesinput (array of items)
max_tokensmax_output_tokens
response_formattext.format (object)
temperaturetemperature (unchanged)
stopstop (unchanged)
frequency_penaltyfrequency_penalty (unchanged)
presence_penaltypresence_penalty (unchanged)
tools / function-callingtools (unchanged)
seedRemove (not supported)
storestore (set to false)
content[].type: "text"content[].type: "input_text"
content[].type: "image_url"content[].type: "input_image"
"image_url": {"url": "..."}"image_url": "..." (flat string)

For complete before/after code examples, see cheat-sheet.md.

For test infrastructure migration (mocks, snapshots, assertions), see test-migration.md.

For troubleshooting errors and gotchas, see troubleshooting.md.


Data Retention & State

  • Set store: false on all Responses requests.
  • Do not rely on previous message IDs or server-stored context; keep state client-managed and minimize metadata.

Acceptance Criteria

Code-level gates (all must pass)
  • Zero matches for rg "chat\.completions\.create|ChatCompletion\.create|Completion\.create" in migrated files.
  • Zero matches for rg "AzureOpenAI\(|AsyncAzureOpenAI\(" — all constructors use OpenAI/AsyncOpenAI with the v1 endpoint.
  • Zero matches for rg "models\.github\.ai|models\.inference\.ai\.azure" — GitHub Models code paths removed.
  • Zero matches for rg "OpenAIChatCompletionClient" — MAF 1.0.0+ code uses OpenAIChatClient (which uses Responses API). In pre-1.0.0, upgrade to agent-framework-openai>=1.0.0.
  • All ChatOpenAI(...) calls include use_responses_api=True.
  • Zero matches for rg "choices\[0\]" — all response access uses resp.output_text or the Responses output schema.
  • No response_format at top level; all structured output uses text={"format": {...}}.
  • openai>=1.108.1 and azure-identity in requirements.txt or pyproject.toml; dependencies reinstalled.
  • store=False set on every responses.create call.
  • No api_version in client construction; AZURE_OPENAI_API_VERSION removed from env files and infra.
Test infrastructure gates (all must pass)
  • Zero matches for rg "ChatCompletionChunk|AsyncCompletions\.create|chat\.completions" tests/.
  • Zero matches for rg "_azure_ad_token_provider" tests/ — assertions updated to check isinstance(client, AsyncOpenAI) or base_url.
  • Zero matches for rg "prompt_filter_results|content_filter_results" tests/ — Azure-specific filter mocks removed.
  • Mock fixtures use kwargs.get("input") not kwargs.get("messages").
  • Snapshot / golden files updated to Responses streaming shape (no choices[0], function_call, logprobs, etc.).
  • pytest passes with zero failures after all test updates.
Behavioral gates (verify manually or via test harness)
  • Basic completion: non-streaming responses.create returns non-empty output_text.
  • Stream parity: if the original code used streaming, the migrated code streams and yields response.output_text.delta events with non-empty deltas.
  • Structured output: if using text.format with json_schema, json.loads(resp.output_text) succeeds and matches the schema.
  • Tool-call loop: if tools are used, the model issues tool calls, the app executes them, and the follow-up request returns a final output_text (no infinite loop).
  • Async parity: if AsyncAzureOpenAI was used, AsyncOpenAI equivalent works with await.
  • Error rate: no new 400/401/404 errors compared to the pre-migration baseline.
Deliverables
  • Summary includes edited files, before/after counts of legacy call sites, and next steps.
  • Changes are working-tree edits only (no commits).

SDK Version Requirements

PackageMinimum Version
openai>=1.108.1
azure-identityLatest (for EntraID auth)

References

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in .agents/skills/azure-openai-to-responses of microsoft/ai-agents-for-beginners.

  • SKILL.md
  • references/cheat-sheet.md
  • references/test-migration.md
  • references/troubleshooting.md
  • scripts/detect_legacy.py

Open the folder on GitHubat commit ff2ba66

Compare with similar skills

Azure Openai To Responses next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Azure Openai To Responses compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure Openai To Responses this skillmicrosoft/ai-agents-for-beginners77k—~6kAutomated safety check: NotesMIT
Gemini API Devgoogle-gemini/gemini-skills4.3k—~5.1kAutomated safety check: PassApache-2.0
Gemini API DevAyuilos/Miffan225—~1.4kAutomated safety check: PassAGPL-3.0
Tool Designagentailor/fullstack-langgraph-nextjs-agent132—~3.2kAutomated safety check: PassMIT
Azure AI Projects Python SDKmicrosoft/skills3.1k—~2.8kAutomated safety check: PassMIT
Azure AI Openai Dotnetmicrosoft/skills3.1k5 repos~3.4kAutomated safety check: PassMIT

Similar skills

  • Gemini API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, speech generation (TTS), voice…

    4.3k GitHub stars~5.1k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Gemini API Dev

    Ayuilos/Miffan

    A skill your agent uses when building applications with Gemini API hosted models, including Gemini and Gemma 4, working with multimodal content (text, images, audio, video), implementing function…

    225 GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Tool Design

    agentailor/fullstack-langgraph-nextjs-agent

    Design and verify tools that AI agents can actually use — for any framework or language (MCP servers, LangChain/LangGraph, function-calling, raw JSON schema; TypeScript, Python, or otherwise).

    132 GitHub stars~3.2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Official

    Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.

    3.1k GitHub stars~2.8k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Azure AI Openai Dotnet

    microsoft/skills

    Official

    Azure OpenAI SDK for .NET. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 5 repos~3.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Openai API

    coco-research/coco

    A skill your agent uses when implementing GPT chat, streaming, function calling, embeddings for RAG, images, audio or batch jobs, or troubleshooting 429 rate limits and API or TypeScript errors.

    513 GitHub stars~7.6k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check: notes

More from microsoft/ai-agents-for-beginners

All 122 skills in this repo
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    A skill your agent uses when the user asks to create, scaffold, or edit Jupyter notebooks (.ipynb) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script…

    77k GitHub starsUsed in 8 repos~1k tokens
    Auto-check passed
  • Azure Openai To Responses

    microsoft/ai-agents-for-beginners

    Official

    Shift Python apps dem from Azure OpenAI Chat Completions go Responses API.

    77k GitHub stars~6k tokensUpdated yesterday
    Auto-check: notes
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    Kasuta, kui kasutaja palub luua, üles ehitada või redigeerida Jupyteri märkmikke (.ipynb) katsetuste, uurimiste või juhendite jaoks; eelista kaasasolevaid malle ja käivita abiskript newnotebook.py…

    77k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    Käytetään, kun käyttäjä pyytää luomaan, alustamaan tai muokkaamaan Jupyter-muistikirjoja (.ipynb) kokeita, tutkimuksia tai opetusohjelmia varten; käytä mieluummin mukana olevia mallipohjia ja…

    77k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    À utiliser lorsque l'utilisateur demande de créer, structurer ou modifier des notebooks Jupyter (.ipynb) pour des expériences, explorations ou tutoriels ; privilégiez les modèles fournis et exécutez…

    77k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    उपयोग तब करें जब उपयोगकर्ता प्रयोगों, खोजों, या ट्यूटोरियल्स के लिए Jupyter नोटबुक (.ipynb) बनाने, स्कैफोल्ड करने, या संपादित करने के लिए कहे; पैकेज किए गए टेम्पलेट्स को प्राथमिकता दें और एक साफ…

    77k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed

Questions about Azure Openai To Responses

What does Azure Openai To Responses do?

Migrate Python apps from Azure OpenAI Chat Completions to the Responses API. Azure Openai To Responses is an agent skill from microsoft/ai-agents-for-beginners, published by the product's own GitHub organization. Migrate Python apps from Azure OpenAI Chat Completions to the Responses API.

When should I use Azure Openai To Responses?

Azure Openai To Responses fits situations like: : migrate to responses API; switch from chat completions; openai responses; upgrade openai SDK.

How do I install Azure Openai To Responses in Claude Code?

Run `npx skills add microsoft/ai-agents-for-beginners --skill azure-openai-to-responses -a claude-code`. Or copy the skill folder (.agents/skills/azure-openai-to-responses in microsoft/ai-agents-for-beginners) into .claude/skills/azure-openai-to-responses in your project. Claude Code loads it when a task matches its description.

How do I install Azure Openai To Responses in Codex?

Run `npx skills add microsoft/ai-agents-for-beginners --skill azure-openai-to-responses -a codex`. Or copy the skill folder (.agents/skills/azure-openai-to-responses in microsoft/ai-agents-for-beginners) into .agents/skills/azure-openai-to-responses in your project. Codex loads it when a task matches its description.

Can I use Azure Openai To Responses in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/ai-agents-for-beginners --skill azure-openai-to-responses -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/azure-openai-to-responses, .gemini/skills/azure-openai-to-responses, .github/skills/azure-openai-to-responses and .opencode/skills/azure-openai-to-responses in your project.

What does Azure Openai To Responses need to run?

Going by SKILL.md and its folder, Azure Openai To Responses needs Python for the scripts in its folder, the command-line tools its instructions call (rg, python and git) and credentials named AZURE_OPENAI_API_KEY. Our summary lists: Python 3; A credential in AZURE_OPENAI_API_KEY.

Does Azure Openai To Responses access the network?

SKILL.md names 5 domains. In commands or code: cdn.jsdelivr.net; the agent is likely to contact it when it follows the instructions. As links in the text: learn.microsoft.com, aka.ms, npmjs.com and platform.openai.com. This is read from the text; nothing was executed.

Is Azure Openai To Responses safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Azure Openai To Responses use?

Azure Openai To Responses is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Azure Openai To Responses use?

About 6k tokens (SKILL.md is roughly 24k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Azure Openai To Responses?

Skills that share tags, products or a category with Azure Openai To Responses: Gemini API Dev (google-gemini/gemini-skills, 4.3k stars), Gemini API Dev (Ayuilos/Miffan, 225 stars), Tool Design (agentailor/fullstack-langgraph-nextjs-agent, 132 stars) and Azure AI Projects Python SDK (microsoft/skills, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure Openai To Responses?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/ai-agents-for-beginners, which has 76,795 GitHub stars. The repository holds 122 skills in this directory. The repository was last updated on October 9, 2026.

Source: microsoft/ai-agents-for-beginners on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.