Remove xAI web search capability (#5255)

With web search on, the API now returns 410 Gone.
This commit is contained in:
equal-l2
2026-03-07 23:58:56 +09:00
committed by GitHub
parent f20aed95d0
commit e834d3724b
2 changed files with 1 additions and 12 deletions
+1 -1
View File
@@ -1982,7 +1982,7 @@
</span> </span>
</div> </div>
</div> </div>
<div class="range-block" data-source="makersuite,vertexai,aimlapi,openrouter,claude,xai,electronhub,chutes,nanogpt"> <div class="range-block" data-source="makersuite,vertexai,aimlapi,openrouter,claude,electronhub,chutes,nanogpt">
<label for="openai_enable_web_search" class="checkbox_label flexWrap widthFreeExpand"> <label for="openai_enable_web_search" class="checkbox_label flexWrap widthFreeExpand">
<input id="openai_enable_web_search" type="checkbox" /> <input id="openai_enable_web_search" type="checkbox" />
<span data-i18n="Enable web search">Enable web search</span> <span data-i18n="Enable web search">Enable web search</span>
@@ -1154,17 +1154,6 @@ async function sendXaiRequest(request, response) {
bodyParams['reasoning_effort'] = request.body.reasoning_effort === 'high' ? 'high' : 'low'; bodyParams['reasoning_effort'] = request.body.reasoning_effort === 'high' ? 'high' : 'low';
} }
if (request.body.enable_web_search) {
bodyParams['search_parameters'] = {
mode: 'on',
sources: [
{ type: 'web', safe_search: false },
{ type: 'news', safe_search: false },
{ type: 'x' },
],
};
}
if (request.body.json_schema) { if (request.body.json_schema) {
bodyParams['response_format'] = { bodyParams['response_format'] = {
type: 'json_schema', type: 'json_schema',