mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
AIX: OpenAI does not support Web Search with reasoning:minimal
This commit is contained in:
@@ -107,7 +107,9 @@ export function aixToOpenAIChatCompletions(openAIDialect: OpenAIDialects, model:
|
||||
_fixVndOaiRestoreMarkdown_Inline(payload);
|
||||
}
|
||||
// [OpenAI] Vendor-specific web search context and/or geolocation
|
||||
if (model.vndOaiWebSearchContext || model.userGeolocation) {
|
||||
// NOTE: OpenAI doesn't support web search with minimal reasoning effort
|
||||
const skipWebSearchDueToMinimalReasoning = model.vndOaiReasoningEffort === 'minimal';
|
||||
if ((model.vndOaiWebSearchContext || model.userGeolocation) && !skipWebSearchDueToMinimalReasoning) {
|
||||
payload.web_search_options = {};
|
||||
if (model.vndOaiWebSearchContext)
|
||||
payload.web_search_options.search_context_size = model.vndOaiWebSearchContext;
|
||||
|
||||
@@ -94,7 +94,9 @@ export function aixToOpenAIResponses(model: AixAPI_Model, chatGenerate: AixAPICh
|
||||
}
|
||||
|
||||
// Tool: Search: for search models, and deep research models
|
||||
if (hotFixForceSearchTool || model.vndOaiWebSearchContext || model.userGeolocation) {
|
||||
// NOTE: OpenAI doesn't support web search with minimal reasoning effort
|
||||
const skipWebSearchDueToMinimalReasoning = model.vndOaiReasoningEffort === 'minimal';
|
||||
if ((hotFixForceSearchTool || model.vndOaiWebSearchContext || model.userGeolocation) && !skipWebSearchDueToMinimalReasoning) {
|
||||
if (!payload.tools?.length)
|
||||
payload.tools = [];
|
||||
const webSearchTool: TRequestTool = {
|
||||
|
||||
@@ -145,6 +145,9 @@ export function LLMParametersEditor(props: {
|
||||
const gemTBSpec = modelParamSpec['llmVndGeminiThinkingBudget'];
|
||||
const gemTBMinMax = gemTBSpec?.rangeOverride || defGemTB.range;
|
||||
|
||||
// Check if web search should be disabled due to minimal reasoning effort
|
||||
const isOaiReasoningEffortMinimal = llmVndOaiReasoningEffort4 === 'minimal';
|
||||
|
||||
return <>
|
||||
|
||||
{!temperatureHide && <FormSliderControl
|
||||
@@ -273,7 +276,8 @@ export function LLMParametersEditor(props: {
|
||||
{showParam('llmVndOaiWebSearchContext') && (
|
||||
<FormSelectControl
|
||||
title='Web Search'
|
||||
tooltip='Controls how much context is retrieved from the web (low = default for Perplexity, medium = default for OpenAI). For GPT-5 models, Default=OFF.'
|
||||
tooltip={isOaiReasoningEffortMinimal ? 'Web search is not compatible with minimal reasoning effort' : 'Controls how much context is retrieved from the web (low = default for Perplexity, medium = default for OpenAI). For GPT-5 models, Default=OFF.'}
|
||||
disabled={isOaiReasoningEffortMinimal}
|
||||
value={llmVndOaiWebSearchContext ?? _UNSPECIFIED}
|
||||
onChange={(value) => {
|
||||
if (value === _UNSPECIFIED || !value)
|
||||
@@ -289,7 +293,8 @@ export function LLMParametersEditor(props: {
|
||||
<FormSwitchControl
|
||||
title='Add User Location'
|
||||
description='Use approximate location for better search results'
|
||||
tooltip='When enabled, uses browser geolocation API to provide approximate location data to improve search results relevance'
|
||||
tooltip={isOaiReasoningEffortMinimal ? 'Web search geolocation is not compatible with minimal reasoning effort' : 'When enabled, uses browser geolocation API to provide approximate location data to improve search results relevance'}
|
||||
disabled={isOaiReasoningEffortMinimal}
|
||||
checked={!!llmVndOaiWebSearchGeolocation}
|
||||
onChange={checked => {
|
||||
if (!checked)
|
||||
|
||||
Reference in New Issue
Block a user