Skip to content

Feat/Reasoning Support, Migrate LangChain to v1, Upgrade AI SDKs and Models#5893

Draft
HenryHengZJ wants to merge 12 commits intomainfrom
chore/Langchain-V1
Draft

Feat/Reasoning Support, Migrate LangChain to v1, Upgrade AI SDKs and Models#5893
HenryHengZJ wants to merge 12 commits intomainfrom
chore/Langchain-V1

Conversation

@HenryHengZJ
Copy link
Contributor

@HenryHengZJ HenryHengZJ commented Mar 4, 2026

This PR upgrades the entire LangChain ecosystem from v0.3.x to v1.x, updates related SDKs (OpenAI, Anthropic, Mistral, etc.), deprecates legacy LLM nodes in favor of Chat Models, removes obsolete agents, and adds reasoning/thinking support to the UI and backend.

Key Changes

LangChain v1 Upgrade (270 files changed, ~5,900 additions / ~5,300 deletions)

  • @langchain/core: 0.3.611.1.20
  • langchain: ^0.3.51.2.18
  • @langchain/openai: 0.6.31.2.5
  • @langchain/anthropic: 0.3.331.3.20
  • @langchain/google-genai: 0.2.32.1.15
  • All other @langchain/* scoped packages upgraded to their respective v1 releases
  • New packages added: @langchain/deepseek, @langchain/classic, @langchain/redis, @langchain/tavily, @langchain/textsplitters

SDK Upgrades

  • openai: 4.96.06.19.0
  • @anthropic-ai/sdk: added at ^0.73.0
  • @mistralai/mistralai: 0.1.31.14.0
  • @aws-sdk/client-bedrock-runtime: 3.422.03.966.0
  • langsmith: 0.1.60.4.12
  • zod: 3.22.4^3.25.76 || ^4
  • uuid: ^9.0.1^10.0.0 (across all packages)

Deprecate Legacy LLM Nodes

All LLM nodes now display a DEPRECATING badge with a message pointing users to the equivalent Chat Model:

  • AWS Bedrock, Azure OpenAI, Cohere, Fireworks, GoogleVertexAI, HuggingFace Inference, IBM Watsonx, Ollama, OpenAI, SambaNova, TogetherAI

Remove Obsolete Agents

  • AutoGPT — fully removed
  • BabyAGI — fully removed

Remove Deprecated Utilities

  • Google Generative AI Context Cache — removed (FlowiseGoogleAICacheManager, GoogleGenerativeAIContextCache)
  • ChatGoogleGenerativeAI custom utils — removed utils/common.ts, utils/output_parsers.ts, utils/tools.ts, utils/types.ts, utils/zod_to_genai_parameters.ts (replaced by upstream @langchain/google-genai v2)
  • Unstructured Folder loader — removed UnstructuredFolder.ts

Reasoning / Thinking Support

  • New ThinkingCard UI component — collapsible card that displays model reasoning content (thinking tokens) with duration indicator, auto-expands while thinking
  • New reasonContent field on ChatMessage entity with DB migrations for SQLite, Postgres, MySQL, and MariaDB
  • SSE & Redis streaming — added streamThinkingEvent to both SSEStreamer and RedisEventPublisher for real-time thinking token delivery
  • Token cost trackingusageMetadata now includes token cost information
  • Agent & LLM agentflow nodes — updated to support reasoning capability
image

Chat Model Updates

  • ChatOpenAI and AzureChatOpenAI — refactored for OpenAI SDK v6 compatibility, updated model lists
  • ChatAnthropic — updated for @langchain/anthropic v1 API changes
  • ChatGoogleGenerativeAI — major rewrite of FlowiseChatGoogleGenerativeAI to use upstream v2 SDK
  • Import path updates across ~200+ node files to match new @langchain/* v1 module structure

Test Plan

  • Verify all Chat Model nodes (OpenAI, Anthropic, Google, Azure, Ollama, etc.) initialize and complete inference correctly
  • Confirm deprecated LLM nodes show DEPRECATING badge and still function
  • Test reasoning/thinking display in chat UI with models that support extended thinking (e.g., Claude 3.5, DeepSeek-R1)
  • Run DB migrations on a fresh database for each supported dialect (SQLite, Postgres, MySQL, MariaDB)
  • Validate SSE streaming and Redis event streaming for thinking events
  • Test agentflow Agent and LLM nodes with reasoning capability enabled
  • Ensure AutoGPT and BabyAGI are no longer available in the node picker
  • Verify image uploads/generation working correctly
  • Test Agent with built-in tools (OpenAI, Anthropic, Gemini)
  • Test Qdrant/Redis vector stores
  • Test Upsert API
  • Test ToolAgent in Chatflow
  • Test Record Manager
  • Test Agent node working with Document Stores
  • Follow-up prompt
  • Structured output from Agent/LLM nodes

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on modernizing the codebase by migrating to Langchain V1 and incorporating new AI models. It also enhances the Agentflow component with improved reasoning capabilities and deprecates older agent implementations in favor of newer, more flexible solutions. The changes aim to improve the performance, maintainability, and user experience of the Flowise platform.

Highlights

  • Langchain V1 Migration: This PR migrates the codebase to use Langchain V1, updating dependencies and code to align with the new version.
  • Model Updates: The PR updates the available models and their associated costs, including new Claude, Gemini, and GPT models.
  • Agentflow Enhancements: The Agentflow component is enhanced with reasoning content and duration tracking, improving the agent's ability to provide insights into its thought process.
  • Deprecated Agents: The AutoGPT and BabyAGI agents are being deprecated in favor of the Agent from AgentFlow. Also, the OpenAI Assistant is being deprecated in favor of the Custom Assistant.
  • Component Label Updates: Several components have had their labels updated for clarity and consistency (e.g., 'ChatOpenAI' to 'OpenAI').
Changelog
  • package.json
    • Updated dependencies to Langchain V1 and other related packages.
    • Added resolutions for @anthropic-ai/sdk and uuid.
    • Updated openai to version 6.19.0.
  • packages/agentflow/README.md
    • Synchronized the README.md file with the latest changes.
  • packages/agentflow/package.json
    • Updated uuid dependency to version 10.0.0.
    • Removed @types/uuid dev dependency.
  • packages/components/credentials/AzureOpenAIApi.credential.ts
    • Updated the placeholder for Azure OpenAI Api Version to '2024-10-21'.
    • Updated the description link to the API version lifecycle.
  • packages/components/models.json
    • Added new Claude 4.6 Opus and Sonnet models for AWS ChatBedrock and ChatAnthropic.
    • Added new models o3, o3-pro, o4-mini, and codex-mini.
    • Added new models gpt-4.1-nano and gpt-5-pro.
    • Added gemini-3.1-pro-preview to chatGoogleGenerativeAI and chatGoogleVertexAI.
    • Added claude-opus-4-6 and claude-sonnet-4-6 to chatAnthropic.
    • Added o4-mini (latest) model.
    • Removed o4-mini model.
  • packages/components/nodes/agentflow/Agent/Agent.ts
    • Imported ContentBlock from langchain.
    • Added reasoning content and duration tracking to the Agentflow node.
    • Added cost metadata calculation.
  • packages/components/nodes/agentflow/LLM/LLM.ts
    • Added reasoning content extraction and streaming to the LLM node.
    • Added cost metadata calculation.
  • packages/components/nodes/agentflow/utils.ts
    • Removed imageResolution parameter from addImagesToMessages function.
  • packages/components/nodes/agents/AirtableAgent/AirtableAgent.ts
    • Deprecated Airtable Agent and added deprecation message.
  • packages/components/nodes/agents/AutoGPT/*
    • Removed AutoGPT agent files and assets, marking it as deprecated.
  • packages/components/nodes/agents/BabyAGI/*
    • Removed BabyAGI agent files and assets, marking it as deprecated.
  • packages/components/nodes/agents/CSVAgent/CSVAgent.ts
    • Migrated from langchain/agents and langchain/chains to @langchain/classic/agents and @langchain/classic/chains.
  • packages/components/nodes/agents/ConversationalAgent/ConversationalAgent.ts
    • Migrated from langchain/agents to @langchain/classic/agents.
    • Deprecated Conversational Agent and added deprecation message.
  • packages/components/nodes/agents/ConversationalRetrievalToolAgent/ConversationalRetrievalToolAgent.ts
    • Migrated from langchain/agents to @langchain/classic/agents.
  • packages/components/nodes/agents/OpenAIAssistant/OpenAIAssistant.ts
    • Deprecated OpenAI Assistant and added deprecation message.
    • Fixed a bug in clearing OpenAI threads.
  • packages/components/nodes/agents/ReActAgentChat/ReActAgentChat.ts
    • Migrated from langchain/agents to @langchain/classic/agents.
    • Deprecated ReAct Agent for Chat Models and added deprecation message.
  • packages/components/nodes/agents/ReActAgentLLM/ReActAgentLLM.ts
    • Migrated from langchain/agents to @langchain/classic/agents.
    • Deprecated ReAct Agent for LLMs and added deprecation message.
  • packages/components/nodes/agents/ToolAgent/ToolAgent.ts
    • Migrated from langchain/agents to @langchain/classic/agents.
  • packages/components/nodes/agents/XMLAgent/XMLAgent.ts
    • Migrated from langchain/agents to @langchain/classic/agents.
  • packages/components/nodes/cache/GoogleGenerativeAIContextCache/*
    • Removed GoogleGenerativeAIContextCache files and assets.
  • packages/components/nodes/cache/InMemoryCache/InMemoryEmbeddingCache.ts
    • Migrated from langchain/embeddings to @langchain/classic/embeddings.
  • packages/components/nodes/cache/RedisCache/RedisEmbeddingsCache.ts
    • Migrated from langchain/embeddings to @langchain/classic/embeddings.
    • Replaced insecureHash with sha256 for key encoding.
  • packages/components/nodes/chains/ApiChain/*
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/chains/ConversationChain/ConversationChain.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/chains/ConversationalRetrievalQAChain/ConversationalRetrievalQAChain.ts
    • Migrated from langchain/chains to @langchain/classic/chains and langchain/memory to @langchain/classic/memory.
  • packages/components/nodes/chains/LLMChain/LLMChain.ts
    • Migrated from langchain/chains to @langchain/classic/chains and langchain/output_parsers to @langchain/classic/output_parsers.
  • packages/components/nodes/chains/MultiPromptChain/MultiPromptChain.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/chains/MultiRetrievalQAChain/MultiRetrievalQAChain.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/chains/RetrievalQAChain/RetrievalQAChain.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/chains/SqlDatabaseChain/SqlDatabaseChain.ts
    • Migrated from langchain/chains/sql_db to @langchain/classic/chains/sql_db and langchain/sql_db to @langchain/classic/sql_db.
  • packages/components/nodes/chains/VectaraChain/VectaraChain.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/chains/VectorDBQAChain/VectorDBQAChain.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/chatmodels/AWSBedrock/AWSChatBedrock.ts
    • Updated AWS Bedrock node label from 'AWS ChatBedrock' to 'AWS Bedrock'.
  • packages/components/nodes/chatmodels/AzureChatOpenAI/AzureChatOpenAI.ts
    • Updated Azure ChatOpenAI node label from 'Azure ChatOpenAI' to 'Azure OpenAI'.
    • Added freeSolo to Model Name input.
    • Updated description for Base Path and Base Options inputs.
    • Removed Image Resolution input.
    • Updated description for Reasoning and Reasoning Effort inputs.
  • packages/components/nodes/chatmodels/ChatAlibabaTongyi/ChatAlibabaTongyi.ts
    • Updated ChatAlibabaTongyi node label from 'ChatAlibabaTongyi' to 'Alibaba Tongyi'.
  • packages/components/nodes/chatmodels/ChatAnthropic/ChatAnthropic.ts
    • Updated ChatAnthropic node label from 'ChatAnthropic' to 'Anthropic Claude'.
    • Added new inputs for extended thinking and adaptive thinking.
  • packages/components/nodes/chatmodels/ChatBaiduWenxin/ChatBaiduWenxin.ts
    • Updated ChatBaiduWenxin node label from 'ChatBaiduWenxin' to 'Baidu Wenxin'.
  • packages/components/nodes/chatmodels/ChatCerebras/ChatCerebras.ts
    • Updated ChatCerebras node label from 'ChatCerebras' to 'Cerebras'.
    • Updated description for Base Path and added description for Base Options.
  • packages/components/nodes/chatmodels/ChatCloudflareWorkersAI/ChatCloudflareWorkersAI.ts
    • Updated ChatCloudflareWorkersAI node label from 'ChatCloudflareWorkersAI' to 'Cloudflare Workers AI'.
  • packages/components/nodes/chatmodels/ChatCohere/ChatCohere.ts
    • Updated ChatCohere node label from 'ChatCohere' to 'Cohere'.
  • packages/components/nodes/chatmodels/ChatCometAPI/ChatCometAPI.ts
    • Updated ChatCometAPI node label from 'ChatCometAPI' to 'Comet'.
  • packages/components/nodes/chatmodels/ChatFireworks/ChatFireworks.ts
    • Updated ChatFireworks node label from 'ChatFireworks' to 'Fireworks AI'.
  • packages/components/nodes/chatmodels/ChatGoogleGenerativeAI/ChatGoogleGenerativeAI.ts
    • Updated ChatGoogleGenerativeAI node label from 'ChatGoogleGenerativeAI' to 'Google Gemini'.
    • Added new inputs for thinking budget and thinking level.
  • packages/components/nodes/chatmodels/ChatLitellm/ChatLitellm.ts
    • Updated ChatLitellm node label from 'ChatLitellm' to 'LiteLLM'.
    • Removed Image Resolution input.
  • packages/components/nodes/chatmodels/ChatNemoGuardrails/ChatNemoGuardrails.ts
    • Updated ChatNemoGuardrails node label from 'Chat Nemo Guardrails' to 'Nemo Guardrails'.
  • packages/components/nodes/chatmodels/ChatNvdiaNIM/ChatNvdiaNIM.ts
    • Updated ChatNvdiaNIM node label from 'Chat NVIDIA NIM' to 'Nvidia NIM'.
  • packages/components/nodes/chatmodels/ChatOllama/ChatOllama.ts
    • Updated ChatOllama node label from 'ChatOllama' to 'Ollama'.
    • Removed Number of GQA groups input.
  • packages/components/nodes/chatmodels/ChatOpenAI/ChatOpenAI.ts
    • Updated ChatOpenAI node label from 'ChatOpenAI' to 'OpenAI'.
    • Updated description for Reasoning and Reasoning Effort inputs.
  • packages/components/nodes/chatmodels/ChatOpenAICustom/ChatOpenAICustom.ts
    • Updated ChatOpenAICustom node label from 'ChatOpenAI Custom' to 'OpenAI Custom Model'.
    • Updated description for Base Path and added description for Base Options.
  • packages/components/nodes/chatmodels/ChatOpenRouter/ChatOpenRouter.ts
    • Updated ChatOpenRouter node label from 'ChatOpenRouter' to 'OpenRouter'.
    • Updated description for Base Path and added description for Base Options.
  • packages/components/nodes/chatmodels/ChatPerplexity/ChatPerplexity.ts
    • Updated ChatPerplexity node label from 'ChatPerplexity' to 'Perplexity'.
  • packages/components/nodes/chatmodels/ChatSambanova/ChatSambanova.ts
    • Updated ChatSambanova node label from 'ChatSambanova' to 'SambaNova'.
    • Updated description for Base Path and added description for Base Options.
  • packages/components/nodes/chatmodels/ChatTogetherAI/ChatTogetherAI.ts
    • Updated ChatTogetherAI node label from 'ChatTogetherAI' to 'TogetherAI'.
  • packages/components/nodes/chatmodels/ChatXAI/ChatXAI.ts
    • Updated ChatXAI node label from 'ChatXAI' to 'xAI Grok'.
    • Removed Image Resolution input.
  • packages/components/nodes/documentloaders/API/APILoader.ts
    • Migrated from langchain/document_loaders/base to @langchain/classic/document_loaders/base and langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Airtable/Airtable.ts
    • Migrated from langchain/document_loaders/base to @langchain/classic/document_loaders/base and langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/ApifyWebsiteContentCrawler/ApifyWebsiteContentCrawler.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Cheerio/Cheerio.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters and langchain/document_loaders/web/cheerio to @langchain/community/document_loaders/web/cheerio.
  • packages/components/nodes/documentloaders/Confluence/Confluence.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Csv/Csv.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Docx/Docx.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Epub/Epub.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Figma/Figma.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/File/File.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters and langchain/document_loaders/fs/* to @langchain/classic/document_loaders/fs/*.
  • packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters and langchain/document_loaders/base to @langchain/classic/document_loaders/base.
  • packages/components/nodes/documentloaders/Folder/Folder.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters and langchain/document_loaders/fs/* to @langchain/classic/document_loaders/fs/*.
  • packages/components/nodes/documentloaders/Gitbook/Gitbook.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Github/Github.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/GoogleDrive/GoogleDrive.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/GoogleSheets/GoogleSheets.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Jira/Jira.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Json/Json.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters and langchain/document_loaders/base to @langchain/classic/document_loaders/base.
  • packages/components/nodes/documentloaders/Jsonlines/Jsonlines.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters and langchain/document_loaders/base to @langchain/classic/document_loaders/base.
  • packages/components/nodes/documentloaders/MicrosoftExcel/ExcelLoader.ts
    • Migrated from langchain/document_loaders/fs/buffer to @langchain/classic/document_loaders/fs/buffer.
  • packages/components/nodes/documentloaders/MicrosoftExcel/MicrosoftExcel.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/MicrosoftPowerpoint/MicrosoftPowerpoint.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/MicrosoftPowerpoint/PowerpointLoader.ts
    • Migrated from langchain/document_loaders/fs/buffer to @langchain/classic/document_loaders/fs/buffer.
  • packages/components/nodes/documentloaders/MicrosoftWord/MicrosoftWord.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/MicrosoftWord/WordLoader.ts
    • Migrated from langchain/document_loaders/fs/buffer to @langchain/classic/document_loaders/fs/buffer.
  • packages/components/nodes/documentloaders/Notion/NotionDB.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Notion/NotionFolder.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Notion/NotionPage.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Oxylabs/Oxylabs.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters and langchain/document_loaders/base to @langchain/classic/document_loaders/base.
  • packages/components/nodes/documentloaders/Pdf/Pdf.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/PlainText/PlainText.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Playwright/Playwright.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Puppeteer/Puppeteer.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/S3Directory/S3Directory.ts
    • Migrated from langchain/document_loaders/fs/directory to @langchain/classic/document_loaders/fs/directory, langchain/document_loaders/fs/json to @langchain/classic/document_loaders/fs/json, langchain/document_loaders/fs/text to @langchain/classic/document_loaders/fs/text and langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/S3File/S3File.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/SearchApi/SearchAPI.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/SerpApi/SerpAPI.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/documentloaders/Spider/Spider.ts
    • Migrated from langchain/text_splitter to @langchain/classic/text_splitter and langchain/document_loaders/base to @langchain/classic/document_loaders/base.
  • packages/components/nodes/documentloaders/Text/Text.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters and langchain/document_loaders/fs/text to @langchain/classic/document_loaders/fs/text.
  • packages/components/nodes/documentloaders/Unstructured/Unstructured.ts
    • Migrated from langchain/document_loaders/base to @langchain/classic/document_loaders/base and langchain/dist/util/types to @langchain/core/utils/types.
  • packages/components/nodes/documentloaders/UnstructuredFolder/UnstructuredFolder.ts
    • Removed the UnstructuredFolder document loader.
  • packages/components/nodes/embeddings/AWSBedrockEmbedding/AWSBedrockEmbedding.ts
    • Migrated from @langchain/community/embeddings/bedrock to @langchain/aws.
  • packages/components/nodes/embeddings/AzureOpenAIEmbedding/AzureOpenAIEmbedding.ts
    • Updated Azure OpenAI Embedding node label from 'Azure OpenAI Embeddings' to 'Azure OpenAI Embedding'.
    • Updated description for Base Path and added description for Base Options.
  • packages/components/nodes/embeddings/CohereEmbedding/CohereEmbedding.ts
    • Updated CohereEmbedding node label from 'Cohere Embeddings' to 'Cohere Embedding'.
  • packages/components/nodes/embeddings/GoogleGenerativeAIEmbedding/GoogleGenerativeAIEmbedding.ts
    • Updated GoogleGenerativeAIEmbedding node label from 'GoogleGenerativeAI Embeddings' to 'Google Gemini Embedding'.
  • packages/components/nodes/embeddings/GoogleVertexAIEmbedding/GoogleVertexAIEmbedding.ts
    • Updated GoogleVertexAIEmbedding node label from 'GoogleVertexAI Embeddings' to 'Google VertexAI Embedding'.
  • packages/components/nodes/embeddings/HuggingFaceInferenceEmbedding/HuggingFaceInferenceEmbedding.ts
    • Updated HuggingFaceInferenceEmbedding node label from 'HuggingFace Inference Embeddings' to 'HuggingFace Inference Embedding'.
  • packages/components/nodes/embeddings/IBMWatsonxEmbedding/IBMWatsonxEmbedding.ts
    • Updated IBMWatsonxEmbedding node label from 'IBM Watsonx Embeddings' to 'IBM Watsonx Embedding'.
  • packages/components/nodes/embeddings/JinaAIEmbedding/JinaAIEmbedding.ts
    • Updated JinaAIEmbedding node label from 'Jina Embeddings' to 'Jina Embedding'.
  • packages/components/nodes/embeddings/LocalAIEmbedding/LocalAIEmbedding.ts
    • Updated LocalAIEmbedding node label from 'LocalAI Embeddings' to 'LocalAI Embedding'.
  • packages/components/nodes/embeddings/MistralEmbedding/MistralEmbedding.ts
    • Updated MistralAIEmbedding node label from 'MistralAI Embeddings' to 'MistralAI Embedding'.
  • packages/components/nodes/embeddings/OllamaEmbedding/OllamaEmbedding.ts
    • Updated OllamaEmbedding node label from 'Ollama Embeddings' to 'Ollama Embedding'.
  • packages/components/nodes/embeddings/OpenAIEmbedding/OpenAIEmbedding.ts
    • Updated OpenAIEmbedding node label from 'OpenAI Embeddings' to 'OpenAI Embedding'.
    • Updated description for Base Path and added description for Base Options.
  • packages/components/nodes/embeddings/OpenAIEmbeddingCustom/OpenAIEmbeddingCustom.ts
    • Updated OpenAIEmbeddingCustom node label from 'OpenAI Embeddings Custom' to 'OpenAI Custom Embedding'.
    • Updated description for Base Path and added description for Base Options.
  • packages/components/nodes/embeddings/TogetherAIEmbedding/TogetherAIEmbedding.ts
    • Updated TogetherAIEmbedding node label from 'TogetherAIEmbedding' to 'TogetherAI Embedding'.
  • packages/components/nodes/embeddings/VoyageAIEmbedding/VoyageAIEmbedding.ts
    • Updated VoyageAIEmbedding node label from 'VoyageAI Embeddings' to 'VoyageAI Embedding'.
  • packages/components/nodes/llms/AWSBedrock/AWSBedrock.ts
    • Updated AWSBedrock node label from 'AWS ChatBedrock' to 'AWS Bedrock'.
    • Deprecated AWS Bedrock and added deprecation message.
  • packages/components/nodes/llms/Azure OpenAI/AzureOpenAI.ts
    • Updated Azure OpenAI node label from 'Azure OpenAI' to 'Azure OpenAI'.
    • Updated description for Base Path and added description for Base Options.
    • Deprecated Azure OpenAI and added deprecation message.
  • packages/components/nodes/llms/Cohere/Cohere.ts
    • Deprecated Cohere and added deprecation message.
  • packages/components/nodes/llms/Fireworks/Fireworks.ts
    • Deprecated Fireworks and added deprecation message.
  • packages/components/nodes/llms/GoogleVertexAI/GoogleVertexAI.ts
    • Deprecated GoogleVertexAI and added deprecation message.
  • packages/components/nodes/llms/HuggingFaceInference/HuggingFaceInference.ts
    • Deprecated HuggingFaceInference and added deprecation message.
  • packages/components/nodes/llms/IBMWatsonx/IBMWatsonx.ts
    • Deprecated IBMWatsonx and added deprecation message.
  • packages/components/nodes/llms/Ollama/Ollama.ts
    • Updated node label, removed GQA groups input, and marked as deprecated.
  • packages/components/nodes/llms/OpenAI/OpenAI.ts
    • Updated node label, added base path/options descriptions, and marked as deprecated.
  • packages/components/nodes/llms/SambaNova/Sambanova.ts
    • Deprecated Sambanova and added deprecation message.
  • packages/components/nodes/llms/TogetherAI/TogetherAI.ts
    • Deprecated TogetherAI and added deprecation message.
  • packages/components/nodes/llms/XAI/XAI.ts
    • Deprecated XAI and added deprecation message.
  • packages/components/nodes/memory/BufferMemory/BufferMemory.ts
    • Migrated from langchain/memory to @langchain/classic/memory.
  • packages/components/nodes/memory/BufferWindowMemory/BufferWindowMemory.ts
    • Migrated from langchain/memory to @langchain/classic/memory.
  • packages/components/nodes/memory/ConversationSummaryBufferMemory/ConversationSummaryBufferMemory.ts
    • Migrated from langchain/memory to @langchain/classic/memory.
  • packages/components/nodes/memory/ConversationSummaryMemory/ConversationSummaryMemory.ts
    • Migrated from langchain/memory to @langchain/classic/memory.
  • packages/components/nodes/memory/DynamoDb/DynamoDb.ts
    • Migrated from langchain/memory to @langchain/classic/memory and updated BaseMessage type.
  • packages/components/nodes/memory/MongoDBMemory/MongoDBMemory.ts
    • Migrated from langchain/memory to @langchain/classic/memory.
  • packages/components/nodes/memory/RedisBackedChatMemory/RedisBackedChatMemory.ts
    • Migrated from langchain/memory to @langchain/classic/memory and updated BaseMessage type.
  • packages/components/nodes/memory/UpstashRedisBackedChatMemory/UpstashRedisBackedChatMemory.ts
    • Migrated from langchain/memory to @langchain/classic/memory and updated BaseMessage type.
  • packages/components/nodes/memory/ZepMemory/ZepMemory.ts
    • Migrated from langchain/memory to @langchain/classic/memory.
  • packages/components/nodes/memory/ZepMemoryCloud/ZepMemoryCloud.ts
    • Migrated Zep imports to @langchain/community and @langchain/classic, and updated Zep configuration.
  • packages/components/nodes/moderation/OpenAIModeration/OpenAIModerationRunner.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/multiagents/Supervisor/Supervisor.ts
    • Updated Zod import and modified LLM tool binding for Mistral and OpenAI.
  • packages/components/nodes/multiagents/Worker/Worker.ts
    • Migrated from langchain/agents to @langchain/classic/agents.
  • packages/components/nodes/outputparsers/OutputParserHelpers.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/outputparsers/StructuredOutputParser/StructuredOutputParser.ts
    • Updated Zod import and migrated from langchain/output_parsers to @langchain/core/output_parsers.
  • packages/components/nodes/outputparsers/StructuredOutputParserAdvanced/StructuredOutputParserAdvanced.ts
    • Migrated from langchain/output_parsers to @langchain/core/output_parsers and updated Zod import.
  • packages/components/nodes/retrievers/AzureRerankRetriever/AzureRerank.ts
    • Migrated from langchain/retrievers/document_compressors to @langchain/classic/retrievers/document_compressors.
  • packages/components/nodes/retrievers/AzureRerankRetriever/AzureRerankRetriever.ts
    • Migrated from langchain/retrievers/contextual_compression to @langchain/classic/retrievers/contextual_compression and updated relevant documents method.
  • packages/components/nodes/retrievers/CohereRerankRetriever/CohereRerank.ts
    • Migrated from langchain/retrievers/document_compressors to @langchain/classic/retrievers/document_compressors.
  • packages/components/nodes/retrievers/CohereRerankRetriever/CohereRerankRetriever.ts
    • Migrated from langchain/retrievers/contextual_compression to @langchain/classic/retrievers/contextual_compression and updated relevant documents method.
  • packages/components/nodes/retrievers/EmbeddingsFilterRetriever/EmbeddingsFilterRetriever.ts
    • Migrated from langchain/retrievers/contextual_compression to @langchain/classic/retrievers/contextual_compression and langchain/retrievers/document_compressors/embeddings_filter to @langchain/classic/retrievers/document_compressors/embeddings_filter.
  • packages/components/nodes/retrievers/ExtractMetadataRetriever/ExtractMetadataRetriever.ts
    • Updated Zod import and modified LLM structured output binding.
  • packages/components/nodes/retrievers/HydeRetriever/HydeRetriever.ts
    • Migrated from langchain/retrievers/hyde to @langchain/classic/retrievers/hyde and updated relevant documents method.
  • packages/components/nodes/retrievers/JinaRerankRetriever/JinaRerank.ts
    • Migrated from langchain/retrievers/document_compressors to @langchain/classic/retrievers/document_compressors.
  • packages/components/nodes/retrievers/JinaRerankRetriever/JinaRerankRetriever.ts
    • Migrated from langchain/retrievers/contextual_compression to @langchain/classic/retrievers/contextual_compression.
  • packages/components/nodes/retrievers/LLMFilterRetriever/LLMFilterCompressionRetriever.ts
    • Migrated from langchain/retrievers/contextual_compression to @langchain/classic/retrievers/contextual_compression and langchain/retrievers/document_compressors/chain_extract to @langchain/classic/retrievers/document_compressors/chain_extract.
  • packages/components/nodes/retrievers/MultiQueryRetriever/MultiQueryRetriever.ts
    • Migrated from langchain/retrievers/multi_query to @langchain/classic/retrievers/multi_query.
  • packages/components/nodes/retrievers/RRFRetriever/RRFRetriever.ts
    • Migrated from langchain/retrievers/contextual_compression to @langchain/classic/retrievers/contextual_compression and updated relevant documents method.
  • packages/components/nodes/retrievers/RRFRetriever/ReciprocalRankFusion.ts
    • Migrated from langchain/chains to @langchain/classic/chains and langchain/retrievers/document_compressors to @langchain/classic/retrievers/document_compressors.
  • packages/components/nodes/retrievers/SimilarityThresholdRetriever/SimilarityThresholdRetriever.ts
    • Migrated from langchain/retrievers/score_threshold to @langchain/classic/retrievers/score_threshold and updated relevant documents method.
  • packages/components/nodes/retrievers/VoyageAIRetriever/VoyageAIRerank.ts
    • Migrated from langchain/retrievers/document_compressors to @langchain/classic/retrievers/document_compressors.
  • packages/components/nodes/retrievers/VoyageAIRetriever/VoyageAIRerankRetriever.ts
    • Migrated from langchain/retrievers/contextual_compression to @langchain/classic/retrievers/contextual_compression and updated relevant documents method.
  • packages/components/nodes/sequentialagents/Agent/Agent.ts
    • Migrated from langchain/agents to @langchain/classic/agents.
  • packages/components/nodes/sequentialagents/ConditionAgent/ConditionAgent.ts
    • Updated Zod import and modified LLM structured output binding.
  • packages/components/nodes/sequentialagents/LLMNode/LLMNode.ts
    • Updated Zod import and modified LLM structured output binding.
  • packages/components/nodes/sequentialagents/commonUtils.ts
    • Updated Zod import.
  • packages/components/nodes/textsplitters/CharacterTextSplitter/CharacterTextSplitter.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/textsplitters/CodeTextSplitter/CodeTextSplitter.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/textsplitters/HtmlToMarkdownTextSplitter/HtmlToMarkdownTextSplitter.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/textsplitters/MarkdownTextSplitter/MarkdownTextSplitter.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/textsplitters/RecursiveCharacterTextSplitter/RecursiveCharacterTextSplitter.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/textsplitters/TokenTextSplitter/TokenTextSplitter.ts
    • Migrated from langchain/text_splitter to @langchain/textsplitters.
  • packages/components/nodes/tools/AWSDynamoDBKVStorage/AWSDynamoDBKVStorage.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/AgentAsTool/AgentAsTool.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/Arxiv/core.ts
    • Updated dependency from zod to zod/v3 and Blob creation for PDF loader.
  • packages/components/nodes/tools/ChainTool/ChainTool.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/tools/ChainTool/core.ts
    • Migrated from langchain/chains to @langchain/classic/chains.
  • packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/CodeInterpreterE2B/CodeInterpreterE2B.ts
    • Updated dependency from zod to zod/v3 and Blob creation for file data.
  • packages/components/nodes/tools/CurrentDateTime/CurrentDateTime.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/CustomTool/CustomTool.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/CustomTool/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/Gmail/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/GoogleCalendar/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/GoogleDocs/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/GoogleDrive/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/GoogleSheets/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/JSONPathExtractor/JSONPathExtractor.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/Jira/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/MCP/core.ts
    • Updated dependency from zod to zod/v3 and schema model creation.
  • packages/components/nodes/tools/MicrosoftOutlook/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/MicrosoftTeams/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/OpenAPIToolkit/OpenAPIToolkit.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/OpenAPIToolkit/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/RequestsDelete/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/RequestsGet/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/RequestsPost/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/RequestsPut/core.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/RetrieverTool/RetrieverTool.ts
    • Updated dependency from zod to zod/v3.
  • packages/components/nodes/tools/TavilyAPI/TavilyAPI.ts
    • Migrated from @langchain/community/tools/tavily_search to @langchain/tavily.
  • packages/components/nodes/tools/WebBrowser/WebBrowser.ts
    • Migrated from langchain/tools/webbrowser to @langchain/classic/tools/webbrowser.
  • packages/components/nodes/vectorstores/Astra/Astra.ts
    • Updated version, removed namespace input, and adjusted Astra configuration.
  • packages/components/nodes/vectorstores/Couchbase/Couchbase.ts
    • Migrated Couchbase vector store imports to @langchain/community/vectorstores/couchbase_search and updated configuration.
  • packages/components/nodes/vectorstores/InMemory/InMemoryVectorStore.ts
    • Migrated from langchain/vectorstores/memory to @langchain/classic/vectorstores/memory.
  • packages/components/nodes/vectorstores/Pinecone/Pinecone_LlamaIndex.ts
    • Migrated Langchain Document import to @langchain/core/documents.
  • packages/components/nodes/vectorstores/Qdrant/Qdrant.ts
    • Updated Qdrant client configuration.
  • packages/components/nodes/vectorstores/Redis/Redis.ts
    • Migrated Redis vector store import to @langchain/redis and updated client configuration.
  • packages/components/nodes/vectorstores/SimpleStore/SimpleStore.ts
    • Migrated Langchain Document import to @langchain/core/documents.
  • packages/components/nodes/vectorstores/Vectara/Vectara.ts
    • Updated Blob creation for file data.
  • packages/components/nodes/vectorstores/Vectara/Vectara_Upload.ts
    • Updated Blob creation for file data.
  • packages/components/nodes/vectorstores/ZepCloud/ZepCloud.ts
    • Migrated Zep imports to @langchain/community and @langchain/classic, and updated Zep configuration.
  • packages/components/package.json
    • Updated dependencies for Langchain V1, OpenAI, Anthropic, AWS SDK, and Zod.
  • packages/components/src/Interface.ts
    • Migrated Langchain memory imports to @langchain/classic and added streamThinkingEvent to IServerSideEventStreamer.
  • packages/components/src/agentflowv2Generator.ts
    • Updated Zod import.
  • packages/components/src/agents.ts
    • Migrated Langchain imports to @langchain/classic and updated FunctionMessage creation.
  • packages/components/src/followUpPrompts.ts
    • Updated Zod import and modified LLM structured output binding for various chat models.
  • packages/components/src/indexing.ts
    • Updated hashing method and added DocumentLoader interface and BaseDocumentLoader abstract class.
  • packages/components/src/multiModalUtils.ts
    • Removed image resolution detail from image URL content.
  • packages/components/src/secureZodParser.ts
    • Updated Zod import.
  • packages/components/src/speechToText.ts
    • Updated Blob creation for audio file data.
  • packages/components/src/utils.ts
    • Updated Zod import, migrated Langchain imports to @langchain/textsplitters and @langchain/classic, and modified LLM structured output binding.
  • packages/server/package.json
    • Updated dependencies for uuid and OpenAI, and removed @types/uuid.
  • packages/server/src/Interface.ts
    • Added reasonContent field to IChatMessage.
  • packages/server/src/controllers/chat-messages/index.ts
    • Added parsing for reasonContent in API responses.
  • packages/server/src/database/entities/ChatMessage.ts
    • Added reasonContent column to ChatMessage entity.
  • packages/server/src/database/migrations/mariadb/1764759496768-AddReasonContentToChatMessage.ts
    • Added migration to add reasonContent column to chat_message table.
  • packages/server/src/database/migrations/mariadb/index.ts
    • Included new migration for reasonContent.
  • packages/server/src/database/migrations/mysql/1764759496768-AddReasonContentToChatMessage.ts
    • Added migration to add reasonContent column to chat_message table.
  • packages/server/src/database/migrations/mysql/index.ts
    • Included new migration for reasonContent.
  • packages/server/src/database/migrations/postgres/1764759496768-AddReasonContentToChatMessage.ts
    • Added migration to add reasonContent column to chat_message table.
  • packages/server/src/database/migrations/postgres/index.ts
    • Included new migration for reasonContent.
  • packages/server/src/database/migrations/sqlite/1764759496768-AddReasonContentToChatMessage.ts
    • Added migration to add reasonContent column to chat_message table.
  • packages/server/src/database/migrations/sqlite/index.ts
    • Included new migration for reasonContent.
  • packages/server/src/enterprise/Interface.Enterprise.ts
    • Updated Zod import.
  • packages/server/src/queue/RedisEventPublisher.ts
    • Added streamThinkingEvent method.
  • packages/server/src/queue/RedisEventSubscriber.ts
    • Added handling for 'thinking' event.
  • packages/server/src/services/agentflowv2-generator/index.ts
    • Updated Zod import.
  • packages/server/src/services/assistants/index.ts
    • Updated OpenAI assistant deletion method.
  • packages/server/src/services/evaluations/LLMEvaluationRunner.ts
    • Updated Zod import and modified LLM structured output binding.
  • packages/server/src/services/openai-assistants-vector-store/index.ts
    • Updated OpenAI vector store file deletion methods.
  • packages/server/src/utils/SSEStreamer.ts
    • Added streamThinkingEvent method.
  • packages/server/src/utils/buildAgentGraph.ts
    • Updated humanMsg type to BaseMessage[].
  • packages/server/src/utils/buildAgentflow.ts
    • Added reasonContent to apiMessage.
  • packages/ui/package.json
    • Updated uuid dependency.
  • packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx
    • Imported ThinkingCard and added thinking and thinkingDuration to message object.
  • packages/ui/src/utils/validation.js
    • Updated Zod import.
  • packages/ui/src/views/agentexecutions/NodeExecutionDetails.jsx
    • Updated icon for cost and added cost display logic.
  • packages/ui/src/views/assistants/custom/toolAgentFlow.js
    • Updated label for 'Base Options' and removed 'Image Resolution' input.
  • packages/ui/src/views/assistants/index.jsx
    • Removed Azure Assistant card, updated OpenAI Assistant description, and added deprecating chip.
  • packages/ui/src/views/auth/register.jsx
    • Updated dependency from zod to zod/v3.
  • packages/ui/src/views/chatmessage/ChatMessage.jsx
    • Imported ThinkingCard, added thinking state management, and updated message handling for thinking events.
  • packages/ui/src/views/chatmessage/ThinkingCard.jsx
    • Added new component for displaying thinking process.
  • packages/ui/src/views/organization/index.jsx
    • Updated dependency from zod to zod/v3.
Activity
  • Dependency updates for Langchain V1 migration
  • Model updates for Claude, Gemini, and GPT
  • Agentflow enhancements for reasoning content and duration tracking
  • Deprecation of older agent implementations
  • Component label updates for clarity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a major upgrade to Langchain v1 and other dependencies, which is a significant undertaking. The changes are extensive and touch many parts of the codebase, including dependency updates, API migrations, and refactoring of several components.
Key changes include:

  • Upgrading Langchain, OpenAI, and Zod to new major versions.
  • Migrating deprecated agents and chains to @langchain/classic.
  • Introducing new features like 'thinking/reasoning' steps for agents and cost calculation, which enhances visibility into agent execution.
  • Refactoring several chat model components to support new features and align with updated APIs.
  • Deprecating older agent implementations in favor of the new AgentFlow components.

The overall changes look solid and well-executed. I've added a few minor comments regarding type safety and error handling. Great work on this large-scale update!

Note: Security Review did not run due to the size of the PR.

Comment on lines +2018 to +2020
} catch {
return undefined
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This empty catch block swallows errors silently, which can make debugging difficult if something goes wrong during cost calculation. It's a good practice to at least log the error to have visibility into potential issues.

        } catch (error) {
            console.error(`Error calculating usage cost: ${error}`)
            return undefined
        }


const dbConfig: QdrantLibArgs = {
client,
client: client as any,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Casting client to any bypasses TypeScript's type checking, which can hide potential type mismatches and lead to runtime errors. It would be better to resolve the underlying type incompatibility. This also occurs on lines 356 and 433.


const storeConfig: RedisVectorStoreConfig = {
redisClient: redisClient,
redisClient: redisClient as any,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Casting redisClient to any bypasses TypeScript's type checking. This can hide potential issues if the redisClient instance is not fully compatible with what RedisVectorStoreConfig expects. Please try to resolve the type mismatch instead of using as any. This also occurs on line 242.

@bobberg
Copy link

bobberg commented Mar 4, 2026

Looking forward to this one, especially with gemini-3.1-flash-lite-preview working with the thought signature issue <3

…sistent response handling

- Introduced extractResponseContent function to streamline response content extraction across various components.
- Updated multiple files to utilize the new utility, enhancing code readability and maintainability.
- Adjusted model configurations and added new parameters for Gemini models to improve functionality.
# Conflicts:
#	pnpm-lock.yaml
@HenryHengZJ HenryHengZJ changed the title Chore/Langchain V1 Feat/Reasoning Support, Migrate LangChain to v1, Upgrade AI SDKs and Models Mar 5, 2026
…ies test file to isolate tests and improve reliability.
…and mock multer-azure-blob-storage in Jest config

- Added uuid dependency with version 10.0.0 and request>uuid with version 3.4.0 in package.json.
- Updated pnpm-lock.yaml to reflect the new uuid dependency and its deprecation notice.
- Modified Jest configuration to mock multer-azure-blob-storage to avoid module resolution issues with uuid/v4.
…o utilize Readable.fromWeb, enhancing compatibility with web streams.

- Added '/api/v1/chatmessage/abort' to the WHITELIST_URLS array to allow for aborting chat messages in the API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants