Skip to content

Python: Fix Copilot Studio explicit-settings sample dependency - #9731

Draft
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:contrib/python-copilotstudio-sample-dependency
Draft

Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
microsoft:mainfrom
1aifanatic:contrib/python-copilotstudio-sample-dependency

Conversation

@1aifanatic

Copy link
Copy Markdown
Contributor

Motivation & Context

python/samples/02-agents/providers/copilotstudio/copilotstudio_with_explicit_settings.py lists "microsoft-agents" in its PEP 723 dependencies. No package by that name exists on PyPI (the JSON API returns 404), so the documented uv run command fails before the sample starts:

error: No solution found when resolving script dependencies
  cause: Because microsoft-agents was not found in the package registry and you require microsoft-agents, we can conclude that your requirements are unsatisfiable.

Description & Review Guide

  • What are the major changes? Replace it with microsoft-agents-copilotstudio-client, which provides the microsoft_agents.copilotstudio.client module the sample imports. It is also what agent-framework-copilotstudio itself depends on.
  • What is the impact of these changes? Sample metadata only.
  • What do you want reviewers to focus on? Nothing special.

With the change, uv run --script resolves, installs, and imports the sample, which then stops at its expected COPILOTSTUDIOAGENT__ENVIRONMENTID configuration check. I found this by resolving every sample's PEP 723 header with uv pip compile. This was the only header that failed to resolve, and every other header covers its sample's imports.

Related Issue

N/A - trivial change: the dependency names a package that does not exist, and the correct package is the one the sample imports, so the desired result is not in dispute.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: Claude Code helped write the header-resolution check that found this, make the edit, and draft this description.

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 links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

🤖 Generated with Claude Code

The PEP 723 header required "microsoft-agents", which is not a package on
PyPI, so uv could not resolve the script. The sample imports
microsoft_agents.copilotstudio.client, provided by
microsoft-agents-copilotstudio-client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 26, 2026 18:36
@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Oct 26, 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.

🟢 Approval recommended

The single metadata correction matches the imported SDK and existing integration dependency, with no identified issues.

No open issues 🎉

What changed in this PR

Corrects the Copilot Studio explicit-settings sample’s dependency metadata so PEP 723 runners can resolve the SDK it imports.

Changes:

  • Replaces microsoft-agents with microsoft-agents-copilotstudio-client, matching the integration’s declared dependency.
  • Leaves sample behavior unchanged.
File Description
python/​samples/​02-agents/​providers/​copilotstudio/​copilotstudio_with_explicit_settings.py Corrects the SDK package name in the PEP 723 dependency header.

Review effort: Balanced

This branch was previously deployed

1 inactive deployment
github-app-auth — fc7eda5a Deployed Oct 26, 2026 by 1aifanatic via team_check #7570
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.

2 participants