Skip to content

.NET: [Bug]: Request processing fails when web search is enabled beca… - #7611

Open
feiyun0112 wants to merge 1 commit into
microsoft:mainfrom
feiyun0112:issues/7578
Open

.NET: [Bug]: Request processing fails when web search is enabled beca…#7611
feiyun0112 wants to merge 1 commit into
microsoft:mainfrom
feiyun0112:issues/7578

Conversation

@feiyun0112

Copy link
Copy Markdown
Contributor

fix #7578

…use of an unsupported web_search_options parameter
Copilot AI balanced review requested due to automatic review settings August 11, 2026 03:06
@feiyun0112
feiyun0112 deployed to github-app-auth August 11, 2026 03:06 — with GitHub Actions Active
@feiyun0112
feiyun0112 deployed to github-app-auth August 11, 2026 03:06 — with GitHub Actions Active
@feiyun0112
feiyun0112 deployed to github-app-auth August 11, 2026 03:06 — with GitHub Actions Active
@agent-framework-automation agent-framework-automation Bot added the .NET Usage: [Issues, PRs], Target: .Net label Aug 11, 2026
@feiyun0112
feiyun0112 deployed to github-app-auth August 11, 2026 03:07 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Surfaces web_search_options in Chat Completions request mapping and rejects it by default.

Changes:

  • Exposes web-search options to mapping callbacks.
  • Adds default rejection and an endpoint test.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
OpenAIMapOptionsTests.cs Tests rejection of web-search options.
OpenAIChatCompletionsMapOptions.cs Marks web-search options unsupported by default.
OpenAIChatCompletionRequestInfo.cs Exposes web-search options.
ChatClientAgentRunOptionsConverter.cs Copies web-search options into request information.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

new StringContent("""{"model":"myModel","messages":[{"role":"user","content":"hello"}],"web_search_options":{}}""", Encoding.UTF8, "application/json"));

// Assert
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: [Bug]: Request processing fails when web search is enabled because of an unsupported web_search_options parameter

2 participants