[ai-projects] v2.6.0 - #39782
Conversation
Co-authored-by: glharper <64209257+glharper@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 1 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Regenerates @azure/ai-projects with newer Foundry contracts, including voice-agent generation, conversation protocols, and additional tool models.
Changes:
- Adds voice-agent generation and supporting models.
- Incorporates generated conversation/WebSocket protocol code while preserving the customized client surface.
- Adds a voice-agent sample and skipped test scaffold.
Reviewed changes
Copilot reviewed 21 out of 40 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/ai/ai-projects/tsp-location.saved.yaml |
Updates the TypeSpec revision and voice-agent source path. |
sdk/ai/ai-projects/test/voiceAgent.spec.ts |
Adds a skipped voice-agent test scaffold. |
sdk/ai/ai-projects/src/models/index.ts |
Exports newly generated model types. |
sdk/ai/ai-projects/src/index.ts |
Exposes new public models and generation options. |
sdk/ai/ai-projects/src/classic/voiceAgentWebSocket/index.ts |
Wraps internal WebSocket operations. |
sdk/ai/ai-projects/src/classic/agents/index.ts |
Adds generateAgent to agent operations. |
sdk/ai/ai-projects/src/classic/agentEndpointConversations/index.ts |
Wraps internal conversation operations. |
sdk/ai/ai-projects/src/api/voiceAgentWebSocket/options.ts |
Defines WebSocket request options. |
sdk/ai/ai-projects/src/api/voiceAgentWebSocket/operations.ts |
Implements the WebSocket handshake request. |
sdk/ai/ai-projects/src/api/voiceAgentWebSocket/index.ts |
Re-exports WebSocket protocol APIs. |
sdk/ai/ai-projects/src/api/agents/options.ts |
Adds generation operation options. |
sdk/ai/ai-projects/src/api/agents/operations.ts |
Implements generateAgent. |
sdk/ai/ai-projects/src/api/agents/index.ts |
Re-exports agent generation APIs. |
sdk/ai/ai-projects/src/api/agentEndpointConversations/options.ts |
Defines conversation operation options. |
sdk/ai/ai-projects/src/api/agentEndpointConversations/operations.ts |
Implements conversation and audio operations. |
sdk/ai/ai-projects/src/api/agentEndpointConversations/index.ts |
Re-exports conversation protocol APIs. |
sdk/ai/ai-projects/scripts/post-emitter.mjs |
Removes the obsolete API-version workaround. |
sdk/ai/ai-projects/samples-dev/agents/voiceAgent.ts |
Adds a voice-agent generation sample. |
sdk/ai/ai-projects/review/ai-projects-react-native.api.diff.md |
Updates the React Native API delta. |
sdk/ai/ai-projects/review/ai-projects-browser.api.diff.md |
Updates the browser API delta. |
sdk/ai/ai-projects/generated/models/index.ts |
Adds generated model exports. |
sdk/ai/ai-projects/generated/index.ts |
Adds generated top-level exports. |
sdk/ai/ai-projects/generated/classic/voiceAgentWebSocket/index.ts |
Adds the generated WebSocket wrapper. |
sdk/ai/ai-projects/generated/classic/index.ts |
Exports generated operation groups. |
sdk/ai/ai-projects/generated/classic/agents/index.ts |
Adds generated agent generation support. |
sdk/ai/ai-projects/generated/classic/agentEndpointConversations/index.ts |
Adds generated conversation wrappers. |
sdk/ai/ai-projects/generated/api/voiceAgentWebSocket/options.ts |
Adds generated WebSocket options. |
sdk/ai/ai-projects/generated/api/voiceAgentWebSocket/operations.ts |
Adds generated WebSocket operations. |
sdk/ai/ai-projects/generated/api/voiceAgentWebSocket/index.ts |
Exports generated WebSocket APIs. |
sdk/ai/ai-projects/generated/api/agents/options.ts |
Adds generated generation options. |
sdk/ai/ai-projects/generated/api/agents/operations.ts |
Adds generated generateAgent. |
sdk/ai/ai-projects/generated/api/agents/index.ts |
Exports generated agent APIs. |
sdk/ai/ai-projects/generated/api/agentEndpointConversations/options.ts |
Adds generated conversation options. |
sdk/ai/ai-projects/generated/api/agentEndpointConversations/operations.ts |
Adds generated conversation operations. |
sdk/ai/ai-projects/generated/api/agentEndpointConversations/index.ts |
Exports generated conversation APIs. |
sdk/ai/ai-projects/generated/aiProjectClient.ts |
Adds generated protocol operation groups. |
sdk/ai/ai-projects/.github/skills/apply-post-emitter-edits/SKILL.md |
Removes obsolete API-version guidance. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 41 changed files in this pull request and generated no new comments.
Suppressed comments (5)
Previously missed (2) — in code that hasn't changed since the last review.
sdk/ai/ai-projects/src/api/agentEndpointConversations/operations.ts:488
- These responses paginate with
has_more/last_id, notnextLink. Without the cursor fields, iteration stops after the first page; if continuation is enabled, the follow-up request must also retain the required preview header.
This issue also appears in the following locations of the same file:
- line 571
- line 714
- line 891
{ itemName: "data", apiVersion: context.apiVersion ?? "v1" },
sdk/ai/ai-projects/src/index.ts:536
- The PR is titled v2.6.0 and adds customer-visible API, but
package.json,src/constants.ts, and the released top CHANGELOG entry all remain at 2.5.0. Add a 2.6.0(Unreleased)changelog entry and synchronize both version literals before merge.
sdk/ai/ai-projects/src/api/agentEndpointConversations/operations.ts:571
- These responses paginate with
has_more/last_id, notnextLink. Without the cursor fields, iteration stops after the first page; if continuation is enabled, the follow-up request must also retain the required preview header.
{ itemName: "data", apiVersion: context.apiVersion ?? "v1" },
sdk/ai/ai-projects/src/api/agentEndpointConversations/operations.ts:714
- These responses paginate with
has_more/last_id, notnextLink. Without the cursor fields, iteration stops after the first page; if continuation is enabled, the follow-up request must also retain the required preview header.
{ itemName: "data", apiVersion: context.apiVersion ?? "v1" },
sdk/ai/ai-projects/src/api/agentEndpointConversations/operations.ts:891
- These responses paginate with
has_more/last_id, notnextLink. Without the cursor fields, iteration stops after the first page; if continuation is enabled, the follow-up request must also retain the required preview header.
{ itemName: "data", apiVersion: context.apiVersion ?? "v1" },
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 41 changed files in this pull request and generated 5 comments.
Suppressed comments (5)
sdk/ai/ai-projects/src/api/agentEndpointConversations/operations.ts:571
- This cursor-based response exposes only
last_id/has_more, not anextLink, so the iterator currently stops after the first page. Configure those cursor fields and carry the required preview header into follow-up requests; otherwise iteration over more thanlimititems either terminates early or loses the opt-in header.
{ itemName: "data", apiVersion: context.apiVersion ?? "v1" },
sdk/ai/ai-projects/src/api/agentEndpointConversations/operations.ts:714
- This cursor-based response exposes only
last_id/has_more, not anextLink, so the iterator currently stops after the first page. Configure those cursor fields and carry the required preview header into follow-up requests; otherwise iteration over more thanlimitresponses either terminates early or loses the opt-in header.
{ itemName: "data", apiVersion: context.apiVersion ?? "v1" },
sdk/ai/ai-projects/src/api/agentEndpointConversations/operations.ts:891
- This cursor-based response exposes only
last_id/has_more, not anextLink, so the iterator currently stops after the first page. Configure those cursor fields and carry the required preview header into follow-up requests; otherwise iteration over more thanlimitconversations either terminates early or loses the opt-in header.
{ itemName: "data", apiVersion: context.apiVersion ?? "v1" },
sdk/ai/ai-projects/samples-dev/agents/voiceAgent.ts:8
- The new
samples-devsource was not published into the committedsamples/v2outputs. Runnpm run generate-samples(the package'sdev-tool samples publish -fwrapper) and commit the generated TypeScript/JavaScript sample plus README updates; otherwise customers browsing the published samples cannot discover this example.
/**
* This sample demonstrates how to generate a voice agent from high-level inputs
* using the AIProjectClient.
*
* @summary Generate a voice agent backed by a Foundry model deployment.
sdk/ai/ai-projects/src/index.ts:750
OmitPropertiesRealtimeResponse1is an emitter-generated placeholder (including a collision suffix) leaking into the stable public API throughVoiceAgentRealtimeResponse. Give this projected response base a meaningful explicit TypeSpec name and regenerate so customers are not locked into an implementation-detail symbol.
### Packages impacted by this PR`@azure/ai-projects`### Issues associated with this PRLinked automatically.### Describe the problem that is addressed by this PRUpdates `@azure/ai-projects` to `2.6.0` and regenerates it from TypeSpec commit `9d2bce8fe225635c1a9b192f8d1d18ae1637271b` against `feature/ai-projects/2.6.0`.- **TypeSpec inputs:** Updates the pinned commit and retains the expanded `additionalDirectories`.- **API surface:** Refreshes generated models, operations, serializers, exports, and API reports.- **Customizations:** Reconciles Agent Insights and relocated beta Voice/Conversation APIs while preserving paging, preview-header, poller, and stream behavior.- **CI cleanup:** Applies lint autofixes for type-only imports, removes stray post-emitter artifacts, and fixes generated shadowing/runtime-import errors.### 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?Uses the package’s TypeSpec regeneration and post-emitter reconciliation workflow rather than manually transcribing schema changes. This keeps the SDK aligned with the pinned specification while retaining handwritten customizations.### Are there test cases added in this PR? _(If not, why?)_No focused tests were added; this change refreshes generated contracts and existing client wiring. Existing Node and browser suites cover the regenerated client paths.### Provide a list of related PRs _(if any)_None.### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_N/A — this is a TypeSpec regeneration PR.### Checklists- [ ] Added impacted package name to the issue description- [ ] Does this PR need any fixes in the SDK Generator? _(If so, create an Issue in the [typespec-azure](https://github.com/Azure/typespec-azure) repository and link it here)_- [x] Added a changelog (if necessary)<!-- START COPILOT CODING AGENT SUFFIX -->- Fixes #39785 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: glharper <64209257+glharper@users.noreply.github.com> Co-authored-by: Glenn Harper <glharper@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: da906d50-380f-43e0-bfe1-a5d82afd7ac6
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 34 out of 69 changed files in this pull request and generated 7 comments.
Suppressed comments (6)
sdk/ai/ai-projects/src/api/beta/agentEndpointConversations/operations.ts:571
- This response uses
last_id/has_morecursor pagination, so the current iterator has no next page link and stops after page one. Configure the cursor fields and preserve the required preview header for follow-up requests.
sdk/ai/ai-projects/src/api/beta/agentEndpointConversations/operations.ts:714 - The deserialized list exposes
last_idandhas_more, notnextLink; without cursor configuration this iterable silently ends after its first page. The next-page request also needs the voice preview feature header.
sdk/ai/ai-projects/src/api/beta/agentEndpointConversations/operations.ts:903 - Conversation lists are cursor-paged, but this configuration looks only for a
nextLink; any result withhas_more: trueis truncated to one page. Add the cursor field names and carry the required feature header to subsequent requests.
sdk/ai/ai-projects/test/voiceAgent.spec.ts:13 - This skipped test contributes no coverage for the new public
generateAgentpath, and it is not recording-ready: it never starts/stops aRecorder, uses the production credential directly, and does not inject the recorder HTTP client. Add an active recorder-backed test (including cleanup) before releasing this feature.
sdk/ai/ai-projects/samples-dev/agents/voiceAgent.ts:9 - Only the
samples-devsource was added; the committed TypeScript/JavaScript outputs undersamples/v2are missing, so package consumers and sample publishing will not see this example. Run the package'spnpm generate-samplesscript (package.json:100) and commit the generated outputs.
sdk/ai/ai-projects/src/classic/beta/index.ts:61 - The new Agent Insights CRUD, cursor paging, and LRO surface is public but has no test coverage. Add recorder-backed happy/error cases plus item/page/continuation tests and a create-run poll-to-completion test.
| /** | ||
| * Returns default and previously-published values used to pre-populate a Microsoft 365 publish | ||
| * request for a Foundry agent. | ||
| */ | ||
| getMicrosoft365PublishDefaults: ( |
There was a problem hiding this comment.
FYI for this missing test comment: still discussing testing pre-reqs for this feature, requires a backing bot service resource.
### Packages impacted by this PR `@azure/ai-projects` ### Issues associated with this PR Follow-up coverage for #39797. ### Describe the problem that is addressed by this PR The Microsoft 365 publishing APIs added in #39797 did not receive the package's post-regeneration sample and test authoring passes. - Adds a runnable sample that retrieves publish defaults, generates a Microsoft Teams app package, and publishes an existing agent at the least-privileged `Personal` scope. - Documents the optional Azure Bot Service ARM resource ID in `sample.env`. The existing `2.6.0` changelog entry already documents the Microsoft 365 publishing feature, so no additional release-note entry is needed. ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ - #39797 ### Validation - `npm run build:samples` - `npm run check-format` --------- Copilot-Session: da906d50-380f-43e0-bfe1-a5d82afd7ac6
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 71 changed files in this pull request and generated 1 comment.
Suppressed comments (12)
Previously missed (3) — in code that hasn't changed since the last review.
sdk/ai/ai-projects/src/classic/beta/index.ts:59
- This exposes the conversation protocol through the public
project.betasurface, contrary to the PR requirement that protocol-only conversation operations remain internal. Remove this property and its public exports/changelog entry, or revise the stated API requirement if public exposure is intentional.
sdk/ai/ai-projects/src/classic/beta/index.ts:63 - This exposes the protocol-only WebSocket handshake through
project.beta, contrary to the PR requirement that WebSocket operations remain internal. The method also returnsPromise<void>rather than a usable socket, so it should not be advertised as a public connection API.
sdk/ai/ai-projects/src/classic/beta/index.ts:61 - This public Agent Insights operation group has no tests. Add recorded coverage for CRUD, cursor pagination, and the
createRunpoller so the new public surface is exercised.
sdk/ai/ai-projects/tsp-location.saved.yaml:2
- The saved generation pin does not match the revision named in the PR and linked issue: this records
9d2bce8...(the later realtime-model-name fix), while both specify082ad463...(publish approval status). Please either regenerate from the stated revision or update the PR/issue metadata so the provenance is accurate.
sdk/ai/ai-projects/src/api/beta/agentEndpointConversations/operations.ts:488 - This response paginates with
last_id/has_more, but the helper is left at itsnextLinkdefaults, so iteration stops after the first page. Next-page requests would also omit the required VoiceAgents preview header. Configure cursor fields and forward that header, as the Agent Insights list operations do.
sdk/ai/ai-projects/src/api/beta/agentEndpointConversations/operations.ts:571 - This cursor-based list has no
nextLink, so the default paging configuration stops after page one; a resumed request would also lose the required VoiceAgents feature header. Add the cursor metadata and next-page header.
sdk/ai/ai-projects/src/api/beta/agentEndpointConversations/operations.ts:714 - The deserialized page exposes
last_idandhas_more, notnextLink; without configuring those fields this iterator cannot advance beyond the first response. Forward the preview header on the synthesized next-page request as well.
sdk/ai/ai-projects/src/api/beta/agentEndpointConversations/operations.ts:903 - This list uses cursor pagination (
last_id/has_more), so the current helper options end iteration after the first page. The follow-up request also needs the hardcoded VoiceAgents preview header.
sdk/ai/ai-projects/test/voiceAgent.spec.ts:13 - This skipped case provides no regression coverage and is not recording-ready: it bypasses the package's
createRecorder/createProjectsClientutilities, does not inject the recorder transport, and never stops the recorder. Convert it to the established recorded-test pattern and enable it before release.
sdk/ai/ai-projects/src/classic/agents/index.ts:141 - The new Microsoft 365 publishing surface has no tests anywhere under this package; the sample does not validate request serialization, binary package handling, or service errors. Add recorded coverage for defaults, package generation, and publishing.
sdk/ai/ai-projects/src/index.ts:206 - The generated contract adds
digitalWorkerTypeto both create-agent and create-version options and serializes it asdigital_worker_type, but the customizedsrcoptions and request bodies omit it. Exporting this type alone therefore does not let users set the new digital-worker metadata; carry the field through both public options and serializers.
sdk/ai/ai-projects/samples-dev/agents/voiceAgent.ts:8 - The source sample was added without its committed TypeScript and JavaScript outputs under
samples/v2. Repository sample generation guidance requires runningdev-tool samples publish -faftersamples-devchanges (documentation/steps-after-generations.md:124-130; package.json:100).
|
Copilot resolve merge conflicts |
|
Glenn Harper (@glharper) Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
….6.0 Co-authored-by: glharper <64209257+glharper@users.noreply.github.com>
Resolved in |
There was a problem hiding this comment.
🔵 Needs a closer look
The promised voice-agent test scaffold and published TypeScript/JavaScript sample outputs are missing.
Review details
Suppressed comments (2)
sdk/ai/ai-projects/src/classic/agents/index.ts:516
- The new public
generateAgentpath still has no matching reference anywhere undertest/, although the PR description says a skipped voice-agent test scaffold was added. Add the promised skipped Vitest scaffold so request serialization and the preview header are at least compile-checked and ready for recording.
sdk/ai/ai-projects/samples-dev/agents/voiceAgent.ts:23 - This
samples-devaddition was not published into eithersamples/v2/typescriptorsamples/v2/javascript, and neither generated samples README lists it. The repository workflow requires runningnpx dev-tool samples publish -fafter editingsamples-dev(documentation/steps-after-generations.md:111-130); without those committed outputs, package consumers cannot discover or run the voice-agent sample.
- Files reviewed: 45/80 changed files
- Comments generated: 0 new
- Review effort level: Balanced
…fbc043948212bb25616416 (#39820) ### Packages impacted by this PR - `@azure/ai-projects` ### Issues associated with this PR ### Describe the problem that is addressed by this PR Refreshes the AI Projects client against TypeSpec commit `2041c47aa75ad834eefbc043948212bb25616416` on `feature/ai-projects/2.6.0`. - Regenerated client surface and updated the pinned TypeSpec commit. - Applied required customizations and synchronized changelog, samples, and tests with the emitted API changes. ### 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? - Regenerate from the assigned pinned TypeSpec commit to preserve alignment with the release branch. ### Are there test cases added in this PR? _(If not, why?)_ - Updated tests where required by the regenerated API surface. ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ```powershell npm run generate:client ``` ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR need any fixes in the SDK Generator? _(If so, create an Issue in the [typespec-azure](https://github.com/Azure/typespec-azure) repository and link it here)_ - [x] Added a changelog (if necessary) <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #39819 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: glharper <64209257+glharper@users.noreply.github.com>
### Packages impacted by this PR `@azure/ai-projects` ### Issues associated with this PR Follow-up to the Agent Insights API regeneration in #39797 and the cross-language customization in Azure/azure-sdk-for-python#48795. ### Describe the problem that is addressed by this PR Agent Insights `createRun` is emitted as an LRO that resolves to `AgentInsightRunResult`. That terminal result omits the initial `AgentInsightRun.id`, even though callers need the ID for the paired `getRun` and `cancelRun` operations. The feature branch already routes this operation through `JobPoller`, following the job LRO work in #39237 and #39455, but that exposes an Agent Insights run as `operationState.jobId`. This PR adds the run-specific public shape while keeping the shared implementation generic: - Adds `RunOperationState<TResult>` and `RunPoller<TResult>`, exposing `operationState.runId` after `submitted()` resolves. - Changes `project.beta.agentInsightMonitors.createRun` to return `RunPoller<AgentInsightRunResult>`. - Refactors `JobPoller` and `RunPoller` through one identity-preserving wrapper covering `operationState`, `poll()`, `onProgress()`, serialization, and resume. - Adds focused unit coverage for run IDs, serialized poller restoration, resource-location fallback, and existing `JobPoller` behavior. - Records the customization in the package's post-emitter workaround documentation and skill so regeneration does not remove it. The Agent Insights API is new in the unreleased `2.6.0` feature branch, so replacing its temporary `JobPoller` return type does not break a published API. ### Are there test cases added in this PR? _(If not, why?)_ Yes. `test/public/pollingHelpers.spec.ts` covers the new run poller and regression coverage for job pollers. ### Provide a list of related PRs _(if any)_ - Azure/azure-sdk-for-python#48795 - #39237 - #39455 - #39797 ### Validation - `npm run check-format` - ESLint on all changed TypeScript files - `tsc -p tsconfig.src.json --noEmit` - `tsc -p tsconfig.test.json --noEmit` - `TEST_MODE=playback npm run test:node` - `TEST_MODE=playback npm run test:browser` - `turbo build --filter=@azure/ai-projects... --token 1` - `check-package-version ai -packages azure-ai-projects` Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: da906d50-380f-43e0-bfe1-a5d82afd7ac6
There was a problem hiding this comment.
🟡 Changes recommended
Draft listing support, generation provenance, voice-agent coverage, and published sample outputs remain incomplete.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (2)
sdk/ai/ai-projects/src/classic/agents/index.ts:349
- No test under
test/referencesgenerateAgent, although the PR description says a skipped voice-agent scaffold was added. Add coverage for the generated request, requiredVoiceAgents=V1Previewheader, response deserialization, and service errors; this can use a mocked HTTP client while a live recording is unavailable.
sdk/ai/ai-projects/samples-dev/agents/voiceAgent.ts:23 - This new source sample has no published TypeScript/JavaScript counterpart or generated README entry under
samples/v2. Repository guidance requires runningdev-tool samples publish -fafter changingsamples-dev(documentation/steps-after-generations.md:124-130), otherwise package consumers do not receive the advertised voice-agent sample.
- Files reviewed: 40/67 changed files
- Comments generated: 3
- Review effort level: Balanced
| /** (Preview) Whether this agent version is a draft (candidate) rather than a release. The service defaults to `false` if a value is not specified by the caller. Draft versions are recorded but excluded from default 'latest' resolution and are not auto-promoted. */ | ||
| draft?: boolean; |
## Summary - add an AST-based synchronizer for TypeSpec-backed model removals while preserving unrelated customized declarations - extend post-emitter parity checks to distinguish valid generated removals from destructive source replacement - enforce the customized `src/index.ts` paging imports and reject references to the nonexistent `src/restorePollerHelpers.ts` - document the removal and barrel-preservation workflow in the skill and workaround references - remove Voice Agents classes, (functional test of skill update efficacy) ## Testing - `node --test .github/skills/apply-post-emitter-edits/scripts/sync-generated-model-removals.test.mjs .github/skills/apply-post-emitter-edits/scripts/check-generated-member-parity.test.mjs` (9 passed) - repository Prettier check for all seven changed files - `git diff --check` --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
A critical model-removal bug and unresolved TypeSpec and public API inconsistencies must be fixed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (4)
sdk/ai/ai-projects/CHANGELOG.md:8
- Every changelog bullet must link its associated PR or issue, but this entry has no reference. Append the same PR link used by the related Agent Insights entry.
- Add `RunOperationState` and `RunPoller` types, exposing the `runId` of an Agent Insights run on the poller returned by `project.beta.agentInsightMonitors.createRun`.
sdk/ai/ai-projects/review/ai-projects-browser.api.diff.md:10
- This package's post-emitter cleanup explicitly requires removing
review/ai-projects-browser.api.diff.mdas a stray generated artifact (sdk/ai/ai-projects/.github/skills/apply-post-emitter-edits/SKILL.md:348-362). Updating its hunk offset leaves that cleanup incomplete; delete the file instead.
sdk/ai/ai-projects/review/ai-projects-react-native.api.diff.md:10 - The same cleanup rule requires removing
review/ai-projects-react-native.api.diff.mdbefore the regeneration is complete (sdk/ai/ai-projects/.github/skills/apply-post-emitter-edits/SKILL.md:348-362). Do not commit the regenerated line-number offset; delete this artifact.
sdk/ai/ai-projects/src/classic/agents/index.ts:138 - This new non-beta public feature has no authoritative snippet in
test/snippets.spec.tsand no package README reference; the standalone sample does not participate in the repository's snippet synchronization. Add a named snippet covering the Microsoft 365 publishing flow and reference it from the package README.
- Files reviewed: 43/68 changed files
- Comments generated: 5
- Review effort level: Balanced
| const dependsOnRemoval = [...entry.references].some((name) => plannedNames.has(name)); | ||
| const supportsOnlyRemoval = entry.names.some( | ||
| (name) => removedReferences.has(name) && !survivingReferences.has(name), | ||
| ); | ||
| if (dependsOnRemoval || supportsOnlyRemoval) { |
| /** Optional parameters. */ | ||
| export interface AgentsGenerateAgentOptionalParams extends OperationOptions {} |
| VoiceItemAudioResponse, | ||
| VoiceAudioRole, | ||
| VoiceAudioContainerFormat, | ||
| VoiceAudioCodec, | ||
| VoiceRecordingResponse, |
….6.0 # Conflicts: # sdk/ai/ai-projects/CHANGELOG.md # sdk/ai/ai-projects/package.json # sdk/ai/ai-projects/src/constants.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The advertised generateAgent API is missing, model-removal tooling is unsafe, and changelog issues remain.
Review details
Suppressed comments (6)
sdk/ai/ai-projects/.github/skills/apply-post-emitter-edits/scripts/sync-generated-model-removals.mjs:125
- This reverse dependency check can delete unrelated public custom models. For example, the accompanying test schedules exported
CustomSupportfor removal merely becauseRemovedModelextends it;CustomSupportdoes not depend on the removed declaration and may still be consumed directly. This also contradicts the documented behavior of removing aliases/helpers that depend on removed declarations. Only close over declarations whose own references point to an already planned removal.
const dependsOnRemoval = [...entry.references].some((name) => plannedNames.has(name));
const supportsOnlyRemoval = entry.names.some(
(name) => removedReferences.has(name) && !survivingReferences.has(name),
);
if (dependsOnRemoval || supportsOnlyRemoval) {
sdk/ai/ai-projects/CHANGELOG.md:8
- This changelog entry is the only user-visible entry without a PR or issue link. Add the same PR reference used by the surrounding 2.6.0 feature entries.
- Add `RunOperationState` and `RunPoller` types, exposing the `runId` of an Agent Insights run on the poller returned by `project.beta.agentInsightMonitors.createRun`.
sdk/ai/ai-projects/CHANGELOG.md:3
- Adding
2.6.0 (Unreleased)leaves the empty2.5.1 (Unreleased)section immediately below it, so the changelog now claims two simultaneous unreleased package versions. Remove the superseded empty 2.5.1 section (or date it if it was actually released) before preparing 2.6.0.
## 2.6.0 (Unreleased)
sdk/ai/ai-projects/src/api/agents/options.ts:430
- The PR advertises
project.agents.generateAgent(...)as the voice-agent generation API, but this is an orphan options type: there is nogenerateAgentfunction in the operations barrel, no member onAgentsOperations, and the extracted API report contains no callable method. As written, customers cannot use the headline feature or the example in the PR description. Add the generated/customized operation through the protocol and classic layers (plus the stated sample), or remove this type and correct the PR scope.
sdk/ai/ai-projects/src/classic/agents/index.ts:138 - These new public Microsoft 365 methods are absent from both the package README and
test/snippets.spec.ts. Add a named README snippet (for example,ReadmeSampleMicrosoft365Publishing) and reference it from the README so the new API has a compile-checked usage example; the standalone generated sample does not participate in the snippet synchronization system.
sdk/ai/ai-projects/src/index.ts:633 - The advertised
project.agents.generateAgent(...)API is absent: this options type is the onlyGenerateAgentsymbol insrc, and there is no implementation, client member, voice-agent sample, or test. The pinned TypeSpec commit explicitly disables thevoice-agents/routes.tspimport, and the currentgenerated/tree does not contain this type either, so the example in the PR description cannot compile. Either restore the operation from an appropriate TypeSpec revision with its sample/coverage, or remove the stale option/voice exports and update the PR description.
- Files reviewed: 43/68 changed files
- Comments generated: 0 new
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
A critical unsafe model-removal synchronizer and a draft-pagination header bug remain unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (3)
sdk/ai/ai-projects/CHANGELOG.md:11
- The release notes omit the newly added draft agent-version creation and listing support (
draft,includeDrafts, and the preview opt-in), even though it is a user-visible part of this release. Add it to the 2.6.0 feature list so consumers can discover the new workflow.
- Add hosted-agent session configuration and routine dispatch authorization options. [#39797](https://github.com/Azure/azure-sdk-for-js/pull/39797)
sdk/ai/ai-projects/src/classic/agents/index.ts:138
- These new Microsoft 365 operations have no corresponding example in
test/snippets.spec.tsor snippet reference in the package README. The standalone sample does not update the package's compiled, synchronized README examples; add a snippet covering defaults/package generation/publishing and reference it fromREADME.md.
sdk/ai/ai-projects/src/classic/beta/index.ts:55 - The newly public Agent Insights subclient has no corresponding example in
test/snippets.spec.tsor snippet reference in the package README. Add a snippet demonstrating monitor creation and run polling (includingoperationState.runId) and reference it fromREADME.mdso the new API is documented with compile-checked usage.
- Files reviewed: 42/67 changed files
- Comments generated: 2
- Review effort level: Balanced
| if (ts.isIdentifier(node) && allNames.has(node.text)) { | ||
| references.add(node.text); |
| headers: { | ||
| ...(options?.foundryFeatures !== undefined | ||
| ? { "foundry-features": options?.foundryFeatures } | ||
| : {}), | ||
| accept: "application/json", | ||
| ...options.requestOptions?.headers, |
Packages impacted by this PR
Issues associated with this PR
Describe the problem that is addressed by this PR
The package was generated from an older TypeSpec revision and lacked the latest AI Foundry contracts.
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?
Use standard TypeSpec emission for generated/, then surgically reconcile src/ to retain protected customizations and the existing public client shape.
Are there test cases added in this PR? (If not, why?)
The package build, API extraction, lint, formatting, and focused post-emitter regression tests validate the regenerated and customized surface. Service-backed tests remain skipped until recordings are available.
Provide a list of related PRs (if any)
Command used to generate this PR:(Applicable only to SDK release request PRs)
�ash npm run generate:clientChecklists