From c0772cbd83368220b2369bad8aeb3adb81fe86ec Mon Sep 17 00:00:00 2001 From: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> Date: Sun, 27 Sep 2026 09:27:06 +0100 Subject: [PATCH] fix(copilot): route GPT-6 through Responses Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> (cherry picked from commit 26dd16c554e8f1c6b92ddc31b712daf2287468c2) --- nanobot/providers/openai_compat_provider.py | 2 +- tests/providers/test_github_copilot_routing.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nanobot/providers/openai_compat_provider.py b/nanobot/providers/openai_compat_provider.py index 706d4e84c..b826d0011 100644 --- a/nanobot/providers/openai_compat_provider.py +++ b/nanobot/providers/openai_compat_provider.py @@ -1137,7 +1137,7 @@ class OpenAICompatProvider(LLMProvider): wants_auto_route = capabilities.auto_route and ( (reasoning_effort is not None and reasoning_effort.lower() != "none") - or any(token in model_name for token in ("gpt-5", "o1", "o3", "o4")) + or any(token in model_name for token in ("gpt-5", "gpt-6", "o1", "o3", "o4")) ) if not explicitly_supported and not wants_auto_route: return False diff --git a/tests/providers/test_github_copilot_routing.py b/tests/providers/test_github_copilot_routing.py index 7c7e0d089..870ac3b42 100644 --- a/tests/providers/test_github_copilot_routing.py +++ b/tests/providers/test_github_copilot_routing.py @@ -31,6 +31,7 @@ def test_should_use_responses_api_allows_github_copilot_non_openai_base(): """github_copilot bypasses the direct-OpenAI base check and still opts in for GPT-5.""" provider = _make_copilot_provider() assert provider._should_use_responses_api("github_copilot/gpt-5.4-mini", None) is True + assert provider._should_use_responses_api("github_copilot/gpt-6-astra", None) is True assert provider._should_use_responses_api("github_copilot/o3", None) is True