From 2f018dce9fa9b38422f411fbe7a28dbc7690043b Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Mon, 2 Mar 2026 19:11:34 -0800 Subject: [PATCH] AIX: do not set a default fox max anymore - as the underlying APIs may change and it's a user param now. #1004 --- .../chatGenerate/adapters/anthropic.messageCreate.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/aix/server/dispatch/chatGenerate/adapters/anthropic.messageCreate.ts b/src/modules/aix/server/dispatch/chatGenerate/adapters/anthropic.messageCreate.ts index deb88a701..436ebc2c2 100644 --- a/src/modules/aix/server/dispatch/chatGenerate/adapters/anthropic.messageCreate.ts +++ b/src/modules/aix/server/dispatch/chatGenerate/adapters/anthropic.messageCreate.ts @@ -7,8 +7,8 @@ import { aixSpillShallFlush, aixSpillSystemToUser, approxDocPart_To_String, appr // configuration -const DEFAULT_WEB_FETCH_MAX_USES = 5; -const DEFAULT_WEB_SEARCH_MAX_USES = 10; +// const DEFAULT_WEB_FETCH_MAX_USES = 5; // we don't set a default anymore, we let it be +// const DEFAULT_WEB_SEARCH_MAX_USES = 10; // we don't set a default anymore, we let it be const hotFixImagePartsFirst = true; const hotFixMapModelImagesToUser = true; const hotFixDisableThinkingWhenToolsForced = true; // "Thinking may not be enabled when tool_choice forces tool use." @@ -218,7 +218,8 @@ export function aixToAnthropicMessageCreate(model: AixAPI_Model, _chatGenerate: hostedTools.push({ type: 'web_search_20250305', name: 'web_search', - max_uses: model.vndAntWebSearchMaxUses ?? DEFAULT_WEB_SEARCH_MAX_USES, // Allow up to 10 searches by default + ...(model.vndAntWebSearchMaxUses !== undefined ? { max_uses: model.vndAntWebSearchMaxUses } : {}), // Allow up to 10 searches by default + // max_uses: model.vndAntWebSearchMaxUses ?? DEFAULT_WEB_SEARCH_MAX_USES, // Allow up to 10 searches by default // Pass user geolocation for location-aware search results ...(model.userGeolocation ? { user_location: { type: 'approximate' as const, ...model.userGeolocation }, @@ -231,7 +232,8 @@ export function aixToAnthropicMessageCreate(model: AixAPI_Model, _chatGenerate: hostedTools.push({ type: 'web_fetch_20250910', name: 'web_fetch', - max_uses: model.vndAntWebFetchMaxUses ?? DEFAULT_WEB_FETCH_MAX_USES, // Allow up to 5 fetches by default + ...(model.vndAntWebFetchMaxUses !== undefined ? { max_uses: model.vndAntWebFetchMaxUses } : {}), // Allow up to 5 fetches by default + // max_uses: model.vndAntWebFetchMaxUses ?? DEFAULT_WEB_FETCH_MAX_USES, // Allow up to 5 fetches by default citations: { enabled: true }, // Enable citations }); }