Deprecation warning for using old class named AgentEndpoint (instead of new one AgentEndpoingConfig)#46658
Open
dargilco wants to merge 7 commits intofeature/azure-ai-projects/2.2.0from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a deprecation path for the AgentEndpoint model by renaming the canonical model to AgentEndpointConfig, updating the public API typing/docs accordingly, and adding a deprecated AgentEndpoint alias that emits a DeprecationWarning while preserving functionality.
Changes:
- Rename the generated model type
AgentEndpointtoAgentEndpointConfigand updatepatch_agent_detailstype hints/docstrings (sync + async). - Add a deprecated
AgentEndpointalias (subclass) inmodels/_patch.pythat emits aDeprecationWarningon instantiation. - Update hosted agents samples to use
AgentEndpointConfigand add deprecation-focused tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/ai/azure-ai-projects/tests/deprecation/test_agent_endpoint_deprecation.py | Adds tests validating deprecation warning behavior and backward-compatible functionality. |
| sdk/ai/azure-ai-projects/samples/hosted_agents/sample_session_log_stream_async.py | Updates sample imports/usage to AgentEndpointConfig. |
| sdk/ai/azure-ai-projects/samples/hosted_agents/sample_session_log_stream.py | Updates sample imports/usage to AgentEndpointConfig. |
| sdk/ai/azure-ai-projects/samples/hosted_agents/sample_agent_endpoint_async.py | Updates sample imports/usage to AgentEndpointConfig. |
| sdk/ai/azure-ai-projects/samples/hosted_agents/sample_agent_endpoint.py | Updates sample imports/usage to AgentEndpointConfig. |
| sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py | Updates patch_agent_details signature/doc typing to AgentEndpointConfig. |
| sdk/ai/azure-ai-projects/azure/ai/projects/models/_patch.py | Introduces deprecated AgentEndpoint alias class with warning emission. |
| sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py | Renames the generated model class to AgentEndpointConfig and updates references. |
| sdk/ai/azure-ai-projects/azure/ai/projects/models/init.py | Switches the primary exported symbol to AgentEndpointConfig (with patched exports still available). |
| sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py | Updates async patch_agent_details signature/doc typing to AgentEndpointConfig. |
| sdk/ai/azure-ai-projects/apiview-properties.json | Updates APIView cross-language mapping to the new model name. |
… into dargilco/deprecation-notice-agent-endpoint-class
nick863
approved these changes
May 2, 2026
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.
With this PR, old code that imports
AgentEndpointwill still work but will get a warning message during import (not during construction).