Skip to content

Make copilot the default endpoint - #247

Merged
kevinbackhouse merged 4 commits into
GitHubSecurityLab:mainfrom
kevinbackhouse:default-to-copilot
May 29, 2026
Merged

kevinbackhouse merged 4 commits into
GitHubSecurityLab:mainfrom
kevinbackhouse:default-to-copilot

Conversation

@kevinbackhouse

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 22, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the AI endpoint configuration so the agent defaults to the GitHub Copilot API endpoint when AI_API_ENDPOINT is not set.

Changes:

  • Add _DEFAULT_PROVIDER constant set to api.githubcopilot.com.
  • Change get_AI_endpoint() default from a hard-coded GitHub Models URL to the Copilot provider’s registered base_url.
Show a summary per file
File Description
src/seclab_taskflow_agent/capi.py Switches the default AI endpoint resolution to use the Copilot provider entry in the provider registry.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment on lines 183 to +185
def get_AI_endpoint() -> str:
"""Return the configured AI API endpoint URL."""
return os.getenv("AI_API_ENDPOINT", default="https://models.github.ai/inference")
return os.getenv("AI_API_ENDPOINT", default=_PROVIDERS[_DEFAULT_PROVIDER].base_url)
Copilot AI review requested due to automatic review settings May 22, 2026 12:28
@kevinbackhouse
kevinbackhouse marked this pull request as ready for review May 22, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

assert endpoint is not None
assert isinstance(endpoint, str)
assert urlparse(endpoint).netloc == "models.github.ai"
assert urlparse(endpoint).netloc == "api.githubcopilot.com"
@kevinbackhouse
kevinbackhouse merged commit 24ae593 into GitHubSecurityLab:main May 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants