Skip to content

Commit c6ef3ae

Browse files
anticomputerCopilot
andcommitted
Revert default_model bump back to gpt-4.1
Coworker review flagged that gpt-5.5 is not a viable default: - gpt-5 family models require the responses API, but APIProvider has no api_type field to signal that — callers using the default would silently hit the wrong endpoint shape - GitHub Models never received gpt-5.5; gpt-4.1 is what's still supported there, so 'openai/gpt-5.5' would 404 - Most callers specify models explicitly via model_config anyway, so the default is only a fallback safety net — keep it on a model that exists on all three providers Reverts the registry defaults and dataclass default; keeps the gpt-5 prefix in _OpenAIProvider._CHAT_PREFIXES (direct OpenAI API does serve gpt-5 family, and the prefix check is independent of default selection). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f42c06b commit c6ef3ae

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/seclab_taskflow_agent/capi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class APIProvider:
4848
name: str
4949
base_url: str
5050
models_catalog: str = "/models"
51-
default_model: str = "gpt-5.5"
51+
default_model: str = "gpt-4.1"
5252
extra_headers: Mapping[str, str] = field(default_factory=dict)
5353
bearer_auth: bool = True # Use Authorization: Bearer (not x-api-key)
5454

@@ -124,20 +124,20 @@ def check_tool_calls(self, _model: str, model_info: dict) -> bool:
124124
"api.githubcopilot.com": _CopilotProvider(
125125
name="copilot",
126126
base_url="https://api.githubcopilot.com",
127-
default_model="gpt-5.5",
127+
default_model="gpt-4.1",
128128
extra_headers={"Copilot-Integration-Id": COPILOT_INTEGRATION_ID},
129129
),
130130
"models.github.ai": _GitHubModelsProvider(
131131
name="github-models",
132132
base_url="https://models.github.ai/inference",
133133
models_catalog="/catalog/models",
134-
default_model="openai/gpt-5.5",
134+
default_model="openai/gpt-4.1",
135135
),
136136
"api.openai.com": _OpenAIProvider(
137137
name="openai",
138138
base_url="https://api.openai.com/v1",
139139
models_catalog="/v1/models",
140-
default_model="gpt-5.5",
140+
default_model="gpt-4.1",
141141
),
142142
}
143143

tests/test_capi_extended.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def test_github_models_provider(self):
122122
p = get_provider("https://models.github.ai/inference")
123123
assert p.name == "github-models"
124124
assert p.models_catalog == "/catalog/models"
125-
assert p.default_model == "openai/gpt-5.5"
125+
assert p.default_model == "openai/gpt-4.1"
126126

127127
def test_openai_provider(self):
128128
p = get_provider("https://api.openai.com/v1")
@@ -140,7 +140,7 @@ def test_awf_proxy_bare_hostname(self, monkeypatch):
140140
p = get_provider("http://172.30.0.30:10002")
141141
assert p.name == "copilot"
142142
assert p.base_url == "http://172.30.0.30:10002/"
143-
assert p.default_model == "gpt-5.5"
143+
assert p.default_model == "gpt-4.1"
144144
assert "Copilot-Integration-Id" in p.extra_headers
145145

146146
def test_awf_proxy_full_url(self, monkeypatch):

0 commit comments

Comments
 (0)