-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Test emit code #44639
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?
Test emit code #44639
Conversation
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 PR implements code generation updates for the Azure AI Projects SDK, including API model changes, type safety improvements, and security enhancements.
Changes:
- Replaced
eval()calls with explicit type conversions in serialization/deserialization logic for security - Introduced
PageOrderenum to replace string literals for pagination ordering - Added support for array encoding formats (pipe/comma/space/newline delimited) in model serialization
- Renamed multiple models and enums (e.g.,
ItemParam→Item,A2ATool→A2APreviewTool, various tool model renames) - Added deserialization caching mechanism for mutable types to ensure proper mutation handling
- Added numerous new enum types and model classes for new API features (ApplyPatch, FunctionShell, CustomTool, etc.)
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| azure/ai/projects/_utils/serialization.py | Replaced unsafe eval() calls with explicit type conversions (int/float/bool) for security |
| azure/ai/projects/_utils/model_base.py | Added array encoding support, deserialization caching for mutable types, and backcompat attribute handling |
| azure/ai/projects/_types.py | Added new type alias ComparisonFilterValueItems |
| azure/ai/projects/models/_enums.py | Large refactor: reordered enum values, added many new enum types (ApplyPatch*, FunctionShell*, CustomTool*, etc.), removed deprecated enums |
| azure/ai/projects/models/init.py | Extensive model renames and additions reflecting API changes |
| azure/ai/projects/operations/_operations.py | Updated type hints from Literal["asc", "desc"] to Union[str, PageOrder], renamed ItemParam to Item |
| azure/ai/projects/aio/operations/_operations.py | Same async version of operations changes |
| tests/finetuning/*.py | Added pylint suppressions for line-too-long |
| tests/agents/tools/test_agent_tools_with_conversations.py | Added pylint suppressions |
| tests/conftest.py | Added blank line (cosmetic) |
| samples/agents/tools/*.py | Added pylint suppressions |
| apiview-properties.json | Updated cross-language package mappings for renamed models |
| ): | ||
| # encoded string may be deserialized to sequence | ||
| return deserializer(obj) | ||
| except: # pylint: disable=bare-except |
Copilot
AI
Jan 13, 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 use of a bare except clause is a security and maintainability concern. While pylint is disabled for this line, bare except clauses can catch system exceptions like SystemExit and KeyboardInterrupt, making it difficult to terminate the program. Consider catching specific exceptions instead, such as (TypeError, AttributeError, IndexError) which are likely the exceptions that could be raised when checking the deserializer structure.
| except: # pylint: disable=bare-except | |
| except (TypeError, AttributeError, IndexError): |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
…erAuto in samples and tests
…extResponseFormatJsonSchema in samples and tests
… and adjust imports
…duce ContainerLogKind enum
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines