Skip to content

Python: fix(github-copilot): forward telemetry config to client - #7625

Open
Ruiming Zhao (uuzzrm) wants to merge 1 commit into
microsoft:mainfrom
uuzzrm:codex/issue-7624-telemetry
Open

Python: fix(github-copilot): forward telemetry config to client#7625
Ruiming Zhao (uuzzrm) wants to merge 1 commit into
microsoft:mainfrom
uuzzrm:codex/issue-7624-telemetry

Conversation

@uuzzrm

Copy link
Copy Markdown

Motivation & Context

GitHubCopilotAgent can accept Copilot CLI telemetry configuration, but the setting was not reaching the CopilotClient that starts the CLI process. That made it impossible to enable the CLI's model and tool spans through the agent configuration described in issue #7624.

Description & Review Guide

  • Add the SDK's TelemetryConfig to the public GitHub Copilot options.
  • Resolve telemetry alongside the other client-level settings and pass it to CopilotClient.
  • Keep telemetry out of create_session options, where it is not a valid session argument.
  • Add regression coverage for both the client construction path and the session passthrough boundary.

Related Issue

Fixes #7624

Validation

  • uv run poe --directory packages/github_copilot test --no-cov — 152 passed, 6 integration tests deselected
  • uv run poe --directory packages/github_copilot syntax — passed
  • uv run poe --directory packages/github_copilot build — passed
  • git diff --check — passed

The repository's current MyPy baseline reports two pre-existing errors on upstream/main in _parse_usage and BlobAttachment. Pyright could not start in this environment because the installed Node binary has a missing Homebrew llhttp library; neither issue is related to this change.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue
  • This is not a breaking change.

Copilot AI balanced review requested due to automatic review settings August 12, 2026 01:02
@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Aug 12, 2026
@github-actions github-actions Bot changed the title fix(github-copilot): forward telemetry config to client Python: fix(github-copilot): forward telemetry config to client Aug 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Forwards GitHub Copilot CLI telemetry configuration from agent options to the SDK client.

Changes:

  • Adds typed telemetry configuration to public options and client settings.
  • Prevents telemetry from leaking into session arguments.
  • Adds regression tests for both boundaries.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
_agent.py Resolves and forwards telemetry to CopilotClient.
test_github_copilot_agent.py Verifies client forwarding and session exclusion.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: GitHubCopilotAgent drops telemetry config when starting the CLI

2 participants