The latest SDK defaults to the responses API and you’re using Azure and not OpenAI directly. So here’s a few ideas:
# where you currently do:
set_default_openai_client(openai_client) # your AsyncAzureOpenAI
# add one of these:
# Option 1: set default model globally to your Azure deployment name
import os
os.environ["OPENAI_DEFAULT_MODEL"] = os.environ["AZURE_OPENAI_DEPLOYMENT"]
# Option 2: pin per agent
agent = Agent(
name="Triage Agent",
instructions=system_prompts.system_prompt_agent_triage,
handoffs=[...],
model=os.environ["AZURE_OPENAI_DEPLOYMENT"],
)
# Option 3: force Chat Completions API shape globally
from agents import set_default_openai_api
set_default_openai_api("chat_completions")