Commit d4036c5
Python: Migrate GitHub Copilot package to SDK 0.2.x (#5107)
* Python: Migrate GitHub Copilot package to SDK 0.2.x
Replace all imports from the non-existent copilot.types module with
correct SDK 0.2.x module paths (copilot.session, copilot.client,
copilot.tools, copilot.generated.session_events). Fix PermissionRequest
attribute access from dict-style .get() to dataclass attribute access.
Add OTel telemetry support to Copilot samples via configure_otel_providers
and document new telemetry environment variables in samples README.
* Python: Fix remaining copilot.types import in sample validation script
* Python: Include model in default_options for telemetry span attributes
* Python: Address review feedback on log_level and session kwargs typing
* Python: Scope PR to SDK 0.2.x migration only, remove net-new OTel features
- Remove RawGitHubCopilotAgent split and AgentTelemetryLayer inheritance
- Remove TelemetryConfig plumbing and OTLP/file telemetry settings
- Remove configure_otel_providers() calls from samples
- Remove telemetry env var rows from samples README
- Retain only: import path fixes, PermissionRequest attribute access fix,
log_level default fix, session kwargs typed fix, dependency pin
* Python: Update tests for SDK 0.2.x API changes
- SubprocessConfig replaces CopilotClientOptions dict
- create_session and resume_session now use keyword args
- send and send_and_wait take plain string prompt instead of MessageOptions
- on_permission_request is always required; deny-all fallback replaces omission
* Python: Pin github-copilot-sdk to >=0.2.0,<=0.2.0
Tighten the upper bound from <0.3.0 to <=0.2.0 to avoid pulling in 0.2.1+
which has breaking API changes relative to 0.2.0. The lower bound stays at
>=0.2.0 since this migration requires the 0.2.x import paths; 0.1.x would
fail at import time.
* Python: Pin github-copilot-sdk to >=0.2.1,<=0.2.1
---------
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>1 parent 790a759 commit d4036c5
12 files changed
Lines changed: 113 additions & 112 deletions
File tree
- python
- packages/github_copilot
- agent_framework_github_copilot
- tests
- samples/02-agents/providers/github_copilot
- scripts/sample_validation
Lines changed: 45 additions & 59 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
46 | 37 | | |
47 | 38 | | |
48 | 39 | | |
| |||
64 | 55 | | |
65 | 56 | | |
66 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
274 | 273 | | |
275 | 274 | | |
276 | 275 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 276 | + | |
| 277 | + | |
281 | 278 | | |
282 | | - | |
| 279 | + | |
283 | 280 | | |
284 | | - | |
285 | | - | |
286 | | - | |
| 281 | + | |
| 282 | + | |
287 | 283 | | |
288 | 284 | | |
289 | 285 | | |
| |||
407 | 403 | | |
408 | 404 | | |
409 | 405 | | |
410 | | - | |
411 | 406 | | |
412 | 407 | | |
413 | | - | |
| 408 | + | |
414 | 409 | | |
415 | 410 | | |
416 | 411 | | |
| |||
489 | 484 | | |
490 | 485 | | |
491 | 486 | | |
492 | | - | |
493 | 487 | | |
494 | 488 | | |
495 | 489 | | |
| |||
550 | 544 | | |
551 | 545 | | |
552 | 546 | | |
553 | | - | |
| 547 | + | |
554 | 548 | | |
555 | 549 | | |
556 | 550 | | |
| |||
730 | 724 | | |
731 | 725 | | |
732 | 726 | | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
755 | 743 | | |
756 | 744 | | |
757 | 745 | | |
758 | 746 | | |
759 | 747 | | |
760 | 748 | | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
| 749 | + | |
| 750 | + | |
765 | 751 | | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
0 commit comments