The Python examples in skills/copilot-sdk/SKILL.md use an older SDK call shape:
session = await client.create_session({...})
await session.send_and_wait({"prompt": "..."})
With github-copilot-sdk==1.0.9, CopilotClient.create_session is keyword-only and CopilotSession.send_and_wait accepts a string prompt. As a result, the examples fail before the first model request.
The skill also states Python 3.8+ and requires an independently installed Copilot CLI. The current package metadata requires Python 3.11+ and documents a bundled runtime, which can be pre-downloaded with python -m copilot download-runtime.
Expected Python shape:
async with CopilotClient() as client:
async with await client.create_session(
on_permission_request=PermissionHandler.approve_all,
model="gpt-5",
) as session:
response = await session.send_and_wait("What is 2 + 2?")
print(response.data.content)
Suggested scope:
- Update every Python
create_session call to use keyword arguments.
- Update every Python
send_and_wait call to pass a string.
- Update the Python requirement to 3.11+.
- Document the bundled runtime and optional pre-download command.
- Use context managers or explicit session disconnection in lifecycle examples.
- Add CI that validates Python snippets against the currently pinned package release.
References:
github/copilot-sdk/python/copilot/client.py
github/copilot-sdk/python/copilot/session.py
- Current PyPI package metadata and quick start
I’m happy to open a pull request with these documentation fixes and snippet validation if maintainers agree with the proposed scope.
The Python examples in
skills/copilot-sdk/SKILL.mduse an older SDK call shape:With
github-copilot-sdk==1.0.9,CopilotClient.create_sessionis keyword-only andCopilotSession.send_and_waitaccepts a string prompt. As a result, the examples fail before the first model request.The skill also states Python 3.8+ and requires an independently installed Copilot CLI. The current package metadata requires Python 3.11+ and documents a bundled runtime, which can be pre-downloaded with
python -m copilot download-runtime.Expected Python shape:
Suggested scope:
create_sessioncall to use keyword arguments.send_and_waitcall to pass a string.References:
github/copilot-sdk/python/copilot/client.pygithub/copilot-sdk/python/copilot/session.pyI’m happy to open a pull request with these documentation fixes and snippet validation if maintainers agree with the proposed scope.