fix(copilot): route GPT-6 through Responses

Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com>
(cherry picked from commit 26dd16c554e8f1c6b92ddc31b712daf2287468c2)
This commit is contained in:
Lanre Shittu authored and chengyongru committed 2026-10-10 01:33:02 +08:00
1 parent 6f53f9f6c9
commit c0772cbd83
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -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
@@ -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