Skip to content

Arch board feedback + beta.2 release preparation#48247

Open
jpalvarezl wants to merge 12 commits intomainfrom
jpalvarezl/feature/latest_spec
Open

Arch board feedback + beta.2 release preparation#48247
jpalvarezl wants to merge 12 commits intomainfrom
jpalvarezl/feature/latest_spec

Conversation

@jpalvarezl
Copy link
Member

This pull request primarily refactors several model classes in the Azure AI Agents SDK to improve naming consistency and clarity. The changes include renaming classes and their references, updating constructors and methods, and ensuring all usages reflect the new names. No functional logic is changed, but these updates will make the codebase easier to understand and maintain.

Model class renaming and updates

Agent details and versions

  • Renamed AgentObjectVersions to AgentDetailsVersions and updated all references in AgentDetails.java and the class itself, including constructors, getters, and JSON serialization/deserialization methods. (AgentDetails.java, AgentDetailsVersions.java) [1] [2] [3] [4] [5] [6] [7]

Error model

  • Renamed OpenAIError to ApiError throughout the codebase, including the class name, fields, constructors, and JSON methods. All usages of the error model now use the new name. (ApiError.java) [1] [2] [3] [4] [5] [6] [7]

Azure Function definition

  • Renamed AzureFunctionDefinitionFunction to AzureFunctionDefinitionDetails and updated all references in AzureFunctionDefinition.java and the class itself, including constructors, getters, and JSON methods. (AzureFunctionDefinition.java, AzureFunctionDefinitionDetails.java) [1] [2] [3] [4] [5] [6] [7]

Documentation updates

  • Updated the changelog to reflect the release date for version 2.0.0-beta.2 and removed the "Other Changes" section. (CHANGELOG.md) [1] [2]

Copilot AI review requested due to automatic review settings March 4, 2026 13:29
@jpalvarezl jpalvarezl enabled auto-merge (squash) March 4, 2026 13:29
Copy link
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 prepares the 2.0.0-beta.2 release for both azure-ai-projects and azure-ai-agents SDK libraries. It applies architecture-board-requested naming improvements (renaming classes for clarity), replaces the custom DayOfWeek enum with the JDK standard java.time.DayOfWeek, and updates both TypeSpec commit pointers to a newer API spec snapshot.

Changes:

  • Renamed several model classes for clarity: IndexAIProjectIndex, OpenAIErrorApiError, AgentObjectVersionsAgentDetailsVersions, AzureFunctionDefinitionFunctionAzureFunctionDefinitionDetails, and defaultParams field → defaultParameters in OpenApiFunctionDefinition
  • Replaced the TSP-generated DayOfWeek custom enum with java.time.DayOfWeek in WeeklyRecurrenceSchedule, adding a toPascalCase serialization helper and a new unit-test class
  • Updated CHANGELOG.md in both libraries to stamp the 2.0.0-beta.2 release date

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
WeeklyRecurrenceSchedule.java Switches DayOfWeek from custom enum to java.time.DayOfWeek; adds toPascalCase helper
WeeklyRecurrenceScheduleSerializationTest.java New unit tests covering serialization, deserialization, and round-trip for the JDK DayOfWeek
AIProjectIndex.java (formerly Index.java) Renamed from Index to AIProjectIndex; default type string updated
JsonMergePatchHelper.java Renames IndexAccessorAIProjectIndexAccessor and its field/methods
AzureAISearchIndex.java, CosmosDBIndex.java, ManagedAzureAISearchIndex.java Updated parent class references from Index to AIProjectIndex
IndexesClient.java, IndexesAsyncClient.java Updated method signatures to use AIProjectIndex
ApiError.java (formerly OpenAIError.java) Renamed from OpenAIError to ApiError
AgentDetailsVersions.java (formerly AgentObjectVersions.java) Renamed; constructor moved to top
AgentDetails.java Updated to use AgentDetailsVersions
AzureFunctionDefinition.java, AzureFunctionDefinitionDetails.java Renamed inner type; constructor moved
OpenApiFunctionDefinition.java Renamed field defaultParamsdefaultParameters
MemoryStoreUpdateResponse.java Updated to use ApiError instead of OpenAIError
DayOfWeek.java File deleted (replaced by java.time.DayOfWeek)
CHANGELOG.md (both libraries) Stamped 2.0.0-beta.2 release date, removed "Other Changes" empty section
tsp-location.yaml (both libraries) Updated API spec commit hash
Metadata JSON files Updated cross-language definitions to reflect renames
Comments suppressed due to low confidence (1)

sdk/ai/azure-ai-projects/src/main/java/com/azure/ai/projects/models/AIProjectIndex.java:28

  • The default type field value was changed from IndexType.fromString("Index") to IndexType.fromString("AIProjectIndex") in the base class. However, this value is serialized to the wire in toJson and toJsonMergePatch. If the API server does not recognize "AIProjectIndex" as a valid discriminator value, this will cause errors for any code that directly instantiates AIProjectIndex (instead of a concrete subclass). The value "AIProjectIndex" is not listed as a known discriminator value in the fromJson method (which only recognizes "AzureSearch", "ManagedAzureSearch", and "CosmosDBNoSqlVectorStore"). Please verify whether "AIProjectIndex" is a valid value accepted by the API, or if this default should be left as-is or removed.

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.

3 participants