Description
The agent-framework-github-copilot package fails at import time when used with github-copilot-sdk>=0.2.0 because it imports from copilot.types, a module that does not exist in SDK 0.2.x.
What happened?
Running any sample or importing agent_framework_github_copilot raises ModuleNotFoundError: No module named 'copilot.types'.
What was expected?
The package should work correctly with github-copilot-sdk>=0.2.0.
Steps to reproduce:
- Install
github-copilot-sdk>=0.2.0
- Import or run any GitHub Copilot agent sample
- Observe
ModuleNotFoundError: No module named 'copilot.types'
Code Sample
from agent_framework_github_copilot import GitHubCopilotAgent
# ModuleNotFoundError: No module named 'copilot.types'
Error Messages / Stack Traces
Traceback (most recent call last):
File "github_copilot_basic.py", line 5, in <module>
from agent_framework_github_copilot import GitHubCopilotAgent
File ".../agent_framework_github_copilot/_agent.py", line 12, in <module>
from copilot.types import PermissionRequest, PermissionRequestResult, MCPServerConfig, Tool, ToolInvocation, ToolResult
ModuleNotFoundError: No module named 'copilot.types'
Package Versions
agent-framework-github-copilot: 1.0.0b260402, github-copilot-sdk: 0.2.x
Python Version
Python 3.11
Additional Context
In SDK 0.2.x, several additional breaking API changes were made beyond the module restructure:
CopilotClientOptions dict removed; CopilotClient now takes SubprocessConfig
SessionConfig / ResumeSessionConfig TypedDicts removed; create_session / resume_session now take keyword arguments directly
send / send_and_wait now take a plain str prompt instead of a MessageOptions dict
on_permission_request is now a required parameter for create_session / resume_session
PermissionRequest changed from TypedDict to dataclass; .get("kind") must be replaced with .kind
Affected files: _agent.py, tests/test_github_copilot_agent.py, all 7 samples under python/samples/02-agents/providers/github_copilot/, and python/scripts/sample_validation/create_dynamic_workflow_executor.py.
Fix tracked in PR #5107.
Description
The
agent-framework-github-copilotpackage fails at import time when used withgithub-copilot-sdk>=0.2.0because it imports fromcopilot.types, a module that does not exist in SDK 0.2.x.What happened?
Running any sample or importing
agent_framework_github_copilotraisesModuleNotFoundError: No module named 'copilot.types'.What was expected?
The package should work correctly with
github-copilot-sdk>=0.2.0.Steps to reproduce:
github-copilot-sdk>=0.2.0ModuleNotFoundError: No module named 'copilot.types'Code Sample
Error Messages / Stack Traces
Package Versions
agent-framework-github-copilot: 1.0.0b260402, github-copilot-sdk: 0.2.x
Python Version
Python 3.11
Additional Context
In SDK 0.2.x, several additional breaking API changes were made beyond the module restructure:
CopilotClientOptionsdict removed;CopilotClientnow takesSubprocessConfigSessionConfig/ResumeSessionConfigTypedDicts removed;create_session/resume_sessionnow take keyword arguments directlysend/send_and_waitnow take a plainstrprompt instead of aMessageOptionsdicton_permission_requestis now a required parameter forcreate_session/resume_sessionPermissionRequestchanged fromTypedDictto dataclass;.get("kind")must be replaced with.kindAffected files:
_agent.py,tests/test_github_copilot_agent.py, all 7 samples underpython/samples/02-agents/providers/github_copilot/, andpython/scripts/sample_validation/create_dynamic_workflow_executor.py.Fix tracked in PR #5107.