github Azure/azure-sdk-for-java com.azure+azure-ai-agents_2.0.0-beta.3

latest release: com.azure.resourcemanager+azure-resourcemanager-resources_2.54.0
pre-release10 hours ago

2.0.0-beta.3 (2026-03-19)

Features Added

  • Added readSpecFromFile(Path) static convenience method to OpenApiFunctionDefinition for loading OpenAPI specification JSON files as the Map<String, BinaryData> required by the constructor, eliminating the need for manual JsonReader/BinaryData wiring.
  • Added new OpenApiSync/OpenApiAsync samples demonstrating end-to-end OpenAPI tool integration: loading a spec file, creating an agent with an OpenApiTool, and invoking an external API via conversation.
  • Added new tool samples for parity with the Python SDK: AzureFunctionSync/AzureFunctionAsync, BingCustomSearchSync/BingCustomSearchAsync, MemorySearchSync/MemorySearchAsync, McpWithConnectionSync/McpWithConnectionAsync, and OpenApiWithConnectionSync/OpenApiWithConnectionAsync.
  • Added type-safe accessors on CodeInterpreterTool for the container property: setContainer(String), setContainer(AutoCodeInterpreterToolParam), getContainerAsString(), and getContainerAsAutoCodeInterpreterToolParam().
  • 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 listAgentConversations operation to AgentsClient and AgentsAsyncClient to list conversations attached to a specific agent filtering by agentName and agentId.
  • Added streaming response methods to ResponsesClient and ResponsesAsyncClient:
    • createStreamingWithAgent and createStreamingWithAgentConversation on ResponsesClient return IterableStream<ResponseStreamEvent> for synchronous streaming.
    • createStreamingWithAgent and createStreamingWithAgentConversation on ResponsesAsyncClient return Flux<ResponseStreamEvent> for asynchronous streaming.
  • Added StreamingUtils implementation helper that bridges OpenAI StreamResponse to IterableStream and AsyncStreamResponse to Flux.
  • Added streaming samples: SimpleStreamingSync/SimpleStreamingAsync, FunctionCallStreamingSync/FunctionCallStreamingAsync, and CodeInterpreterStreamingSync/CodeInterpreterStreamingAsync.
  • Added structured input convenience methods to ResponsesClient and ResponsesAsyncClient for creating responses with agent-defined template parameters:
    • createWithAgentStructuredInput accepts a Map<String, Object> of runtime values that are substituted into the agent's prompt template.
    • createStreamingWithAgentStructuredInput provides the streaming equivalent, returning IterableStream<ResponseStreamEvent> (sync) or Flux<ResponseStreamEvent> (async).
  • Added CreateResponseWithStructuredInput sample demonstrating how to define structured inputs on an agent and pass runtime values when creating a response.

Breaking Changes

  • Removed deprecated convenience methods from ResponsesClient and ResponsesAsyncClient: createWithAgent, createWithAgentConversation, createStreamingWithAgent, createStreamingWithAgentConversation, createWithAgentStructuredInput, and createStreamingWithAgentStructuredInput. Use createAzureResponse and createStreamingAzureResponse with AzureCreateResponseOptions instead.
  • deleteAgent(String) on AgentsClient now returns void instead of DeleteAgentResponse. The corresponding async method on AgentsAsyncClient now returns Mono<Void> instead of Mono<DeleteAgentResponse>. The public protocol method deleteAgentWithResponse has been removed; use the convenience method instead.
  • deleteAgentVersion(String, String) on AgentsClient now returns void instead of DeleteAgentVersionResponse. The corresponding async method on AgentsAsyncClient now returns Mono<Void> instead of Mono<DeleteAgentVersionResponse>.
  • DeleteAgentResponse removed from com.azure.ai.agents.models and is no longer part of the public API.
  • DeleteAgentVersionResponse removed from com.azure.ai.agents.models and is no longer part of the public API.
  • AgentDefinitionOptInKeys and FoundryFeaturesOptInKeys changed from ExpandableStringEnum-based classes to standard Java enum types. The values() method now returns an array instead of a Collection, and the deprecated no-arg constructor is removed.
  • The timezone property in ApproximateLocation and WebSearchApproximateLocation changed from String to java.util.TimeZone.
  • The container property on CodeInterpreterTool no longer exposes BinaryData getter/setter publicly. Use the new typed accessors instead (e.g., setContainer("container-id") or setContainer(new AutoCodeInterpreterToolParam())).
  • The allowedTools and requireApproval properties on McpTool no longer expose BinaryData getter/setter publicly. Use the new typed accessors instead (e.g., setRequireApproval("always") or setAllowedTools(List.of("tool_a", "tool_b"))).
  • The filters property on FileSearchTool no longer exposes BinaryData getter/setter publicly.
  • The reasoning property on PromptAgentDefinition now uses com.openai.models.Reasoning from the openai-java library instead of the previously generated Reasoning class. Use Reasoning.builder().effort(ReasoningEffort.HIGH).build() to construct values.
  • Removed ComparisonFilter, ComparisonFilterType, CompoundFilter, CompoundFilterType, Reasoning, ReasoningEffort, ReasoningSummary, and ReasoningGenerateSummary from com.azure.ai.agents.models. Use the equivalent types from com.openai.models instead (e.g., com.openai.models.ComparisonFilter, com.openai.models.Reasoning).

Other Changes

  • Updated all samples and tests to use the new createAzureResponse and createStreamingAzureResponse API.
  • Added ToolsTests and ToolsAsyncTests with recorded end-to-end test coverage for OpenAPI, Code Interpreter, Function Call, Web Search, MCP, and File Search tools.
  • Added StreamingTests and StreamingAsyncTests with recorded test coverage for streaming responses (simple prompt, function calling, and Code Interpreter scenarios).
  • Added structured input test coverage to AgentsTests, AgentsAsyncTests, StreamingTests, and StreamingAsyncTests.

Don't miss a new azure-sdk-for-java release

NewReleases is sending notifications on new releases.