Skip to content

Python: Allow hyphens in function param metadata which are sometimes present with MCP plugins #12267

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

Merged
merged 2 commits into from
May 26, 2025

Conversation

moonbox3
Copy link
Contributor

Motivation and Context

We recently relaxed the regex for FUNCTION_NAME_REGEX and FULLY_QUALIFIED_FUNCTION_NAME to allow hyphens, which are sometimes present while using MCP. However, we did not include a relaxed Regex for FUNCTION_PARAM_NAME_REGEX, which was still causing errors while using MCP within SK.

This PR relaxes the regex for FUNCTION_PARAM_NAME_REGEX so that there are no errors while using MCP.

Description

Relax the FUNCTION_PARAM_NAME_REGEX which won't throw validation errors while using MCP.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner May 26, 2025 05:01
@moonbox3 moonbox3 self-assigned this May 26, 2025
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label May 26, 2025
@moonbox3 moonbox3 added core plugin Anything related to core plugins and removed python Pull requests for the Python Semantic Kernel labels May 26, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented May 26, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
utils
   validation.py50100% 
TOTAL26991456883% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3616 18 💤 0 ❌ 0 🔥 1m 51s ⏱️

@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label May 26, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue May 26, 2025
Merged via the queue into microsoft:main with commit ac5c37e May 26, 2025
30 checks passed
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core plugin Anything related to core plugins python Pull requests for the Python Semantic Kernel
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bug: ChatCompletionAgent fails with Pydantic validation when MCPStdioPlugin is added for azure mcp server
4 participants