Remove environment ID parameter and usage in APIs#22
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request removes the environment ID functionality from the MCP tooling codebase, simplifying the API surface and configuration management. The changes eliminate the conditional logic around environment IDs that was controlled by the USE_ENVIRONMENT_ID environment variable.
- Removed
environment_idparameter from all public APIs across multiple services - Removed the
get_use_environment_id()utility function and related conditional logic - Simplified URL construction by removing environment-specific path variations
- Updated documentation examples to reflect the simplified API
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| utility.py | Removed get_use_environment_id() function and simplified URL construction logic in get_mcp_base_url() and build_mcp_server_url() |
| constants.py | Removed ENVIRONMENT_ID constant from Headers class and updated docstring |
| mcp_tool_server_configuration_service.py | Removed environment_id parameter from all methods and eliminated conditional logic based on get_use_environment_id() |
| mcp_tool_registration_service.py (semantickernel) | Removed environment_id parameter and related header logic |
| mcp_tool_registration_service.py (openai) | Removed environment_id parameter and conditional header setting |
| mcp_tool_registration_service.py (azureaifoundry) | Removed environment_id parameter, fixed incorrect imports using microsoft_kairo package name |
| mcp_tool_registration_service.py (agentframework) | Removed environment_id parameter and related header logic |
| README.md files | Updated code examples to remove environment_id parameter |
Comments suppressed due to low confidence (1)
libraries/microsoft-agents-a365-tooling-extensions-azureaifoundry/microsoft_agents_a365/tooling/extensions/azureaifoundry/services/mcp_tool_registration_service.py:27
- The imports reference 'microsoft_kairo' package which appears to be incorrect. These should use 'microsoft_agents_a365.tooling' instead to match the actual package structure shown in other files.
from microsoft_kairo.tooling.common.services.mcp_tool_server_configuration_service import (
McpToolServerConfigurationService,
)
from microsoft_kairo.tooling.common.utils.constants import Constants
pontemonti
approved these changes
Nov 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removing environment ID from all calls as it's no longer needed in calls to MCP platform.
This is a breaking change as we are changing public API signatures to remove the parameter.