-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update MCP sample, as api version must be higher than or equal to 2026-01-01-preview #44898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thank you for your contribution @niuzheng168! We will review the pull request and get back to you soon. |
There was a problem hiding this 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 theconnect()function call in the MCP sample - Removed the
features=mcp_preview:truequery 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 |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
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.
| 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", |
| 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 |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
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.
Description
Update MCP sample, as api version must be higher than or equal to 2026-01-01-preview
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines