Skip to content

Conversation

@niuzheng168
Copy link

Description

Update MCP sample, as api version must be higher than or equal to 2026-01-01-preview

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.

Copilot AI review requested due to automatic review settings January 28, 2026 13:17
@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Voice Live labels Jan 28, 2026
@github-actions
Copy link

Thank you for your contribution @niuzheng168! We will review the pull request and get back to you soon.

Copy link
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 pull request updates the MCP (Model Context Protocol) sample to use the required API version parameter instead of a query parameter feature flag. The change reflects a requirement that MCP features must use an API version of 2026-01-01-preview or higher.

Changes:

  • Added api_version="2026-01-01-preview" parameter to the connect() function call in the MCP sample
  • Removed the features=mcp_preview:true query parameter from the default endpoint configuration
  • Updated comments to document the API version requirement

endpoint=self.endpoint,
credential=self.credential,
model=self.model,
api_version="2026-01-01-preview", # To use MCP features, the api version must be higher than or equal to 2026-01-01-preview
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The inline comment is too long and doesn't follow PEP 8 guidelines which recommend keeping lines under 79 characters (or at most 99 characters for code with comments). Consider moving this comment to a separate line above the parameter for better readability.

Suggested change
api_version="2026-01-01-preview", # To use MCP features, the api version must be higher than or equal to 2026-01-01-preview
# To use MCP features, the api_version must be >= 2026-01-01-preview
api_version="2026-01-01-preview",

Copilot uses AI. Check for mistakes.
endpoint=self.endpoint,
credential=self.credential,
model=self.model,
api_version="2026-01-01-preview", # To use MCP features, the api version must be higher than or equal to 2026-01-01-preview
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The PR description mentions that the CHANGELOG is updated for this change, but no changes to CHANGELOG.md are included in this pull request. Since this is a sample update that changes how MCP features should be used (requiring a specific API version instead of a query parameter), it should be documented in the CHANGELOG under the "Unreleased" section.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Voice Live

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants