Summary
Integrate GitHub Copilot SDK as a native LLM provider (CopilotProvider) into the
ai-slop-gate provider pipeline. Currently a stub exists in planning only. This issue
tracks the full implementation.
Background
ai-slop-gate supports multiple LLM providers (Gemini, Groq, Ollama) via a
common LlmProvider base class. GitHub Copilot has announced an extensibility SDK
that allows programmatic access to Copilot's code-aware reasoning. This provider
would add Copilot as a zero-cost option for GitHub-native teams (no separate API key
required for users with an active Copilot subscription).
Goals
- Implement
CopilotProvider extending LlmProvider with kind = "llm", name = "copilot"
- Replace the current
StubCopilotClient with a real CopilotClient backed by the SDK
- Support both
analyze(diff) and collect(base_path) modes
- Implement
analyze_pr(repo, pr_id, token) for native GitHub PR integration
- Add prompt file at
providers/llm/prompts/copilot/deep.prompt
- Register
--provider copilot in CLI
- Wrap with
CachedProvider (same as Gemini/Groq)
Non-Goals
- No changes to PolicyEngine, reporters, or cache layer
- No Copilot-specific enforcement logic
- No changes to existing providers
Architecture
CopilotProvider (providers/llm/copilot.py)
extends LlmProvider
kind = "llm"
name = "copilot"
analyze(code, input_file) -> ProviderObservation
→ loads deep.prompt
→ calls CopilotClient.run(task)
→ parses and validates JSON response
→ retry once with force_strict_json=True on InvalidAgentResponse
→ returns ProviderObservation
analyze_pr(repo, pr_id, token) -> ProviderObservation
→ fetches PR diff via GitHub API
→ delegates to analyze(diff)
JSON contract (same as all LLM providers):
{
"issues": [
{
"category": "string",
"signal": "snake_case",
"message": "non-empty",
"severity": "low|medium|high|critical",
"confidence": 0.85,
"file": "path/to/file.py",
"line": 42
}
]
}
Implementation Steps
Acceptance Criteria
python -m ai_slop_gate.cli run --provider copilot --llm-local --policy policy.yml runs without error
CopilotProvider returns valid ProviderObservation with observations: List[Observation]
- Cache works identically to Gemini/Groq (same
CachedProvider wrapper)
- Retry logic triggers on
InvalidAgentResponse
- All existing tests pass without modification
Blocked By
Copilot SDK public availability. SDK does not yet have a stable programmatic API
for non-interactive use outside VS Code. This issue should be revisited when
GitHub Copilot Extensibility exposes a
stable SDK for server-side use.
Labels
enhancement provider llm blocked
Summary
Integrate GitHub Copilot SDK as a native LLM provider (
CopilotProvider) into theai-slop-gate provider pipeline. Currently a stub exists in planning only. This issue
tracks the full implementation.
Background
ai-slop-gate supports multiple LLM providers (Gemini, Groq, Ollama) via a
common
LlmProviderbase class. GitHub Copilot has announced an extensibility SDKthat allows programmatic access to Copilot's code-aware reasoning. This provider
would add Copilot as a zero-cost option for GitHub-native teams (no separate API key
required for users with an active Copilot subscription).
Goals
CopilotProviderextendingLlmProviderwithkind = "llm",name = "copilot"StubCopilotClientwith a realCopilotClientbacked by the SDKanalyze(diff)andcollect(base_path)modesanalyze_pr(repo, pr_id, token)for native GitHub PR integrationproviders/llm/prompts/copilot/deep.prompt--provider copilotin CLICachedProvider(same as Gemini/Groq)Non-Goals
Architecture
JSON contract (same as all LLM providers):
{ "issues": [ { "category": "string", "signal": "snake_case", "message": "non-empty", "severity": "low|medium|high|critical", "confidence": 0.85, "file": "path/to/file.py", "line": 42 } ] }Implementation Steps
CopilotClient(replacesStubCopilotClient)CopilotProviderinproviders/llm/copilot.pyproviders/llm/prompts/copilot/deep.promptproviders/registry.py--provider copilotto CLI argstests/unit/providers/test_copilot_provider.pyai_slop_gate_snapshot.json(bump version)ARCHITECTURE.mdprovider inventoryAcceptance Criteria
python -m ai_slop_gate.cli run --provider copilot --llm-local --policy policy.ymlruns without errorCopilotProviderreturns validProviderObservationwithobservations: List[Observation]CachedProviderwrapper)InvalidAgentResponseBlocked By
Copilot SDK public availability. SDK does not yet have a stable programmatic API
for non-interactive use outside VS Code. This issue should be revisited when
GitHub Copilot Extensibility exposes a
stable SDK for server-side use.
Labels
enhancementproviderllmblocked