Skip to content

feat: GitHub Copilot Provider#143

Closed
GlenEder wants to merge 3 commits intoThePrimeagen:masterfrom
GlenEder:feat-copilotProvider
Closed

feat: GitHub Copilot Provider#143
GlenEder wants to merge 3 commits intoThePrimeagen:masterfrom
GlenEder:feat-copilotProvider

Conversation

@GlenEder
Copy link
Copy Markdown

GitHub Copilot Provider

  • Adds GitHub's copilot cli tool as a new provider to the list.
  • Updated Readme to show default model for copilot
  • Added test cases in matching style to other providers

@cursor
Copy link
Copy Markdown

cursor bot commented Feb 27, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 8.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment on lines +334 to +343
function GitHubCopilotProvider._build_command(_, query, context)
return {
"copilot",
"--allow-all-tools",
"--model",
context.model,
"--prompt",
query,
}
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The GitHubCopilotProvider incorrectly expects the copilot CLI to write its response to a temp file, but the CLI outputs to stdout, resulting in empty responses.
Severity: CRITICAL

Suggested Fix

Modify the provider's request handling. Either find a copilot CLI flag that directs output to the specified temporary file, or change the callback logic to write the captured stdout data into the temporary file before _retrieve_response is called.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: lua/99/providers.lua#L334-L343

Potential issue: The `GitHubCopilotProvider` is configured to read the AI's response
from a temporary file. However, it invokes the `copilot` CLI with the `--prompt` flag,
which, according to its documentation, directs the output to `stdout`. The system
captures this `stdout` but never writes it to the temporary file that the
`_retrieve_response` function attempts to read. As a result, the temporary file remains
empty, causing the provider to return an empty response and rendering it completely
non-functional.

Did we get this right? 👍 / 👎 to inform future reviews.

@ThePrimeagen
Copy link
Copy Markdown
Owner

i already do not to provide any more providers. just create the thing yourself and pass it in as the provider override.

base provider is exposed

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.

2 participants