Repository navigation
[Content Safety] Evolve Unified Moderate to Agent Hooks-native preview - #47138
Conversation
Add a separate AgentContext-in/Verdict-out operation and client in 2026-11-01-preview. Preserve published Unified Moderate contracts and generate OpenAPI plus native lifecycle and verdict examples. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Next Steps to MergeNext steps that must be taken to merge this PR:
Important checks have failed. As of today they are not blocking this PR, but in near future they may. Addressing the following failures is highly recommended:
Comment generated by summarize-checks workflow run. |
Contributor readiness: required accessWarning Access issues can block approvals, Azure DevOps pipelines, or labeling.
Internal contributors: set up / renew access. Recheck: Contributors with verified access (18)Public Azure membership and repository write access verified.
Non-blocking check; fix access issues to unblock affected actions. Last updated: 2026-10-19T17:06:22.977Z |
TypeSpec suppressions requiring reviewStatus: ❌ Approval required — 14 suppressions This PR adds or updates the TypeSpec suppressions listed below. Suppressions are strongly discouraged — they bypass linter rules that protect API quality and consistency. Authors should avoid adding new suppressions and prefer fixing the underlying issue; reviewers should approve only when there is a clear, compelling justification and no reasonable alternative. Review each linked rule and source location, then apply New suppressions (14)
Showing 5 of 14 suppressions. See the full analysis log for the complete list. For an overview of TypeSpec linting rules click here. 💬 Have feedback on the TypeSpec suppression flow? Let us know. |
Keep all explicit older version tags while pointing the default tag to the newly generated November preview, as required by Avocado. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
Comment generated by After APIView workflow run. |
Rename only the unpublished native evaluation preview and regenerate its OpenAPI and examples. Preserve published contracts and the existing client's September dependency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Use the existing operation and route in the October preview, preserve released contracts byte-for-byte, and remove the separate evaluation operation/client. Retain only a namespaced AACS classifier-role bridge grounded in existing non-Hooks flows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Expand Azure AI Content Safety and Azure OpenAI in new public descriptions. Distinguish protected-resource targets from policy and binding objects, document paired selectors and authenticated scope, and preserve canonical wire names, schema shapes and released versions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Restore the protected root spelling configuration and keep the service acronym in the Cognitive Services dictionary. Document AACS effective-policy composition separately from host composition and enforcement; preserve all wire shapes and transform/null semantics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Keep the canonical Agent Hooks Verdict closed inside a versioned transport result, require exact developer-policy revision selection, and define the policy/readiness receipt and fail-closed error contract. Preserve the existing public ordinal harm summaries as receipt metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Avoid the recursive Azure inner-error projection that produces unresolved client placeholders while retaining typed actionable error codes and nested details. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3ef7356a-fe29-4fdb-99eb-5dcdb03e8e7c
Use the existing yaml runtime dependency and cover policy-file loading with regression tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2c14a849-7b23-4efc-bf0f-4e287ef79986
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1082e96-4bbf-4958-b7a0-39f2d6368808
Data-Plane API ReviewAutomated advisory review by Copilot. This is one non-deterministic pass over a No findings in the reviewed scope. Not reviewed: deterministic compiler/linter concerns, naming and
|
Joel Hendrix (jhendrixMSFT)
left a comment
There was a problem hiding this comment.
Note that when you merge these changes to main you'll want to separate your ARM and data-plane content into separate PRs.
ff7cc34
into
swagger-agent/CogSvc-2026-11-15-preview-typespec
| using Azure.ClientGenerator.Core; | ||
|
|
||
| @TypeSpec.Versioning.useDependency(ContentSafety.Versions.v2026_09_01_preview) | ||
| @TypeSpec.Versioning.useDependency(ContentSafety.Versions.v2026_10_15_preview) |
There was a problem hiding this comment.
Comment 3 — Green .NET validation contains a failed build
The .NET SDK validation check is green, but its generation log contains Build FAILED. PreviewOperationsTests.cs:43–61 fails with CS0246/CS0103 because the regenerated surface no longer contains UnifiedModerateConfig, UnifiedModerateSource, UnifiedModerateResult, UnifiedModerateVerdict, and AcsDecision.
The package is subsequently classified as result [warning], so the successful overall check conceals a real SDK test-project compilation failure associated with switching the client to the October preview.
Summary
Adds
2026-10-15-previewto the existingPOST /contentsafety/content:unifiedModerateroute. Earlier API versions and theUnifiedOperations_UnifiedModerateoperation ID are unchanged.The request uses the Agent Hooks 0.1
AgentContext. The response contains a closed Agent Hooksverdictand a separate evaluationreceipt.Policy selection
The operation supports two mutually exclusive selector profiles:
targetResourceIdwith the completeselectedPolicyId,selectedPolicyRevision, andselectedPolicySemanticDigesttuple.policyId.Foundry requests evaluate the selected Guardrail and any administrator policies bound to the target hierarchy. Each evaluated policy remains a separate receipt layer.
Evaluation receipt
The receipt includes:
The selected-policy fields replace the previous
developerPolicy*selectors.manifestRegoDigestis renamed toactivatedArtifactDigest. Generated-policy identity,appliedGeneration,bindingEpoch,readinessEpoch,capabilityVersion, andsupportedInterventionPointsare removed from the receipt.Eight-point authoring
The
2026-11-15-previewcontrol-plane models support these ACS intervention bindings:agent_startup:$snap.agent_init(agent_init)input:$snap.input(user_input)pre_model_call:$snap.messages(messages)post_model_call:$snap.response(model_response)pre_tool_call:$snap.tool_call.args(tool_args)post_tool_call:$snap.tool_result.value(tool_result)output:$snap.output(assistant_output)agent_shutdown:$snap.summary(agent_summary)The four added lifecycle and model binding models use their point-specific target and target kind. The existing
2026-09-15-previewinput, output, and tool binding schemas remain unchanged. In2026-11-15-preview, tool-name selectors remain available on the pre-tool and post-tool bindings. TheRaiPolicyContentSourcemodel includesAgentStartup,PreModelCall,PostModelCall, andAgentShutdownwhile retainingPrompt,Completion,PreToolCall,PostToolCall,PreRun, andPostRun.Examples and validation support