Skip to content

Latest spec#49344

Open
jpalvarezl wants to merge 3 commits into
mainfrom
jpalvarezl/feature/generate_spec_head
Open

Latest spec#49344
jpalvarezl wants to merge 3 commits into
mainfrom
jpalvarezl/feature/generate_spec_head

Conversation

@jpalvarezl
Copy link
Copy Markdown
Member

@jpalvarezl jpalvarezl commented Jun 2, 2026

This pull request introduces a breaking change to the way optimization candidates are listed in the Azure AI Agents SDK. The main update is that the listOptimizationCandidates methods on both AgentsClient and AgentsAsyncClient now return paginated results of OptimizationCandidate objects instead of the old OptimizationCandidatePagedResult model. Additionally, protocol-style overloads have been added for more flexible, raw page access. Documentation and method signatures have been updated accordingly.

Breaking Changes

Optimization Candidate Listing:

  • The listOptimizationCandidates methods on AgentsClient and AgentsAsyncClient now return paginated results (PagedIterable<OptimizationCandidate> / PagedFlux<OptimizationCandidate>) instead of OptimizationCandidatePagedResult or Mono<OptimizationCandidatePagedResult>. The OptimizationCandidatePagedResult model has been removed, and related protocol methods have been updated to reflect this change. [1] [2] [3] [4] [5]

Features Added

Protocol-Style Overloads:

  • Added protocol-style listOptimizationCandidates(String, RequestOptions) overloads to both AgentsClient and AgentsAsyncClient. These allow listing raw optimization candidate pages as BinaryData for advanced scenarios. [1] [2]

Code and Documentation Updates

Imports and Documentation:

  • Updated imports to use OptimizationCandidate instead of the removed OptimizationCandidatePagedResult. [1] [2]
  • Moved and updated Javadoc comments to match the new method signatures and behaviors. [1] [2]

These changes modernize the SDK's API for listing optimization candidates, making it more consistent with Azure SDK guidelines and improving usability for paginated data scenarios.

Copilot AI review requested due to automatic review settings June 2, 2026 11:27
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 updates the TypeSpec spec pin for azure-ai-projects and azure-ai-agents to a newer azure-rest-api-specs commit and refreshes generated SDK surface area accordingly (model/type changes plus regenerated metadata).

Changes:

  • Bump both packages’ tsp-location.yaml.hide spec commit to 6aa89cf5b93d34e6eea85f12b95cd370ba9d58b1.
  • Regenerate azure-ai-projects Skills APIs to use SkillDetails (replacing Skill) and update the Projects metadata hash.
  • Regenerate Agents optimization-candidate listing APIs to use PagedIterable/PagedFlux patterns and remove OptimizationCandidatePagedResult, updating the Agents metadata hash.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/ai/azure-ai-projects/tsp-location.yaml.hide Update spec commit pin for Projects.
sdk/ai/azure-ai-projects/src/main/resources/META-INF/azure-ai-projects_metadata.json Update generation metadata/version hash and symbol mappings.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/SkillsClient.java Switch Skills sync client return types from Skill to SkillDetails.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/SkillsAsyncClient.java Switch Skills async client return types from Skill to SkillDetails.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/SkillDetails.java Generated model now represents the skill resource as SkillDetails (renamed from Skill).
sdk/ai/azure-ai-agents/tsp-location.yaml.hide Update spec commit pin for Agents.
sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json Update generation metadata/version hash and symbol mappings.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/OptimizationCandidatePagedResult.java Remove generated wrapper model for optimization candidate list results.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/AgentsImpl.java Adjust generated optimization-candidate listing plumbing and paging wrappers.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClient.java Replace OptimizationCandidatePagedResult with PagedIterable<OptimizationCandidate> convenience APIs.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsAsyncClient.java Replace OptimizationCandidatePagedResult with PagedFlux<OptimizationCandidate> convenience APIs.
Comments suppressed due to low confidence (1)

sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/SkillDetails.java:23

  • Skill has been renamed to SkillDetails and all public client methods now return SkillDetails, but there are still in-repo references to com.azure.ai.projects.models.Skill (for example sdk/ai/azure-ai-projects/src/test/java/com/azure/ai/projects/SamplesTests.java and several src/samples classes). With Skill no longer present in com.azure.ai.projects.models, the module won’t compile until those references are updated or a compatibility type is provided.

Comment on lines 7091 to +7098
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* {
* data (Required): [
* (Required){
* candidate_id: String (Optional)
* name: String (Required)
* config (Required): {
* agent_name: String (Optional)
* agent_version: String (Optional)
* model: String (Optional)
* system_prompt: String (Optional)
* skills (Optional): [
* (Optional){
* String: BinaryData (Required)
* }
* ]
* tools (Optional): [
* (Optional){
* String: BinaryData (Required)
* }
* ]
* candidate_id: String (Optional)
* name: String (Required)
* config (Required): {
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.

2 participants