-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
There was a problem hiding this 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 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");
API change check APIView has identified API level changes in this PR and created following API reviews. |
@@ -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; |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
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