Skip to content

feat: Added support for GitHub Copilot SDK as LLM Provider - #348

Closed
Harshalj2108 wants to merge 2 commits into
interviewstreet:mainfrom
Harshalj2108:fix-issue-343
Closed

feat: Added support for GitHub Copilot SDK as LLM Provider#348
Harshalj2108 wants to merge 2 commits into
interviewstreet:mainfrom
Harshalj2108:fix-issue-343

Conversation

@Harshalj2108

Copy link
Copy Markdown

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

  • Dependency Addition: Added github-copilot-sdk to requirements.txt.
  • CopilotProvider Implementation: Created a new provider in models.py bridging the Copilot Python SDK.
  • Sync-Async Bridge: Implemented a ThreadPoolExecutor in CopilotProvider to gracefully wrap the Copilot SDK's native asynchronous event loop inside hiring-agent's synchronous provider interface. This prevents any event loop collision issues.
  • Error Bubbling: Explicitly intercepts and raises SessionErrorData to ensure SDK issues (like unauthenticated states) properly bubble up to the pipeline rather than failing silently.
  • Model Support Updates: Updated prompt.py to map the most recent Copilot-supported models.

Prompts Configuration (Before / After)

Before:

# Model provider mapping
MODEL_PROVIDER_MAPPING = {
    # Google Gemini models
    "gemini-1.5-pro": ModelProvider.GEMINI,
    "gemini-1.5-flash": ModelProvider.GEMINI,
    # ...
}
**After**
# Model provider mapping
MODEL_PROVIDER_MAPPING = {
    # Google Gemini models
    "gemini-1.5-pro": ModelProvider.GEMINI,
    # ...
    
    # GitHub Copilot models
    "gpt-5.5": ModelProvider.COPILOT,
    "gpt-5.6-luna": ModelProvider.COPILOT,
    "gpt-5.6-sol": ModelProvider.COPILOT,
    "gpt-5.6-terra": ModelProvider.COPILOT,
    "claude-sonnet-5": ModelProvider.COPILOT,
    "claude-opus-4.8": ModelProvider.COPILOT,
    "claude-fable-5": ModelProvider.COPILOT,
    "mai-code-1-flash": ModelProvider.COPILOT,
}

Copilot AI review requested due to automatic review settings July 14, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown

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 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-sdk dependency.
  • Introduced ModelProvider.COPILOT and a new CopilotProvider implementation in models.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.

Comment thread models.py
Comment thread models.py Outdated
Comment thread models.py
Comment thread models.py
Comment thread models.py
Comment thread models.py Outdated
@sp2hari

sp2hari commented Jul 24, 2026

Copy link
Copy Markdown
Member

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 providers.json block using Anthropic's OpenAI-compatible endpoint (#365), and we're not taking on subprocess/SDK-based providers at this time (extra dependencies + a separate code path outside the config model). Closing on that basis — not a reflection of the work, which was solid. Appreciate it.

@sp2hari sp2hari closed this Jul 24, 2026
pull Bot pushed a commit to BeeXD/hiring-agent that referenced this pull request Jul 24, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add support for GitHub Copilot SDK as LLM Provider

3 participants