Regen from latest TSP to emit listConversations#48411
Conversation
There was a problem hiding this comment.
Pull request overview
This PR regenerates the azure-ai-agents SDK from the latest TypeSpec (TSP) to add a new listConversations capability surfaced through ConversationsClient and ConversationsAsyncClient, and wires up internal implementation support.
Changes:
- Added generated REST implementation
ConversationsImpland exposed it viaAgentsClientImpl. - Added
listConversationsAPIs on sync/async Conversations clients (including convenience overloads with filter parameters). - Registered Conversations clients in
AgentsClientBuilderservice client list and updated changelog/metadata.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/ai/azure-ai-agents/tsp-location.yaml | Updates the pinned swagger/spec commit used for generation. |
| sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json | Updates generated metadata to include Conversations APIs and new generated files. |
| sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/ConversationsImpl.java | New generated REST proxy implementation for GET /openai/v1/conversations. |
| sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java | Adds and initializes ConversationsImpl and exposes it via getConversations(). |
| sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsClient.java | Adds listConversations APIs and introduces a ConversationsImpl delegate field. |
| sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsAsyncClient.java | Adds async listConversations APIs and introduces a ConversationsImpl delegate field. |
| sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java | Registers Conversations clients in @ServiceClientBuilder(serviceClients=...). |
| sdk/ai/azure-ai-agents/CHANGELOG.md | Documents the new conversations listing feature. |
You can also share your feedback on Copilot code review. Take the survey.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsClient.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsAsyncClient.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsClient.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsClient.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsAsyncClient.java
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsAsyncClient.java
Outdated
Show resolved
Hide resolved
…`listAgentConversations` and adjusted samples (#48428) * Project compiles * Moved listConversations agent filters into the Agents(Async)Client * Using correct commit for changes
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
jpalvarezl
left a comment
There was a problem hiding this comment.
Aside, from one small changelog update, everything else looks good. I would follow up with another PR to do the following:
- Remove the
Conversations(Async)Tests - Add a calls to
listAgentsConverstaionsto ourAgent(Async)Clienttests and assert that things are attached correctly to an agent.
| - Added type-safe accessors on `McpTool` for the `allowedTools` property: `setAllowedTools(List<String>)`, `setAllowedTools(McpToolFilter)`, `getAllowedToolsAsStringList()`, and `getAllowedToolsAsMcpToolFilter()`. | ||
| - Added type-safe accessors on `McpTool` for the `requireApproval` property: `setRequireApproval(String)`, `setRequireApproval(McpToolRequireApproval)`, `getRequireApprovalAsString()`, and `getRequireApprovalAsMcpToolRequireApproval()`. | ||
| - Added `setComparisonFilter(ComparisonFilter)` and `setCompoundFilter(CompoundFilter)` convenience methods on `FileSearchTool`, accepting the openai-java filter types directly. | ||
| - Added `listConversations` operation to `ConversationsClient` and `ConversationsAsyncClient` for listing all conversations. Returns `PagedIterable<Conversation>` / `PagedFlux<Conversation>` using `com.openai.models.conversations.Conversation` from the openai-java library. Supports optional filtering by `limit`, `order`, `after`, `before`, `agentName`, and `agentId`. |
There was a problem hiding this comment.
We need to adjust this entry to the changelog to read:
| - Added `listConversations` operation to `ConversationsClient` and `ConversationsAsyncClient` for listing all conversations. Returns `PagedIterable<Conversation>` / `PagedFlux<Conversation>` using `com.openai.models.conversations.Conversation` from the openai-java library. Supports optional filtering by `limit`, `order`, `after`, `before`, `agentName`, and `agentId`. | |
| - Added `listAgentConversations` operation to `AgentsClient` and `AgentsAsyncClient` to list conversations attached to a specific agent filtering by `agentName` and `agentId`. |
This pull request introduces a new feature to the Azure AI Agents SDK, adding support for listing conversations through the
ConversationsClientandConversationsAsyncClient. These clients now provide methods to retrieve all conversations, with optional filtering and pagination, leveraging the OpenAI Java library'sConversationmodel. The changes also include necessary updates to the client builder and internal plumbing to support the new operations.New Conversations Listing Feature:
listConversationsoperations to bothConversationsClient(sync) andConversationsAsyncClient(async), returning paginated lists ofConversationobjects from the OpenAI Java library. These methods support filtering bylimit,order,after,before,agentName, andagentId. [1] [2] [3]Client and Builder Integration:
ConversationsClientandConversationsAsyncClientwith theAgentsClientBuilder, allowing users to easily construct these clients as part of the SDK's standard builder flow.Internal Implementation:
AgentsClientImplto instantiate and expose aConversationsImplobject, which is used internally by the new clients to perform the actual operations. [1] [2]Documentation and Metadata:
CHANGELOG.mdto document the addition of the newlistConversationsoperation and its capabilities.