fix(copilot): include GPT-6 in Responses model discovery

(cherry picked from commit 694f89c60b876399ba51796f9b1732afa9dce1c2)
This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-10 01:33:02 +08:00
1 parent c0772cbd83
commit 077cc94a3d
2 files changed
+8 -4

No files matched your search

+1 -1
View File
@@ -449,7 +449,7 @@ def _copilot_transport_supported(wire_id: str, endpoints: object) -> bool:
return True
model = wire_id.lower()
return "/responses" in supported and any(
token in model for token in ("gpt-5", "o1", "o3", "o4")
token in model for token in ("gpt-5", "gpt-6", "o1", "o3", "o4")
)
+7 -3
View File
@@ -259,9 +259,14 @@ def test_xai_inference_classifies_typed_reauth() -> None:
assert "synthetic-secret" not in str(response)
@pytest.mark.parametrize(
"responses_model",
["gpt-5.4-mini", "gpt-6-astra", "gpt-6-sol", "gpt-6-luna"],
)
def test_github_copilot_catalog_only_lists_compatible_chat_models(
monkeypatch: pytest.MonkeyPatch,
tmp_path: Path,
responses_model: str,
) -> None:
original_client = httpx.Client
captured: list[httpx.Request] = []
@@ -293,8 +298,7 @@ def test_github_copilot_catalog_only_lists_compatible_chat_models(
},
},
{
"id": "gpt-5.4-mini",
"name": "GPT-5.4 Mini",
"id": responses_model,
"model_picker_enabled": True,
"supported_endpoints": ["/responses"],
},
@@ -340,7 +344,7 @@ def test_github_copilot_catalog_only_lists_compatible_chat_models(
assert catalog.source == "remote"
assert [model.id for model in catalog.models] == [
"github-copilot/claude-sonnet",
"github-copilot/gpt-5.4-mini",
f"github-copilot/{responses_model}",
]
assert catalog.models[0].context_window == 200_000
assert catalog.models[0].reasoning_efforts == ("low", "high")