Remove xAI web search capability (#5255) With web search on, the API now returns 410 Gone.
Signed| @@ -1982,7 +1982,7 @@ | ||
| 1982 | 1982 | </span> |
| 1983 | 1983 | </div> |
| 1984 | 1984 | </div> |
| 1985 | 1985 | <div class="range-block" data-source="makersuite,vertexai,aimlapi,openrouter,claude,xai,electronhub,chutes,nanogpt"> |
| 1986 | 1986 | <label for="openai_enable_web_search" class="checkbox_label flexWrap widthFreeExpand"> |
| 1987 | 1987 | <input id="openai_enable_web_search" type="checkbox" /> |
| 1988 | 1988 | <span data-i18n="Enable web search">Enable web search</span> |
| @@ -1154,17 +1154,6 @@ async function sendXaiRequest(request, response) { | ||
| 1154 | 1154 | bodyParams['reasoning_effort'] = request.body.reasoning_effort === 'high' ? 'high' : 'low'; |
| 1155 | 1155 | } |
| 1156 | 1156 | |
| 1157 | - if (request.body.enable_web_search) { | |
| 1158 | - bodyParams['search_parameters'] = { | |
| 1159 | - mode: 'on', | |
| 1160 | - sources: [ | |
| 1161 | - { type: 'web', safe_search: false }, | |
| 1162 | - { type: 'news', safe_search: false }, | |
| 1163 | - { type: 'x' }, | |
| 1164 | - ], | |
| 1165 | - }; | |
| 1166 | - } | |
| 1167 | - | |
| 1168 | 1157 | if (request.body.json_schema) { |
| 1169 | 1158 | bodyParams['response_format'] = { |
| 1170 | 1159 | type: 'json_schema', |