diff --git a/run_agent.py b/run_agent.py index 96d4d8517fe6..a787a139ea0c 100644 --- a/run_agent.py +++ b/run_agent.py @@ -1265,7 +1265,7 @@ def __init__( # does NOT support the Responses API — skip the upgrade for Azure # (openai.azure.com), even though it looks OpenAI-compatible. if ( - api_mode is None + (api_mode is None or api_mode == "chat_completions") and self.api_mode == "chat_completions" and self.provider != "copilot-acp" and not str(self.base_url or "").lower().startswith("acp://copilot")