Skip to content

Feat: remove github-models support and make copilot the only provider#236

Open
jalafel wants to merge 1 commit into
actions:mainfrom
jalafel:jalafel/delete-github-models
Open

Feat: remove github-models support and make copilot the only provider#236
jalafel wants to merge 1 commit into
actions:mainfrom
jalafel:jalafel/delete-github-models

Conversation

@jalafel

@jalafel jalafel commented Jun 10, 2026

Copy link
Copy Markdown

This PR makes copilot the only provider and removes other code that github models used.

Note: this is up for review but shouldn't be merged until docs are updated!

What changed

  • Runtime simplified to a single Copilot flow.
  • Provider parsing now accepts only copilot.
  • Action inputs trimmed to Copilot-relevant options.
  • Legacy GitHub Models and MCP modules removed.
  • Unused dependencies removed from package manifest and lockfile.
  • README updated to Copilot-only setup, usage, and inputs.
  • Test suite refactored to match the Copilot-only implementation.
  • Dist bundle regenerated from current source.

Validation

npm test
Result: 4 test files passed, 36 tests passed

Impact

  • Breaking change: workflows relying on GitHub Models specific behavior or inputs are no longer supported.
  • Existing workflows should use Copilot CLI setup and Copilot-compatible model names.

Copilot AI review requested due to automatic review settings June 10, 2026 19:31
@jalafel jalafel requested a review from a team as a code owner June 10, 2026 19:31

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

Note

Copilot was unable to run its full agentic suite in this review.

This PR removes the GitHub Models + OpenAI/MCP inference path and makes the action Copilot CLI–only, updating inputs, docs, and tests accordingly.

Changes:

  • Removed MCP integration and OpenAI-based inference codepaths and dependencies.
  • Simplified runtime to always build messages and invoke the Copilot CLI.
  • Updated action.yml, README, and tests to reflect Copilot-only usage.
Show a summary per file
File Description
src/mcp.ts Removed MCP client + tool execution implementation.
src/inference.ts Removed OpenAI-based inference (simple + MCP loop).
src/main.ts Simplified provider routing to Copilot-only and switched request building to buildMessages.
src/helpers.ts Removed inference-request/custom-header helpers; kept prompt/message helpers.
src/copilot.ts Changed model forwarding behavior to pass --model for any non-empty model string.
package.json Dropped openai, @modelcontextprotocol/sdk, and pkce-challenge dependencies.
action.yml Removed GitHub Models/MCP/OpenAI-related inputs; updated defaults/descriptions for Copilot-only behavior.
README.md Rewrote usage/docs for Copilot-only installation/auth flow; removed GitHub Models/MCP sections.
tests/mcp.test.ts Removed tests for deleted MCP module.
tests/inference.test.ts Removed tests for deleted OpenAI inference module.
tests/main-prompt-integration.test.ts Removed integration tests for GitHub Models inference path.
tests/main.test.ts Updated tests to validate Copilot-only behavior and options forwarding.
tests/helpers-inference.test.ts Removed tests for deleted inference-request helpers.
tests/helpers.test.ts Updated tests to focus on loadContentFromFileOrInput + buildMessages.
tests/copilot.test.ts Updated tests to reflect new default model forwarding behavior.

Copilot's findings

Tip

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

  • Files reviewed: 15/18 changed files
  • Comments generated: 2

Comment thread action.yml
Comment on lines 41 to 44
token:
description: The token to use
required: false
default: ${{ github.token }}
Comment thread __tests__/main.test.ts
Comment on lines +4 to +5
const mockExistsSync = vi.fn().mockReturnValue(true)
const mockReadFileSync = vi.fn()
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