Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions sdk/ai/azure-ai-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

### Features Added

- Added `BetaAgentTelephonyClient` and `BetaAgentTelephonyAsyncClient`, built through
- Added `BetaVoiceAgentsTelephonyClient` and `BetaVoiceAgentsTelephonyAsyncClient`, built through
`AgentsClientBuilder.beta()`, for managing voice-agent outbound call jobs and telephony campaigns.
- Added `BetaAgentEndpointConversationsClient` and `BetaAgentEndpointConversationsAsyncClient`, built through
- Added `BetaVoiceAgentsConversationsClient` and `BetaVoiceAgentsConversationsAsyncClient`, built through
`AgentsClientBuilder.beta()`, for managing persisted voice-agent conversations and their responses, items, and
audio content.

Expand All @@ -16,6 +16,9 @@

### Other Changes

- Regenerated from TypeSpec commit `2ba065c423a4c08ddb4e517a9f16deb17cb378c2`. Customization retains `.beta()` factory
placement and automatic voice preview headers after the upstream voice operation namespace relocation.

## 2.5.0 (2026-09-09)

### Features Added
Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-agents/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/ai/azure-ai-agents",
"Tag": "java/ai/azure-ai-agents_9343deca93"
"Tag": "java/ai/azure-ai-agents_6ddbbdb9ab"
}
2 changes: 2 additions & 0 deletions sdk/ai/azure-ai-agents/customizations/beta-annotations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class;com.azure.ai.agents.models.BrowserAutomationPreviewTool;Preview API. previ
class;com.azure.ai.agents.models.BrowserAutomationPreviewToolboxTool;Preview API. preview_tool;
class;com.azure.ai.agents.models.BrowserAutomationToolCall;Preview API. preview_tool;
class;com.azure.ai.agents.models.BrowserAutomationToolCallOutput;Preview API. preview_tool;
class;com.azure.ai.agents.models.BrowserAutomationToolConnectionParameters;Preview API. preview_tool;
class;com.azure.ai.agents.models.BrowserAutomationToolParameters;Preview API. preview_tool;
class;com.azure.ai.agents.models.ChatSummaryMemoryItem;Preview API. MemoryStores=V1Preview;
field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DigitalWorker=V1Preview, DraftAgents=V1Preview, ExternalAgents=V1Preview, GitHubCopilot=V1Preview, Skills=V1Preview, VoiceAgents=V1Preview, WorkflowAgents=V1Preview;definition
field;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. DigitalWorker=V1Preview;digital_worker_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.azure.autorest.customization.LibraryCustomization;
import com.github.javaparser.StaticJavaParser;
import com.github.javaparser.ast.Modifier;
import com.github.javaparser.ast.Node;
import com.github.javaparser.ast.NodeList;
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
import com.github.javaparser.ast.body.FieldDeclaration;
Expand Down Expand Up @@ -408,8 +409,10 @@ private void makeRealtimeMessageDiscriminatorsFinal(LibraryCustomization customi
clazz.getMethodsByName("fromJson")
.forEach(method -> method.findAll(AssignExpr.class).stream()
.filter(assignment -> assignment.getTarget().toString().endsWith(".role"))
.forEach(assignment -> assignment.findAncestor(ExpressionStmt.class)
.ifPresent(ExpressionStmt::remove)));
.forEach(assignment -> assignment.stream(Node.TreeTraversal.PARENTS)
.filter(ExpressionStmt.class::isInstance)
.findFirst()
.ifPresent(Node::remove)));
}));
}
}
Expand All @@ -432,13 +435,43 @@ private void renameImageGenToolSize(LibraryCustomization customization, Logger l
}

private void modifyPollingStrategies(LibraryCustomization customization, Logger logger) {
customization.getClass("com.azure.ai.agents.implementation", "OperationLocationPollingStrategy")
.customizeAst(ast -> ast.getClassByName("OperationLocationPollingStrategy")
.ifPresent(clazz -> clazz.addMember(StaticJavaParser.parseMethodDeclaration("@Override public Mono<PollResponse<T>> poll(PollingContext<T> pollingContext, TypeReference<T> pollResponseType) { return super.poll(pollingContext, pollResponseType).map(AgentsServicePollUtils::remapStatus); }"))));
customizePollingStrategy(customization, "OperationLocationPollingStrategy",
"{ return AgentsServicePollUtils.poll(pollingStrategyOptions, serializer, endpoint, pollingContext, pollResponseType); }");
customizePollingStrategy(customization, "SyncOperationLocationPollingStrategy",
"{ return AgentsServicePollUtils.pollSync(pollingStrategyOptions, serializer, endpoint, pollingContext, pollResponseType); }");
}

private static void customizePollingStrategy(LibraryCustomization customization, String className,
String pollMethodBody) {
customization.getClass("com.azure.ai.agents.implementation", className).customizeAst(ast -> {
ClassOrInterfaceDeclaration clazz = ast.getClassByName(className)
.orElseThrow(() -> new IllegalStateException("Generated " + className + " was not found."));
if (!clazz.getFieldByName("pollingStrategyOptions").isPresent()) {
clazz.addMember(StaticJavaParser.parseBodyDeclaration(
"private final PollingStrategyOptions pollingStrategyOptions;"));
}

com.github.javaparser.ast.stmt.BlockStmt constructorBody = clazz.getConstructors().stream()
.filter(constructor -> constructor.getParameters().size() == 2)
.findFirst()
.orElseThrow(() -> new IllegalStateException(className + " two-parameter constructor was not found."))
.getBody();
String optionsAssignment = "this.pollingStrategyOptions = pollingStrategyOptions;";
if (constructorBody.getStatements().stream()
.noneMatch(statement -> optionsAssignment.equals(statement.toString()))) {
constructorBody.addStatement(1, StaticJavaParser.parseStatement(optionsAssignment));
}

customization.getClass("com.azure.ai.agents.implementation", "SyncOperationLocationPollingStrategy")
.customizeAst(ast -> ast.getClassByName("SyncOperationLocationPollingStrategy")
.ifPresent(clazz -> clazz.addMember(StaticJavaParser.parseMethodDeclaration("@Override public PollResponse<T> poll(PollingContext<T> pollingContext, TypeReference<T> pollResponseType) { return AgentsServicePollUtils.remapStatus(super.poll(pollingContext, pollResponseType)); }"))));
List<MethodDeclaration> pollMethods = clazz.getMethodsByName("poll");
if (pollMethods.isEmpty()) {
String returnType = className.startsWith("Sync") ? "PollResponse<T>" : "Mono<PollResponse<T>>";
clazz.addMember(StaticJavaParser.parseMethodDeclaration("@Override public " + returnType
+ " poll(PollingContext<T> pollingContext, TypeReference<T> pollResponseType) "
+ pollMethodBody));
} else {
pollMethods.get(0).setBody(StaticJavaParser.parseBlock(pollMethodBody));
}
});
}

private void annotateBetaClients(LibraryCustomization customization, Logger logger) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public final class BetaAgentsAsyncClient {
*
* Retrieves an optimization job by its identifier.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -139,7 +139,7 @@ public final class BetaAgentsAsyncClient {
* }
* }
* </pre>
*
*
* <p><strong>Response Headers</strong></p>
* <table border="1">
* <caption>Response Headers</caption>
Expand Down Expand Up @@ -192,7 +192,7 @@ public Mono<Response<BinaryData>> getOptimizationJobWithResponse(String jobId, R
* </table>
* You can add these to a request with {@link RequestOptions#addQueryParam}
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -246,7 +246,7 @@ public PagedFlux<BinaryData> listOptimizationJobs(RequestOptions requestOptions)
*
* Requests cancellation of a running or queued job and returns an error if the job is already in a terminal state.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -544,7 +544,7 @@ public Mono<Void> deleteOptimizationJob(String jobId) {
* </table>
* You can add these to a request with {@link RequestOptions#addHeader}
* <p><strong>Request Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -626,9 +626,9 @@ public Mono<Void> deleteOptimizationJob(String jobId) {
* }
* }
* </pre>
*
*
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -786,15 +786,15 @@ public PollerFlux<BinaryData, BinaryData> beginCreateOptimizationJob(BinaryData
* Generates and creates an agent from kind-specific high-level inputs.
* The generated definition remains fully editable through the standard agent versioning operations.
* <p><strong>Request Body Schema</strong></p>
*
*
* <pre>
* {@code
* BinaryData
* }
* </pre>
*
*
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public final class BetaAgentsClient {
*
* Retrieves an optimization job by its identifier.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -133,7 +133,7 @@ public final class BetaAgentsClient {
* }
* }
* </pre>
*
*
* <p><strong>Response Headers</strong></p>
* <table border="1">
* <caption>Response Headers</caption>
Expand Down Expand Up @@ -185,7 +185,7 @@ public Response<BinaryData> getOptimizationJobWithResponse(String jobId, Request
* </table>
* You can add these to a request with {@link RequestOptions#addQueryParam}
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -239,7 +239,7 @@ public PagedIterable<BinaryData> listOptimizationJobs(RequestOptions requestOpti
*
* Requests cancellation of a running or queued job and returns an error if the job is already in a terminal state.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -511,7 +511,7 @@ public void deleteOptimizationJob(String jobId) {
* </table>
* You can add these to a request with {@link RequestOptions#addHeader}
* <p><strong>Request Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -593,9 +593,9 @@ public void deleteOptimizationJob(String jobId) {
* }
* }
* </pre>
*
*
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -753,15 +753,15 @@ public SyncPoller<BinaryData, BinaryData> beginCreateOptimizationJob(BinaryData
* Generates and creates an agent from kind-specific high-level inputs.
* The generated definition remains fully editable through the standard agent versioning operations.
* <p><strong>Request Body Schema</strong></p>
*
*
* <pre>
* {@code
* BinaryData
* }
* </pre>
*
*
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public final class BetaVoiceAgentsConversationsAsyncClient {
* </table>
* You can add these to a request with {@link RequestOptions#addQueryParam}
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -149,7 +149,7 @@ public PagedFlux<BinaryData> listAgentConversations(String agentName, RequestOpt
* Retrieves a single conversation recorded for the specified voice agent endpoint by its id.
* Returns `404` when the conversation was not persisted (`store = false`) or does not exist.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -269,7 +269,7 @@ public Mono<Response<Void>> deleteAgentConversationWithResponse(String agentName
* </table>
* You can add these to a request with {@link RequestOptions#addQueryParam}
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -356,7 +356,7 @@ public PagedFlux<BinaryData> listAgentConversationResponses(String agentName, St
* Retrieves a single response from the specified conversation by its id, including its `output` items,
* `usage`, and status. Returns `404` when the conversation or response was not persisted (`store = false`).
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -470,7 +470,7 @@ public Mono<Response<BinaryData>> getAgentConversationResponseWithResponse(Strin
* </table>
* You can add these to a request with {@link RequestOptions#addQueryParam}
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -524,7 +524,7 @@ public PagedFlux<BinaryData> listAgentConversationResponseItems(String agentName
* </table>
* You can add these to a request with {@link RequestOptions#addQueryParam}
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -558,7 +558,7 @@ public PagedFlux<BinaryData> listAgentConversationItems(String agentName, String
* `/items/{item_id}/audio/content`. Returns `404` when the conversation or item was not persisted
* (`store = false`).
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -598,7 +598,7 @@ public Mono<Response<BinaryData>> getAgentConversationItemWithResponse(String ag
* Requires the conversation to have persisted audio (`store = true`); returns `404` when the conversation,
* item, or its audio was not persisted.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -650,7 +650,7 @@ public Mono<Response<BinaryData>> getAgentConversationAudioItemWithResponse(Stri
* returned by the item's `/audio` metadata route — so this route returns `409 Conflict` for BYOS recordings.
* Returns `404` when the conversation, item, or its audio was not persisted (`store = false`).
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* BinaryData
Expand Down Expand Up @@ -683,7 +683,7 @@ public Mono<Response<BinaryData>> downloadAgentConversationAudioItemWithResponse
* than the listener heard, including when the response ends as cancelled. Returns `404` when the conversation or
* item was not persisted, or when no generated audio exists beyond the heard segment.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -732,7 +732,7 @@ public Mono<Response<BinaryData>> getAgentConversationGeneratedAudioItemWithResp
* Returns `404` when the conversation or item was not persisted, or when no generated audio exists beyond the
* heard segment.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* BinaryData
Expand Down Expand Up @@ -771,7 +771,7 @@ public Mono<Response<BinaryData>> downloadAgentConversationGeneratedAudioItemWit
* For a `completed` conversation, metadata is available subject to the existing BYOS behavior. Requires the
* conversation to have persisted audio (`store = true`); otherwise returns `404`.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* {
Expand Down Expand Up @@ -821,7 +821,7 @@ public Mono<Response<BinaryData>> getAgentConversationAudioWithResponse(String a
* For a `completed` conversation, content is available subject to the existing BYOS behavior. A conversation
* without persisted audio (`store = false`) returns `404`.
* <p><strong>Response Body Schema</strong></p>
*
*
* <pre>
* {@code
* BinaryData
Expand Down
Loading
Loading