fix(copilot): preserve base URL and gpt-5-mini routing

This commit is contained in:
helix4u
2026-04-14 19:05:03 -06:00
committed by Teknium
parent 3b4ecf8ee7
commit 96cc556055
4 changed files with 56 additions and 10 deletions

View File

@@ -259,6 +259,23 @@ def test_copilot_acp_stays_on_chat_completions_for_gpt_5_models(monkeypatch):
assert agent.api_mode == "chat_completions"
def test_copilot_gpt_5_mini_stays_on_chat_completions(monkeypatch):
_patch_agent_bootstrap(monkeypatch)
agent = run_agent.AIAgent(
model="gpt-5-mini",
base_url="https://api.githubcopilot.com",
provider="copilot",
api_key="gh-token",
api_mode="chat_completions",
quiet_mode=True,
max_iterations=1,
skip_context_files=True,
skip_memory=True,
)
assert agent.provider == "copilot"
assert agent.api_mode == "chat_completions"
def test_build_api_kwargs_codex(monkeypatch):
agent = _build_agent(monkeypatch)
kwargs = agent._build_api_kwargs(