Skip to content

Python: Upgrade github-copilot-sdk to v1.0.0b1 with new features#5665

Draft
giles17 wants to merge 3 commits intomicrosoft:mainfrom
giles17:gh-copilot-v1-beta
Draft

Python: Upgrade github-copilot-sdk to v1.0.0b1 with new features#5665
giles17 wants to merge 3 commits intomicrosoft:mainfrom
giles17:gh-copilot-v1-beta

Conversation

@giles17
Copy link
Copy Markdown
Contributor

@giles17 giles17 commented May 5, 2026

Motivation and Context

Upgrades the github-copilot-sdk dependency from v0.2.1 to v1.0.0-beta.1 and implements the new features exposed by this release. This keeps our integration current with the latest SDK capabilities.

Description

Dependency upgrade:

  • Bumps github-copilot-sdk from >=0.2.1,<=0.2.1 to >=1.0.0b1,<=1.0.0b1
  • Fixes breaking type renames: ErrorClass -> ToolExecutionCompleteError, Result -> ToolExecutionCompleteResult

New features:

  • instruction_directories - session-level option in GitHubCopilotOptions that passes custom instruction directory paths to create_session(), allowing the CLI to load project-specific or team-shared instruction files
  • copilot_home - client-level setting in GitHubCopilotSettings (configurable via GITHUB_COPILOT_COPILOT_HOME env var) that controls where the CLI stores session state and config
  • tcp_connection_token is not wrapped - users who need it pass their own CopilotClient(ExternalServerConfig(...)) via the existing client= parameter

Tests and samples:

  • 8 new unit tests distributed across existing test classes (103 total, 96% coverage)
  • New sample: github_copilot_with_instruction_directories.py
  • Updated README with new env var and sample entry

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add BREAKING prefix to the title of the PR.

- Bump github-copilot-sdk dependency from 0.2.1 to 1.0.0b1
- Fix breaking type renames: ErrorClass -> ToolExecutionCompleteError,
  Result -> ToolExecutionCompleteResult
- Add instruction_directories support in GitHubCopilotOptions (session-level)
- Add copilot_home support in GitHubCopilotSettings (client-level)
- Add sample: github_copilot_with_instruction_directories.py
- Update README with new env var and sample entry
- Add 8 new unit tests covering the new features (103 total, 96% coverage)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 22:23
@moonbox3 moonbox3 added documentation Improvements or additions to documentation python labels May 5, 2026
@giles17 giles17 marked this pull request as draft May 5, 2026 22:26
@moonbox3
Copy link
Copy Markdown
Contributor

moonbox3 commented May 5, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/github_copilot/agent_framework_github_copilot
   _agent.py3261396%45–46, 52, 124, 474, 489–490, 780–781, 819, 822, 889, 916
TOTAL33466391788% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
6495 30 💤 0 ❌ 0 🔥 1m 45s ⏱️

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the Python github-copilot-sdk dependency to 1.0.0b1 and updates the Agent Framework GitHub Copilot integration to support newly added SDK features (session-level instruction_directories and client-level copilot_home), along with corresponding tests and samples.

Changes:

  • Bump github-copilot-sdk to 1.0.0b1 (lockfile + package dependency) and update tests for renamed SDK types.
  • Add support for copilot_home (SubprocessConfig passthrough, env var GITHUB_COPILOT_COPILOT_HOME) and instruction_directories (passed to create_session()).
  • Add a new sample + README entry demonstrating instruction directories; minor formatting tweaks in existing samples.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
python/uv.lock Locks github-copilot-sdk to 1.0.0b1 artifacts.
python/samples/04-hosting/container/hyperlight_codeact/call_server.py Minor string formatting cleanup for the default endpoint.
python/samples/02-agents/security/email_security_example.py Wrap long agent.run(...) call for readability.
python/samples/02-agents/providers/github_copilot/README.md Documents GITHUB_COPILOT_COPILOT_HOME and adds the new sample link.
python/samples/02-agents/providers/github_copilot/github_copilot_with_instruction_directories.py New sample demonstrating instruction_directories.
python/packages/github_copilot/tests/test_github_copilot_agent.py Adds/updates unit tests for new options and SDK type renames.
python/packages/github_copilot/pyproject.toml Pins github-copilot-sdk to 1.0.0b1.
python/packages/github_copilot/agent_framework_github_copilot/_agent.py Implements copilot_home and instruction_directories plumbing into client/session creation.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Automated Code Review

Reviewers: 4 | Confidence: 89% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Design Approach


Automated review by giles17's agents

@giles17 giles17 force-pushed the gh-copilot-v1-beta branch from 231a24f to 5b32a1d Compare May 5, 2026 22:49
@giles17 giles17 force-pushed the gh-copilot-v1-beta branch from 5b32a1d to aaf2913 Compare May 5, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants