Skip to content

Commit 24ae593

Browse files
Merge pull request #247 from kevinbackhouse/default-to-copilot
Make copilot the default endpoint
2 parents e5f2e22 + 7d894ef commit 24ae593

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/seclab_taskflow_agent/capi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ def check_tool_calls(self, _model: str, model_info: dict) -> bool:
140140
),
141141
}
142142

143+
_DEFAULT_PROVIDER = "api.githubcopilot.com"
144+
143145
def get_provider(endpoint: str | None = None) -> APIProvider:
144146
"""Return the ``APIProvider`` for the given (or configured) endpoint URL.
145147
@@ -180,7 +182,7 @@ def get_provider(endpoint: str | None = None) -> APIProvider:
180182

181183
def get_AI_endpoint() -> str:
182184
"""Return the configured AI API endpoint URL."""
183-
return os.getenv("AI_API_ENDPOINT", default="https://models.github.ai/inference")
185+
return os.getenv("AI_API_ENDPOINT", default=_PROVIDERS[_DEFAULT_PROVIDER].base_url)
184186

185187

186188
def get_AI_token() -> str:

tests/test_api_endpoint_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_default_api_endpoint(self):
2323
endpoint = get_AI_endpoint()
2424
assert endpoint is not None
2525
assert isinstance(endpoint, str)
26-
assert urlparse(endpoint).netloc == "models.github.ai"
26+
assert urlparse(endpoint).netloc == "api.githubcopilot.com"
2727
finally:
2828
if original_env:
2929
os.environ["AI_API_ENDPOINT"] = original_env

0 commit comments

Comments
 (0)