Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use new typespec and rename assistantId to agentID #33350

Closed
wants to merge 1 commit into from

Conversation

bobogogo1990
Copy link
Contributor

Packages impacted by this PR

rename assistantId to agentID in the ai-projects package.

Issues associated with this PR

this is a breaking change.

Describe the problem that is addressed by this PR

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR? (If not, why?)

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@Copilot Copilot bot review requested due to automatic review settings March 12, 2025 00:12

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 systematically renames every occurrence of "assistantId" to "agentsID" in the ai-projects package and updates associated typespecs. The changes span API definitions, client calls, conversion functions, and tests.

  • Renamed the parameter, property, and variable names from "assistantId" to "agentsID" in multiple files.
  • Updated types and conversion functions to handle the new identifier.
  • Adjusted related inline documentation and error messages where applicable.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/ai/ai-projects/review/ai-projects.api.md Updated interface definitions to use the new identifier.
sdk/ai/ai-projects/src/agents/customModels.ts Renamed helper types to use the new identifier.
sdk/ai/ai-projects/src/agents/index.ts Updated API operations in client functions to reflect changes.
sdk/ai/ai-projects/src/agents/assistants.ts Modified parameter names and endpoint paths along with validation error texts.
sdk/ai/ai-projects/src/customization/outputModels.ts Changed model properties from "assistantId" to "agentsID".
sdk/ai/ai-projects/src/agents/runs.ts Revised functions to use the new parameter name consistently.
sdk/ai/ai-projects/test/public/agents/streaming.spec.ts Adjusted log statements to match updated model properties.
sdk/ai/ai-projects/src/customization/convertModelsToWrite.ts Updated conversion functions for write operations to use the new name.
sdk/ai/ai-projects/src/customization/models.ts Altered model definitions to reflect the new identifier naming.
Comments suppressed due to low confidence (2)

sdk/ai/ai-projects/review/ai-projects.api.md:115

  • [nitpick] The PR title indicates renaming to 'agentID' but the code uses 'agentsID'. Consider aligning the naming to avoid confusion.
createRun: (threadId: string, agentsID: string, options?: CreateRunOptionalParams) => AgentRunResponse;

sdk/ai/ai-projects/src/agents/assistants.ts:267

  • [nitpick] The error message still references 'Assistant ID' while the parameter is now 'agentsID'. Update the error message to align with the new naming, for example, 'Agent ID is required'.
throw new Error("Assistant ID is required");
@azure-sdk
Copy link
Collaborator

API change check

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

@azure/ai-projects

@@ -112,21 +112,21 @@ export interface AgentsOperations {
cancelVectorStoreFileBatch: (vectorStoreId: string, batchId: string, options?: CancelVectorStoreFileBatchOptionalParams) => Promise<VectorStoreFileBatchOutput>;
createAgent: (model: string, options?: CreateAgentOptionalParams) => Promise<AgentOutput>;
createMessage: (threadId: string, messageOptions: ThreadMessageOptions, options?: CreateMessageOptionalParams) => Promise<ThreadMessageOutput>;
createRun: (threadId: string, assistantId: string, options?: CreateRunOptionalParams) => AgentRunResponse;
createRun: (threadId: string, agentsID: string, options?: CreateRunOptionalParams) => AgentRunResponse;
Copy link
Member

Choose a reason for hiding this comment

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

curios why its agentsID instead of agentId ?

Copy link
Member

Choose a reason for hiding this comment

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

Agree, it should be agentId.

@bobogogo1990 bobogogo1990 marked this pull request as draft March 12, 2025 17:42
@bobogogo1990 bobogogo1990 marked this pull request as ready for review March 12, 2025 18:11
@bobogogo1990 bobogogo1990 marked this pull request as draft March 12, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants