Python: Upgrade github-copilot-sdk to v1.0.0b2 with new features#5665
Open
giles17 wants to merge 4 commits intomicrosoft:mainfrom
Open
Python: Upgrade github-copilot-sdk to v1.0.0b2 with new features#5665giles17 wants to merge 4 commits intomicrosoft:mainfrom
giles17 wants to merge 4 commits intomicrosoft:mainfrom
Conversation
- 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>
Contributor
Contributor
There was a problem hiding this comment.
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-sdkto1.0.0b1(lockfile + package dependency) and update tests for renamed SDK types. - Add support for
copilot_home(SubprocessConfig passthrough, env varGITHUB_COPILOT_COPILOT_HOME) andinstruction_directories(passed tocreate_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. |
231a24f to
5b32a1d
Compare
5b32a1d to
aaf2913
Compare
SergeyMenshykh
approved these changes
May 6, 2026
moonbox3
reviewed
May 7, 2026
lokitoth
approved these changes
May 7, 2026
…s, bump to beta.2 - Forward runtime_options through _resume_session (fixes silent drop of instruction_directories/model/etc on resumed sessions) - Remove copilot_home from GitHubCopilotOptions (client-level setting only consumed at startup, not per-call) - Bump github-copilot-sdk from 1.0.0b1 to 1.0.0b2 - Add test for instruction_directories override on resumed sessions - Update existing resume test to match new _resume_session signature Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Upgrades the
github-copilot-sdkdependency from v0.2.1 to v1.0.0-beta.2 and implements the new features exposed by this release. This keeps our integration current with the latest SDK capabilities.Description
Dependency upgrade:
github-copilot-sdkfrom>=0.2.1,<=0.2.1to>=1.0.0b2,<=1.0.0b2ErrorClass->ToolExecutionCompleteError,Result->ToolExecutionCompleteResultSessionEvent.datatype change (now a discriminated union)New features:
instruction_directories- session-level option inGitHubCopilotOptionsthat passes custom instruction directory paths to bothcreate_session()andresume_session(), allowing the CLI to load project-specific or team-shared instruction filescopilot_home- client-level setting inGitHubCopilotSettings(configurable viaGITHUB_COPILOT_COPILOT_HOMEenv var) that controls where the CLI stores session state and config_resume_sessionnow forwards runtime options -model,system_message,mcp_servers,provider, andinstruction_directoriesare all passed through on resumed sessions (previously silently dropped)Tests and samples:
github_copilot_with_instruction_directories.pyContribution Checklist