Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

The default endpoint https://api.githubcopilot.com doesn't work with PAT authentication. Changed default to https://models.github.ai/inference and renamed the environment variable to the more generic AI_API_ENDPOINT.

Changes

  • src/seclab_taskflow_agent/capi.py: Renamed COPILOT_API_ENDPOINTAI_API_ENDPOINT, changed default from api.githubcopilot.com to models.github.ai/inference
  • src/seclab_taskflow_agent/agent.py: Updated imports and references
  • tests/test_yaml_parser.py: Added test coverage for endpoint configuration and environment variable override

Usage

# Default (models.github.ai/inference)
from seclab_taskflow_agent.capi import AI_API_ENDPOINT

# Override via environment
AI_API_ENDPOINT=https://api.githubcopilot.com python -m seclab_taskflow_agent

Both endpoints remain fully supported via the environment variable.

Original prompt

This section details on the original issue you should resolve

<issue_title>Change the default API endpoint</issue_title>
<issue_description>Change it to https://models.github.ai/inference. (It is currently set to https://api.githubcopilot.com, which doesn't work with a PAT.)
Also rename COPILOT_API_ENDPOINT to something more generic like AI_API_ENDPOINT.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 24, 2025 17:34
…COPILOT_API_ENDPOINT to AI_API_ENDPOINT

Co-authored-by: kevinbackhouse <[email protected]>
Copilot AI changed the title [WIP] Change default API endpoint to new URL Change default API endpoint to models.github.ai/inference and rename COPILOT_API_ENDPOINT to AI_API_ENDPOINT Nov 24, 2025
Copilot AI requested a review from kevinbackhouse November 24, 2025 17:39
Copilot finished work on behalf of kevinbackhouse November 24, 2025 17:39
@kevinbackhouse kevinbackhouse marked this pull request as ready for review November 25, 2025 16:37
Copilot AI review requested due to automatic review settings November 25, 2025 16:37
Copilot finished reviewing on behalf of kevinbackhouse November 25, 2025 16:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the default API endpoint from https://api.githubcopilot.com to https://models.github.ai/inference to support PAT authentication, and renames the environment variable from COPILOT_API_ENDPOINT to the more generic AI_API_ENDPOINT.

  • Renamed COPILOT_API_ENDPOINT constant to AI_API_ENDPOINT across the codebase
  • Updated default endpoint URL from api.githubcopilot.com to models.github.ai/inference
  • Added test coverage for endpoint configuration and environment variable override

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/seclab_taskflow_agent/capi.py Renamed environment variable constant and updated default endpoint URL; improved comment clarity
src/seclab_taskflow_agent/agent.py Updated import statement and all references to use the renamed AI_API_ENDPOINT constant
tests/test_yaml_parser.py Added new test class TestAPIEndpoint with tests for default endpoint and environment variable override

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

@kevinbackhouse kevinbackhouse marked this pull request as draft December 1, 2025 11:01
@kevinbackhouse kevinbackhouse marked this pull request as ready for review December 1, 2025 14:01
Copilot AI review requested due to automatic review settings December 1, 2025 14:01
Copilot finished reviewing on behalf of kevinbackhouse December 1, 2025 14:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


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

@kevinbackhouse
Copy link
Collaborator

smoke test

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Deployment Triggered 🚀

kevinbackhouse, started a branch deployment to smoketest (branch: copilot/change-default-api-endpoint)

You can watch the progress here 🔗

Details
{
  "type": "branch",
  "environment": {
    "name": "smoketest",
    "url": null
  },
  "deployment": {
    "timestamp": "2025-12-02T10:24:08.285Z",
    "logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/19855269388"
  },
  "git": {
    "branch": "copilot/change-default-api-endpoint",
    "commit": "218e478783e99cf4e87a32ddbd53311c6ee7d0e0",
    "verified": true,
    "committer": "web-flow",
    "html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/commit/218e478783e99cf4e87a32ddbd53311c6ee7d0e0"
  },
  "context": {
    "actor": "kevinbackhouse",
    "noop": false,
    "fork": false,
    "comment": {
      "created_at": "2025-12-02T10:23:52Z",
      "updated_at": "2025-12-02T10:23:52Z",
      "body": "smoke test",
      "html_url": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pull/94#issuecomment-3601305052"
    }
  },
  "parameters": {
    "raw": null,
    "parsed": null
  }
}

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Deployment Results ❌

kevinbackhouse had a failure when deploying branch copilot/change-default-api-endpoint to smoketest

Details
{
  "status": "failure",
  "environment": {
    "name": "smoketest",
    "url": null
  },
  "deployment": {
    "id": 3404550599,
    "timestamp": "2025-12-02T10:25:13.297Z",
    "logs": "https://github.com/GitHubSecurityLab/seclab-taskflow-agent/actions/runs/19855269388",
    "duration": 65
  },
  "git": {
    "branch": "copilot/change-default-api-endpoint",
    "commit": "218e478783e99cf4e87a32ddbd53311c6ee7d0e0",
    "verified": true
  },
  "context": {
    "actor": "kevinbackhouse",
    "noop": false,
    "fork": false
  },
  "reviews": {
    "count": 2,
    "decision": "APPROVED"
  },
  "parameters": {
    "raw": null,
    "parsed": null
  }
}

@kevinbackhouse kevinbackhouse merged commit 8c6bc9d into main Dec 2, 2025
9 checks passed
@kevinbackhouse kevinbackhouse deleted the copilot/change-default-api-endpoint branch December 2, 2025 10:47
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.

Change the default API endpoint

3 participants