Skip to content

Feature/githubcopilot with fixes#46095

Open
tendau wants to merge 2 commits intomainfrom
feature/githubcopilot-with-fixes
Open

Feature/githubcopilot with fixes#46095
tendau wants to merge 2 commits intomainfrom
feature/githubcopilot-with-fixes

Conversation

@tendau
Copy link
Copy Markdown
Member

@tendau tendau commented Apr 2, 2026

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added the Hosted Agents sdk/agentserver/* label Apr 2, 2026
@tendau tendau force-pushed the feature/githubcopilot-with-fixes branch from 2a86ec9 to 621a8a7 Compare April 3, 2026 01:50
@tendau tendau marked this pull request as ready for review April 3, 2026 01:51
Copilot AI review requested due to automatic review settings April 3, 2026 01:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the GitHub Copilot SDK adapter to use specific Copilot SDK import paths for tool discovery and permission/config types.

Changes:

  • Switch Tool import to from copilot.tools import Tool in tool discovery.
  • Switch PermissionRequestResult / ProviderConfig imports to from copilot.session import ... and remove the runtime fallback behavior.

Reviewed changes

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

File Description
sdk/agentserver/azure-ai-agentserver-githubcopilot/azure/ai/agentserver/githubcopilot/_tool_discovery.py Uses a single Copilot SDK import path for Tool.
sdk/agentserver/azure-ai-agentserver-githubcopilot/azure/ai/agentserver/githubcopilot/_copilot_adapter.py Uses a single Copilot SDK import path for permission/config types and removes fallback object construction.

Copy link
Copy Markdown
Member

@jodeklotzms jodeklotzms left a comment

Choose a reason for hiding this comment

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

I'm good with this. I assume you've tested this more than I have!

@jodeklotzms
Copy link
Copy Markdown
Member

The change looks straightfoward to me, but here's my context agent's review:

 1. copilot.session.PermissionRequestResult, ProviderConfig — replaces 3-tier try/except fallback
 2. copilot.tools.Tool — replaces try/except with None fallback
 3. _perm_result simplified — removes None guard, always constructs the real object

You're right that my earlier concern about downstream Tool is not None checks was speculative. Looking at the actual diff, there's no issue — the _tool_discovery.py code that uses Tool would just import it directly now.

Updated recommendation: This is a clean, low-risk improvement. The only real question is whether copilot.session and copilot.tools are stable import paths in SDK 0.2.0+. If Chris tested it, approve it. I'd just ask him to fill in the PR description with a one-liner about what changed.

@tendau tendau enabled auto-merge (squash) April 3, 2026 02:59
@tendau tendau disabled auto-merge April 3, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hosted Agents sdk/agentserver/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants