Skip to content

Regen for 2.1.0#48757

Open
kaylieee wants to merge 5 commits intomainfrom
kaylieee/prep-new-release
Open

Regen for 2.1.0#48757
kaylieee wants to merge 5 commits intomainfrom
kaylieee/prep-new-release

Conversation

@kaylieee
Copy link
Copy Markdown
Member

@kaylieee kaylieee commented Apr 9, 2026

This pull request introduces new model classes and extends the agent creation and versioning APIs to support additional properties such as blueprint references, endpoint configuration, and agent cards. The changes primarily focus on enhancing the flexibility and expressiveness of agent creation and versioning requests, as well as providing helper utilities for JSON merge patch serialization.

Enhancements to Agent Creation and Versioning Models:

  • Added support for blueprintReference, agentEndpoint, and agentCard properties in the CreateAgentRequest model, including serialization and deserialization logic, along with corresponding getter and setter methods. [1] [2] [3] [4]
  • Extended the CreateAgentVersionRequest model to include the blueprintReference property, with full serialization/deserialization and accessors. [1] [2] [3] [4]

New Options and Helper Classes:

  • Introduced the CreateAgentOptions class, providing a fluent API for specifying agent creation parameters, including metadata, description, blueprint reference, endpoint, and agent card.
  • Added the JsonMergePatchHelper utility class to facilitate JSON merge patch serialization for various agent-related models, with accessor interfaces for each supported model type.

Copilot AI review requested due to automatic review settings April 9, 2026 23:55
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

Regenerates the azure-ai-agents and azure-ai-projects SDKs for the 2.1.0 (beta) contract, adding new models and request fields to support agent blueprint references, agent endpoints/version routing, agent cards, sessions, and related tooling/preview flags.

Changes:

  • Adds/extends agent creation/versioning/update request models to include blueprint_reference, agent_endpoint, and agent_card, plus JSON merge-patch support models.
  • Introduces new models for agent endpoints (protocols, auth schemes, isolation key sources), version selectors/rules, sessions, and additional tool types/config fields.
  • Updates Projects evaluator models (e.g., metric threshold, code-based evaluator deployment fields) and refreshes TSP spec commit pointers.

Reviewed changes

Copilot reviewed 76 out of 78 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
sdk/ai/azure-ai-projects/tsp-location.yaml Updates the REST spec commit used for generation.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/FoundryFeaturesOptInKeys.java Adds preview opt-in keys (Skills, Toolboxes).
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/EvaluatorMetric.java Adds threshold field with JSON serialization/deserialization and accessors.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/CodeBasedEvaluatorDefinition.java Adds code/container deployment fields; adjusts JSON (de)serialization and mutability.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/InsightsClient.java Updates Foundry-Features header documentation to include new keys.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/InsightsAsyncClient.java Same header doc update for async client.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/implementation/InsightsImpl.java Same header doc update in service implementation layer.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/implementation/EvaluatorsImpl.java Updates evaluator response schema docs to include metric threshold.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/implementation/EvaluationRulesImpl.java Updates Foundry-Features header documentation to include new keys.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/EvaluatorsClient.java Updates evaluator response schema docs to include metric threshold.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/EvaluatorsAsyncClient.java Updates evaluator response schema docs to include metric threshold.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/EvaluationRulesClient.java Updates Foundry-Features header documentation to include new keys.
sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/EvaluationRulesAsyncClient.java Updates Foundry-Features header documentation to include new keys.
sdk/ai/azure-ai-agents/tsp-location.yaml Adds TSP location for the Agents SDK generation inputs.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/WorkIQPreviewToolParameters.java Adds WorkIQ tool parameter model + JSON (de)serialization.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/WorkIQPreviewTool.java Adds WorkIQ tool model and hooks it into tool polymorphism.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/WebSearchTool.java Adds name/description to WebSearchTool JSON and accessors.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VersionSelectorType.java Adds expandable enum for version-selection rule discriminator values.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VersionSelector.java Adds version selector model + JSON merge patch support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VersionSelectionRule.java Adds polymorphic base rule + JSON merge patch support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/FixedRatioVersionSelectionRule.java Adds FixedRatio rule subtype and merge-patch aware JSON.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VersionIndicatorType.java Adds version-indicator discriminator expandable enum.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VersionIndicator.java Adds polymorphic version indicator base model.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/VersionRefIndicator.java Adds version indicator referencing a specific agent version.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ToolType.java Adds WORK_IQ_PREVIEW tool type constant.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/Tool.java Extends tool discriminator handling for work_iq_preview.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/PatchAgentObjectPatchRequest.java Adds PATCH request model supporting agent_endpoint and agent_card with merge-patch serialization.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentBlueprintReferenceType.java Adds expandable enum for blueprint reference type discriminator.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentBlueprintReference.java Adds polymorphic base blueprint reference model.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ManagedAgentIdentityBlueprintReference.java Adds managed blueprint reference subtype.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentEndpointProtocol.java Adds supported endpoint protocol expandable enum.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationSchemeType.java Adds auth scheme type discriminator expandable enum.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentEndpointAuthorizationScheme.java Adds polymorphic base auth scheme model + merge patch hooks.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/EntraAuthorizationScheme.java Adds Entra auth scheme subtype including isolation_key_source.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/BotServiceAuthorizationScheme.java Adds BotService auth scheme subtype.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/BotServiceRbacAuthorizationScheme.java Adds BotService RBAC auth scheme subtype.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/IsolationKeySourceKind.java Adds isolation key source discriminator enum.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/IsolationKeySource.java Adds polymorphic base isolation key source model + merge patch hooks.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/EntraIsolationKeySource.java Adds Entra isolation key source subtype.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HeaderIsolationKeySource.java Adds header-based isolation key source subtype with merge patch support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentEndpoint.java Adds endpoint config model (selector, protocols, auth schemes) + merge patch support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentCard.java Adds agent card model + merge patch support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentCardSkill.java Adds agent card skill model + merge patch support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentIdentity.java Adds agent identity response model.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentDetails.java Extends agent details response model with endpoint/card/identity/blueprint fields.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentVersionDetails.java Extends agent version details response model with identity/blueprint fields.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentSessionStatus.java Adds session status expandable enum.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentSessionResource.java Adds agent session resource model (timestamps, status, version indicator).
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentProtocol.java Adds INVOCATIONS protocol constant.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/FoundryFeaturesOptInKeys.java Adds preview opt-in keys (Skills, Toolboxes) for Foundry features header.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentDefinitionOptInKeys.java Adds new preview opt-in keys for agent definition operations.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/AgentDefinition.java Adjusts discriminator handling order for agent definition subtypes.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/HostedAgentDefinition.java Extends hosted agent definition with container/code configuration fields and protocol versions.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ContainerConfiguration.java Adds container deployment configuration model.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CodeConfiguration.java Adds code-based deployment configuration model.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/FileSearchTool.java Adds name/description to FileSearchTool JSON and accessors.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/ImageGenTool.java Adds name/description to ImageGenTool JSON and accessors.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CodeInterpreterTool.java Adds name/description to CodeInterpreterTool JSON and accessors.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/LocalShellToolParameter.java Makes tool fluent and adds name/description support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/FunctionShellToolParameter.java Adds name/description support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/models/CaptureStructuredOutputsTool.java Makes tool fluent and adds name/description support.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/CreateAgentRequest.java Extends create-agent request payload to include blueprint ref, endpoint, and agent card.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/CreateAgentVersionRequest.java Adds blueprint reference to create-agent-version request payload.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/UpdateAgentRequest.java Adds blueprint reference to update-agent request payload.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/CreateSessionRequest.java Adds create-session request model with version indicator.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/models/CreateAgentOptions.java Adds an options bag used by generated convenience create-agent method(s).
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/JsonMergePatchHelper.java Adds helper/accessors enabling JSON merge-patch serialization for selected models.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClient.java Adds/updates generated convenience create-agent API wiring and request schema docs.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsAsyncClient.java Adds/updates generated convenience create-agent API wiring and request schema docs.

@@ -76,6 +76,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("id", this.id);
jsonWriter.writeStringField("name", this.name);
jsonWriter.writeJsonField("versions", this.versions);
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AgentDetails.fromJson populates instanceIdentity, blueprint, and blueprintReference, but toJson never writes these properties. This makes JSON round-tripping lossy and inconsistent with the other fields that are serialized. Consider either serializing these fields (e.g., instance_identity, blueprint, blueprint_reference) or not storing them in the model if they are meant to be read-only/internal.

Suggested change
jsonWriter.writeJsonField("versions", this.versions);
jsonWriter.writeJsonField("versions", this.versions);
jsonWriter.writeJsonField("instance_identity", this.instanceIdentity);
jsonWriter.writeJsonField("blueprint", this.blueprint);
jsonWriter.writeJsonField("blueprint_reference", this.blueprintReference);

Copilot uses AI. Check for mistakes.
/**
* Enum value AgentEndpoints=V1Preview.
*/
AGENT_ENDPOINT_V1_PREVIEW("AgentEndpoints=V1Preview");
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new enum constant name AGENT_ENDPOINT_V1_PREVIEW is inconsistent with its serialized value AgentEndpoints=V1Preview and the existing plural naming pattern (e.g., WORKFLOW_AGENTS_V1_PREVIEW). Rename to something like AGENT_ENDPOINTS_V1_PREVIEW to avoid confusion and improve discoverability.

Suggested change
AGENT_ENDPOINT_V1_PREVIEW("AgentEndpoints=V1Preview");
AGENT_ENDPOINTS_V1_PREVIEW("AgentEndpoints=V1Preview");

Copilot uses AI. Check for mistakes.
Comment on lines 177 to +194
/**
* Creates an instance of CodeBasedEvaluatorDefinition class.
*/
@Generated
public CodeBasedEvaluatorDefinition() {
}

/**
* Set the codeText property: Inline code text for the evaluator.
*
* @param codeText the codeText value to set.
* @return the CodeBasedEvaluatorDefinition object itself.
*/
@Generated
public CodeBasedEvaluatorDefinition(String codeText) {
public CodeBasedEvaluatorDefinition setCodeText(String codeText) {
this.codeText = codeText;
return this;
}
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change removes the constructor that previously allowed setting required/primary state (codeText) at construction time and replaces it with a no-arg constructor plus setCodeText. Even in beta, this is a breaking API change for consumers. Consider keeping the old constructor (possibly deprecated) delegating to setCodeText, or adding an additional constructor overload to preserve source compatibility.

Copilot uses AI. Check for mistakes.
Comment on lines +231 to +238
} else if ("instance_identity".equals(fieldName)) {
instanceIdentity = AgentIdentity.fromJson(reader);
} else if ("blueprint".equals(fieldName)) {
blueprint = AgentIdentity.fromJson(reader);
} else if ("blueprint_reference".equals(fieldName)) {
blueprintReference = AgentBlueprintReference.fromJson(reader);
} else if ("agent_guid".equals(fieldName)) {
agentGuid = reader.getString();
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AgentVersionDetails.fromJson now captures instance_identity, blueprint, blueprint_reference, and agent_guid, but toJson doesn’t serialize any of them. This makes round-tripping lossy (e.g., BinaryData.fromObject(details) will drop these fields). Consider updating toJson to include these properties, or avoid storing them on the model if they’re intentionally non-serializable/read-only.

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +22
/**
* Options for createAgent API.
*/
@Fluent
public final class CreateAgentOptions {
/*
* A feature flag opt-in required when using preview operations or modifying persisted preview resources.
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CreateAgentOptions is defined under com.azure.ai.agents.implementation.models, but it’s used by AgentsClient/AgentsAsyncClient API methods. If those methods are intended to be public, consider moving this options bag to a non-implementation package (e.g., com.azure.ai.agents.models) to avoid exposing implementation.* types to consumers.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

API Change Check

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

com.azure:azure-ai-agents
com.azure:azure-ai-projects

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