From 8814d8db31249e5aebf81bef67a617505878089e Mon Sep 17 00:00:00 2001 From: CatMoxi Date: Mon, 11 May 2026 16:35:42 +0000 Subject: [PATCH] fix: allow Responses API auto-upgrade for custom providers Fixes #23893 --- run_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")