feat: Added support for GitHub Copilot SDK as LLM Provider - #348
feat: Added support for GitHub Copilot SDK as LLM Provider#348Harshalj2108 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds GitHub Copilot SDK as an additional LLM provider so the app can route supported model names to Copilot (alongside existing Ollama and Gemini providers).
Changes:
- Added
github-copilot-sdkdependency. - Introduced
ModelProvider.COPILOTand a newCopilotProviderimplementation inmodels.py. - Extended model parameter defaults and model→provider mapping to include Copilot model names, and wired provider initialization in
llm_utils.py.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| requirements.txt | Adds github-copilot-sdk to dependencies. |
| prompt.py | Adds Copilot model names to MODEL_PARAMETERS and MODEL_PROVIDER_MAPPING. |
| models.py | Adds ModelProvider.COPILOT and implements CopilotProvider.chat() using the Copilot SDK. |
| llm_utils.py | Instantiates CopilotProvider when the selected model maps to ModelProvider.COPILOT. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for this — the no-API-key angle (running on an existing Claude Code / SDK login) is a neat idea. We're standardizing on the config-driven provider layer from #298: Claude API access now lands via a |
Add an `anthropic` provider block to providers.json using Anthropic's OpenAI-compatible endpoint (https://api.anthropic.com/v1). No new code is needed — the config-driven OpenAICompatibleProvider (from interviewstreet#298) handles it, the same way Gemini is wired via its OpenAI-compatible endpoint. Registers claude-opus-4-8, claude-sonnet-5, and claude-haiku-4-5, keyed on ANTHROPIC_API_KEY. structured_output is set to json_object (Anthropic's OpenAI-compatible layer has limited json_schema support; the pipeline also cleans up JSON via extract_json_from_response). Supersedes the pre-interviewstreet#298 Claude-provider PRs that added bespoke provider classes: interviewstreet#205, interviewstreet#224, interviewstreet#235, interviewstreet#279, interviewstreet#303, interviewstreet#330, interviewstreet#348. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
This PR introduces the GitHub Copilot SDK as a supported LLM Provider, allowing developers with active Copilot CLI subscriptions to leverage industry-leading models seamlessly.
Closes #343
Changes Made
github-copilot-sdktorequirements.txt.CopilotProviderImplementation: Created a new provider inmodels.pybridging the Copilot Python SDK.ThreadPoolExecutorinCopilotProviderto gracefully wrap the Copilot SDK's native asynchronous event loop insidehiring-agent's synchronous provider interface. This prevents any event loop collision issues.SessionErrorDatato ensure SDK issues (like unauthenticated states) properly bubble up to the pipeline rather than failing silently.prompt.pyto map the most recent Copilot-supported models.Prompts Configuration (Before / After)
Before: