Python: Upgrade github-copilot-sdk to v1.0.0b1 with new features#5665
Draft
giles17 wants to merge 3 commits intomicrosoft:mainfrom
Draft
Python: Upgrade github-copilot-sdk to v1.0.0b1 with new features#5665giles17 wants to merge 3 commits intomicrosoft:mainfrom
giles17 wants to merge 3 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
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.1 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.0b1,<=1.0.0b1ErrorClass->ToolExecutionCompleteError,Result->ToolExecutionCompleteResultNew features:
instruction_directories- session-level option inGitHubCopilotOptionsthat passes custom instruction directory paths tocreate_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 configtcp_connection_tokenis not wrapped - users who need it pass their ownCopilotClient(ExternalServerConfig(...))via the existingclient=parameterTests and samples:
github_copilot_with_instruction_directories.pyContribution Checklist