.NET: Use Responses API for hosted web search in AG-UI - #7843
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
Copilot-Session: 2b346dcb-1702-4296-bf22-b434b73fd26c
|
/review |
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: Findings reported
Scope: full PR (4 commit(s)): c0a5259a3ec2, 011496904bb2, 3f197c8c812a, 9dfa3afdfcc9
Model: gpt-5.6-sol
Overview
The PR correctly moves hosted web search to the Responses API, and the new transport-level test verifies the /v1/responses route and web_search tool shape while excluding the unsupported Chat Completions parameter. The Azure endpoint and bearer-token setup are documented clearly. However, the default stored-output Responses client makes the sample's session continuity depend on service-side response retention rather than the configured session store.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.
Affected areas: dotnet/samples/05-end-to-end/AGUIClientServer/AGUIServer/Program.cs
Copilot-Session: 2b346dcb-1702-4296-bf22-b434b73fd26c
Motivation & Context
HostedWebSearchToolusesweb_search_optionswith Chat Completions. Azure OpenAI deployments can reject that parameter with HTTP 400. The AG-UI server sample needs the Responses API wire format, where web search appears in thetoolsarray.Description & Review Guide
OpenAISDK directly withBearerTokenPolicyand a Responses client. The sample no longer depends onAzure.AI.OpenAI. Documentation now explains the Azure OpenAI v1 endpoint and distinguishes direct inference from a Foundry project. Unit coverage captures the outbound request and confirmstools[].typeisweb_searchwhileweb_search_optionsis absent.Related Issue
Fixes #7578
Contribution Checklist