Azure AI Agents Persistent: Updated typespec and samples#45330
Azure AI Agents Persistent: Updated typespec and samples#45330
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR aligns model and client code with updated type specifications by renaming resource types, replacing the old UpdateToolResourcesOptions with the new ToolResources type, and updating sample and documentation to match.
- Renamed resource classes and updated serialization (e.g.,
AzureAISearchResource→AzureAISearchToolResource,BingGroundingSearchConfigurationList→BingGroundingSearchToolParameters). - Replaced all occurrences of
UpdateToolResourcesOptionswithToolResources, including getters, setters, and JSON parsing. - Added the
api-versionquery parameter to the vector store batch listing methods.
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/models/ToolResources.java | Updated getter/setter to use AzureAISearchToolResource. |
| sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/models/AzureAISearchToolResource.java | Renamed class and updated JSON methods. |
| sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/models/BingGroundingSearchToolParameters.java | Renamed configuration list class and JSON parsing. |
| sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/implementation/VectorStoreFileBatchesImpl.java | Added api-version query parameter to listing methods. |
| sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/implementation/models/FileDetails.java | Simplified and shortened the class-level documentation. |
Comments suppressed due to low confidence (4)
sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/models/PersistentAgentsNamedToolChoiceType.java:37
- Removing the
BING_CUSTOM_SEARCHconstant is a breaking change for any existing clients referencing it. Consider retaining it with a deprecation notice or providing a migration path.
public static final PersistentAgentsNamedToolChoiceType AZURE_AISEARCH = fromString("azure_ai_search");
sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/implementation/VectorStoreFileBatchesImpl.java:152
- The
cancelVectorStoreFileBatchSyncmethod signature is missing the@QueryParam("api-version") String apiVersionparameter, causing inconsistency with other operations.
Response<BinaryData> cancelVectorStoreFileBatchSync(@HostParam("endpoint") String endpoint,
sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/models/ToolResources.java:152
- New JSON parsing and setter logic for
azure_ai_searchshould be covered by unit tests to verify correct serialization and deserialization behavior.
public ToolResources setAzureAISearch(AzureAISearchToolResource azureAISearch) {
sdk/ai/azure-ai-agents-persistent/src/main/java/com/azure/ai/agents/persistent/ThreadsClient.java:103
- The documentation now marks
index_connection_idandindex_nameas optional; ensure that the API validation and model definitions reflect this change and do not enforce them as required.
* index_connection_id: String (Optional)
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
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 swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines