Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🔍 fix: Anthropic Web Search Multi-Turn Issue and Attachment Results (#12651)
Danny Avila60cee6eec711
diff --git a/api/package.json b/api/package.jsonindex de58e79af4..add7637189 100644--- a/api/package.json+++ b/api/package.json@@ -44,7 +44,7 @@"@google/genai": "^1.19.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.80",- "@librechat/agents": "^3.1.64",+ "@librechat/agents": "^3.1.65","@librechat/api": "*","@librechat/data-schemas": "*","@microsoft/microsoft-graph-client": "^3.0.7",@@ -82,7 +82,7 @@"librechat-data-provider": "*","lodash": "^4.17.23","mammoth": "^1.11.0",- "mathjs": "^15.1.0",+ "mathjs": "^15.2.0","meilisearch": "^0.38.0","memorystore": "^1.6.7","mime": "^3.0.0",diff --git a/client/src/components/Chat/Messages/Content/WebSearch.tsx b/client/src/components/Chat/Messages/Content/WebSearch.tsxindex 48e305a8a1..e4029193cc 100644--- a/client/src/components/Chat/Messages/Content/WebSearch.tsx+++ b/client/src/components/Chat/Messages/Content/WebSearch.tsx@@ -92,10 +92,19 @@ export default function WebSearch({const localize = useLocalize();const { searchResults } = useSearchContext();const error = typeof output === 'string' && output.toLowerCase().includes('error processing');- const cancelled = (!isSubmitting && progress < 1) || error === true;- const complete = !isLast && progress === 1;- const finalizing = isSubmitting && isLast && progress === 1;+ // Server tool calls (srvtoolu_) never receive ON_RUN_STEP_COMPLETED, so progress+ // stays at the default 0.1. Treat the search as complete if attachments have results.+ const hasResults = useMemo(+ () =>+ attachments?.some((att) => att.type === Tools.web_search && att[Tools.web_search]) ?? false,+ [attachments],+ );+ const effectiveProgress = hasResults && !isSubmitting ? 1 : progress;+ const cancelled = (!isSubmitting && effectiveProgress < 1) || error === true;++ const complete = !isLast && effectiveProgress === 1;+ const finalizing = isSubmitting && isLast && effectiveProgress === 1;const ownTurn = useMemo((): string => {if (!attachments) {diff --git a/package-lock.json b/package-lock.jsonindex 04de36277a..8b9406041e 100644--- a/package-lock.json+++ b/package-lock.json@@ -59,7 +59,7 @@"@google/genai": "^1.19.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.80",- "@librechat/agents": "^3.1.64",+ "@librechat/agents": "^3.1.65","@librechat/api": "*","@librechat/data-schemas": "*","@microsoft/microsoft-graph-client": "^3.0.7",@@ -97,7 +97,7 @@"librechat-data-provider": "*","lodash": "^4.17.23","mammoth": "^1.11.0",- "mathjs": "^15.1.0",+ "mathjs": "^15.2.0","meilisearch": "^0.38.0","memorystore": "^1.6.7","mime": "^3.0.0",@@ -11859,9 +11859,9 @@}},"node_modules/@librechat/agents": {- "version": "3.1.64",- "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.1.64.tgz",- "integrity": "sha512-T3w4dTKaFM1VP5ubnOMyp/moG3lFACJnkl6+B1WfwJ4CkTw0PKqUg7IwDaI9eO6JvQukbFabR9BYtE4iCBX2kg==",+ "version": "3.1.65",+ "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.1.65.tgz",+ "integrity": "sha512-XkyFmTsyQahnL5BwWuxcVa0ehqaD8TOypIeDk6pC0B8tLEn3rJSWEqNd3J6E5leI79J4DoHvZheboUoKzYdeMQ==","license": "MIT","dependencies": {"@anthropic-ai/sdk": "^0.73.0",@@ -11887,7 +11887,7 @@"cheerio": "^1.0.0","dotenv": "^16.4.7","https-proxy-agent": "^7.0.6",- "mathjs": "^15.1.0",+ "mathjs": "^15.2.0","nanoid": "^3.3.7","okapibm25": "^1.4.1","openai": "5.8.2"@@ -32612,9 +32612,9 @@}},"node_modules/mathjs": {- "version": "15.1.0",- "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-15.1.0.tgz",- "integrity": "sha512-HfnAcScQm9drGryodlDqeS3WAl4gUTYGDcOtcqL/8s23MZ28Ib1i8XnYK3ZdjNuaW/L4BAp9lIp8vxAMrcuu1w==",+ "version": "15.2.0",+ "resolved": "https://registry.npmjs.org/mathjs/-/mathjs-15.2.0.tgz",+ "integrity": "sha512-UAQzSVob9rNLdGpqcFMYmSu9dkuLYy7Lr2hBEQS5SHQdknA9VppJz3cy2KkpMzTODunad6V6cNv+5kOLsePLow==","license": "Apache-2.0","dependencies": {"@babel/runtime": "^7.26.10",@@ -44212,7 +44212,7 @@"@google/genai": "^1.19.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.80",- "@librechat/agents": "^3.1.64",+ "@librechat/agents": "^3.1.65","@librechat/data-schemas": "*","@modelcontextprotocol/sdk": "^1.27.1","@smithy/node-http-handler": "^4.4.5",@@ -44233,7 +44233,7 @@"keyv-file": "^5.1.2","librechat-data-provider": "*","mammoth": "^1.11.0",- "mathjs": "^15.1.0",+ "mathjs": "^15.2.0","memorystore": "^1.6.7","mongoose": "^8.12.1","node-fetch": "2.7.0",diff --git a/packages/api/package.json b/packages/api/package.jsonindex 6f9ad0ea7e..20cee98ce3 100644--- a/packages/api/package.json+++ b/packages/api/package.json@@ -95,7 +95,7 @@"@google/genai": "^1.19.0","@keyv/redis": "^4.3.3","@langchain/core": "^0.3.80",- "@librechat/agents": "^3.1.64",+ "@librechat/agents": "^3.1.65","@librechat/data-schemas": "*","@modelcontextprotocol/sdk": "^1.27.1","@smithy/node-http-handler": "^4.4.5",@@ -116,7 +116,7 @@"keyv-file": "^5.1.2","librechat-data-provider": "*","mammoth": "^1.11.0",- "mathjs": "^15.1.0",+ "mathjs": "^15.2.0","memorystore": "^1.6.7","mongoose": "^8.12.1","node-fetch": "2.7.0",