Repository navigation
Support GitHub Copilot SDK session API changes after 1.0.22 #3623
Description
Describe the bug
Upgrading github-copilot-sdk from 1.0.22 to 1.0.26 breaks GitHubCopilotTarget before it sends a prompt. The SDK's CopilotClient.create_session no longer accepts remote_session, which PyRIT passes as RemoteSessionMode.OFF. Other session settings also need to be checked against the new API rather than simply removing the first rejected argument.
This was exposed by dependency-update PR #3616. That PR will keep SDK 1.0.22 and add an upper bound until the target is migrated.
Please migrate the target to the supported session API, preserving its existing behavior: no remote/cloud session, no tools, no custom instruction/config discovery, no memory, and no background integrations. Update the session-configuration assertions and keep autospecced SDK mocks so API incompatibilities remain detectable. Once compatible, update the dependency range in both the github-copilot and all extras and regenerate uv.lock.
Steps/Code to Reproduce
At PR #3616's original head (b9b8e1e32170fcc6d1a49c54fc4ca7f5190dbb31), which locks SDK 1.0.26, run:
uv sync --extra github-copilot
uv run pytest -q tests/unit/prompt_target/target/test_github_copilot_target.py
uv run ty check pyrit/prompt_target/github_copilot_target.pyThe tests mock external SDK I/O and do not require a live Copilot conversation.
Expected Results
The target can create a session with the updated SDK while preserving the existing isolation settings and native multi-turn history. Its unit tests and typing checks pass.
Actual Results
TypeError: got an unexpected keyword argument 'remote_session'
error[unknown-argument]: Argument `remote_session` does not match any known parameter of bound method `CopilotClient.create_session`
The failed CI run reports 65 failing Copilot target tests. Both the pre-commit typing check and coverage job also fail on this incompatibility.
Evidence:
- https://github.com/microsoft/PyRIT/actions/runs/40692841663/job/122831812295
- https://github.com/microsoft/PyRIT/actions/runs/40692841663/job/122831812165
- https://github.com/microsoft/PyRIT/actions/runs/40692841646/job/122831811084
Screenshots
N/A
Versions
- OS: Ubuntu GitHub Actions runners
- Browser: N/A
- Python: CI failures observed on 3.11 and 3.14; coverage also fails on 3.12
- PyRIT: 1.2.0.dev0 at the PR head listed above
github-copilot-sdk: 1.0.26 (previously locked working version: 1.0.22)- Full
pyrit.show_versions()output: not collected; CI logs are linked above.
Activity
FIX: Keep Copilot SDK on the supported session API
SpinachDigital commentedon Oct 29, 2026
Taking this up — will open a PR shortly.