Skip to content

Azure AI Agents Persistent: Updated typespec and samples#45330

Merged
jayantjha merged 2 commits intomainfrom
feature/ai-agents-1dp
May 14, 2025
Merged

Azure AI Agents Persistent: Updated typespec and samples#45330
jayantjha merged 2 commits intomainfrom
feature/ai-agents-1dp

Conversation

@jayantjha
Copy link
Copy Markdown
Member

@jayantjha jayantjha commented May 14, 2025

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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@jayantjha jayantjha marked this pull request as ready for review May 14, 2025 19:28
Copilot AI review requested due to automatic review settings May 14, 2025 19:28
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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., AzureAISearchResourceAzureAISearchToolResource, BingGroundingSearchConfigurationListBingGroundingSearchToolParameters).
  • Replaced all occurrences of UpdateToolResourcesOptions with ToolResources, including getters, setters, and JSON parsing.
  • Added the api-version query 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_SEARCH constant 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 cancelVectorStoreFileBatchSync method signature is missing the @QueryParam("api-version") String apiVersion parameter, 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_search should 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_id and index_name as optional; ensure that the API validation and model definitions reflect this change and do not enforce them as required.
*                     index_connection_id: String (Optional)

@github-actions
Copy link
Copy Markdown
Contributor

API Change Check

APIView identified API level changes in this PR and created the following API reviews

com.azure:azure-ai-agents-persistent

@jayantjha jayantjha enabled auto-merge (squash) May 14, 2025 19:40
@jayantjha jayantjha merged commit 0b28a1e into main May 14, 2025
24 checks passed
@jayantjha jayantjha deleted the feature/ai-agents-1dp branch May 14, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants