Skip to content

Python: [Bug]: GitHub Copilot package incompatible with github-copilot-sdk 0.2.x #5106

@droideronline

Description

@droideronline

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:

  1. Install github-copilot-sdk>=0.2.0
  2. Import or run any GitHub Copilot agent sample
  3. 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.

Metadata

Metadata

Assignees

Labels

agentsIssues related to single agentspython

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions