- Remove infrastructure/crypto package (CryptoService, config, PBKDF2-based encryption)
- Replace with lightweight utils.GetAESKey/EncryptAESGCM/DecryptAESGCM helpers
- Remove cryptoSvc dependency from modelService, tenantService, weKnoraCloudService
- Remove crypto state persistence logic from container initialization
- Add TruncatePromptTokens field to WeKnoraCloud embed request
- Update frontend hint text for WeKnoraCloud credential errors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Implemented a new function to check ASR model connectivity via the /v1/audio/transcriptions endpoint.
- Updated ModelEditorDialog.vue to integrate ASR model checks and adjust UI elements accordingly.
- Enhanced localization files to reflect changes in ASR terminology and descriptions.
- Added ASR configuration options to the knowledge base and updated related migration scripts.
- Refactored model handling to support ASR as a distinct model type in the application.
- Added ASR configuration options to the knowledge base and model settings.
- Implemented ASR model selection and transcription capabilities in the knowledge processing pipeline.
- Enhanced file upload support to include audio formats for ASR processing.
- Updated localization files to include ASR-related labels and descriptions.
- Refactored model handling to accommodate ASR as a new model type.
errors.New("EOF") creates a distinct error instance that doesn't match
io.EOF, causing processRawHTTPStream to silently ignore normal stream
termination without sending a done response.
- SSEReader: return io.EOF instead of errors.New("EOF")
- processRawHTTPStream: handle io.EOF as normal completion, send done
response with usage/toolCalls (aligned with processStream behavior)
Fixes#860
- Streamlined the handling of the temperature option in both OllamaChat and RemoteAPIChat by removing unnecessary conditional checks.
- Ensured that the temperature value is directly assigned when options are provided, improving code clarity and reducing complexity.
- Deleted references to WeCom document integration in the data source import module documentation.
- Updated the quick start guide and related sections to reflect the removal of WeCom, enhancing clarity and focus on supported platforms.
- guard against empty content completion in analyzeResponse/executeLoop
with retry (max 2), nudge message, and fallback response
- propagate actual finish_reason through streaming pipeline instead of
hardcoding "stop" in streamThinkingToEventBus
- add FinishReason field to StreamResponse and streamLLMResult
- add finish marker chunk in processStreamDelta for empty content scenarios
- propagate lastFinishReason through EOF handler in processStream
- strengthen PureAgent system prompt with MCP tool guidelines and
graceful fallback instructions for unanswerable questions
- add unit tests for empty response bug and finish_reason propagation
- Updated context template to include runtime metadata such as current time and week, improving contextual awareness in user queries.
- Enhanced rewrite template with critical instructions for intent classification, ensuring that rewritten questions preserve essential entities and keywords.
- Refined intent classification logic to prioritize user intents more effectively, improving the accuracy of responses based on user queries.
- Added examples to clarify expected input and output formats for intent classification, enhancing usability for developers.
Update MiniMax provider description and model references from the legacy
MiniMax-M2.1/M2.1-lightning to the latest MiniMax-M2.7/M2.7-highspeed
models. Also update Novita AI's MiniMax model reference from M2.5 to M2.7.
Changes:
- Update MiniMax provider description in minimax.go
- Update Novita provider MiniMax model reference in novita.go
- Update all i18n locale files (en-US, zh-CN, ko-KR, ru-RU)
- Add MiniMax provider validation tests
- Replaced the default DialContext with SSRFSafeDialContext in the raw HTTP client to improve security against DNS rebinding attacks.
- Added SSRF validation for BaseURL and endpoint in NewRemoteAPIChat and chat methods, ensuring safer URL handling.
- Updated security utility functions to provide consistent SSRF checks across the application.
- Introduced a new ParallelToolCalls field in ChatOptions to control parallel execution of tool calls.
- Updated the BuildChatCompletionRequest method to handle the new ParallelToolCalls option, ensuring it is correctly propagated in requests.
- Enhanced the streamThinkingToEventBus function to utilize the ParallelToolCalls setting.
- Added comprehensive tests to validate the behavior of ParallelToolCalls in various scenarios, ensuring correct propagation and default handling.
- Added diagnostics for streaming events in the AgentEngine, including chunk counts and response type distributions.
- Implemented logging for emitted event types during the thinking process to aid in debugging and performance analysis.
- Updated the session handler to provide more informative warnings when fallback answers are emitted due to non-streaming behavior.
- Introduced a dedicated HTTP client for Ollama to improve connection handling and timeout management during streaming calls.
- Introduced Volcengine as a new provider in the chat provider specifications.
- Refactored the thinking configuration to a more generic format, applicable to both LKEAP and Volcengine.
- Updated request customizers to handle the new thinking configuration structure for both LKEAP and Volcengine providers.
- Added token usage tracking to the AgentEngine, allowing for better estimation of current context token counts.
- Implemented a new method to estimate current tokens based on previous usage and newly appended messages, improving context management.
- Updated context window management to utilize estimated token counts for more efficient message consolidation.
- Enhanced streaming methods to include token usage information, providing better insights into LLM interactions.
- Refactored the token estimator to support BPE tokenization, ensuring accurate token counts for messages.
- Added unit tests to validate new token estimation and context management functionalities.
- Added a new `ProviderSpec` struct to define provider-specific behaviors for chat completions.
- Implemented request and endpoint customizers for various providers including Qwen3, LKEAP, DeepSeek, and Generic.
- Refactored the `NewRemoteChat` function to utilize the new provider specs for customizing requests based on the provider and model name.
- Removed legacy chat implementations for LKEAP, NVIDIA, DeepSeek, and Qwen, consolidating their logic into the new structure.
- Introduced a configurable LLM call timeout with a default value, allowing for better control over LLM call durations.
- Added logic to retry transient errors (e.g., timeouts, rate limits) up to a specified maximum number of retries, improving robustness in error handling.
- Implemented parameter casting for tool arguments to ensure correct types are used, addressing common LLM quirks.
- Enhanced tool execution error messages with guidance for retrying with different approaches.
- Added validation for configuration values to prevent runtime errors.
Two related fixes for thinking mode streaming:
1. chat_completion_stream.go: When the response channel closes
unexpectedly (context cancelled, upstream error) while thinking
is in progress, the <think> tag was left unclosed. This caused
the stored message to have an incomplete tag, making the frontend
show a perpetual "thinking..." state on history reload.
Now we emit a closing </think> tag when the channel ends with
thinkingStarted=true but thinkingEnded=false.
2. remote_api.go: The thinking Done=true event was only sent when
the first answer content chunk arrived. If the model produced
only reasoning with no answer (e.g., finish_reason set with
empty content), the thinking-done signal was never emitted.
Now we also check isDone && state.hasThinking at the end of
processStreamDelta to ensure the done event is always sent.
Add Novita AI as a new model provider supporting chat, embedding,
and VLLM model types via OpenAI-compatible API endpoint.
- Add NovitaProvider implementation with OpenAI-compatible API
- Register ProviderNovita in provider registry
- Add ModelSourceNovita constant
- Add Novita to frontend fallback provider options
- Add i18n translations for en-US, zh-CN, ru-RU, ko-KR
- Parse reasoning field together with standard stream response using local struct
- Unify reasoning content extraction from standard and vLLM response paths
- Adapt processStreamDelta to accept reasoning content as a separate parameter
- Send reasoning content as thinking response in the stream when available
- Ensure compatibility with existing SDK logic by constructing standard choice object
- Introduced MessageContentPart and ImageURL types to allow for multi-content messages that can include both text and images.
- Updated the Message struct to include a MultiContent field for handling multiple message parts.
- Modified the ConvertMessages function to prioritize processing of multi-content messages, improving the handling of user messages with images.
These changes enhance the flexibility and functionality of chat messages, enabling richer content delivery.
- Removed outdated instructions regarding the `skip_kb_search` field in the conversation configuration.
- Clarified requirements for `image_description` to ensure it is non-empty when images are present.
- Adjusted the handling of message parts in the chat pipeline to improve image processing.
- Deleted unused migration files related to image handling in the database schema.
These changes enhance the clarity and functionality of the conversation and image processing logic.
- Updated configuration to improve handling of multimodal queries, including clearer guidelines for when to use [NO_SEARCH] in responses.
- Enhanced the user interface to include dedicated sections for multimodal configuration, allowing users to manage image uploads and related settings more effectively.
- Added localization support for new multimodal features in both English and Chinese, improving accessibility for a broader audience.
- Implemented backend changes to support image analysis and extraction of OCR text, enriching the interaction experience for users.
These enhancements significantly improve the application's capability to process and respond to multimodal queries, fostering a more interactive and user-friendly environment.
- Added functionality for image uploads in chat, allowing users to attach images for multimodal Q&A.
- Enhanced the input field to handle image selection via drag-and-drop and paste, with validation for file types and sizes.
- Updated the backend to process images alongside text queries, including support for image analysis.
- Introduced new UI components for image previews and management, improving user interaction with uploaded content.
- Added localization strings for image upload features and error messages, enhancing accessibility for users in multiple languages.
These changes significantly improve the chat experience by enabling users to incorporate images into their queries, facilitating richer interactions and responses.
Prevents 400 Bad Request errors when uploading documents with large
tables or code blocks by adding hard limits in buildUnitsWithProtection
and mergeUnits functions.
- Introduced the final_answer tool to ensure agents submit their complete responses as the last action, improving response accuracy and consistency.
- Updated the agent engine to log detailed information about tool calls and responses, including the total duration of agent execution.
- Enhanced the chat message model to include agent_duration_ms, tracking the total execution time from query start to answer delivery.
- Implemented JSON field extraction for streaming responses, allowing for more efficient handling of tool call outputs.
These changes significantly improve the agent's response handling and ensure that final answers are consistently delivered, enhancing overall user experience.
- Added a new `.env.lite.example` file for the Lite version, providing a minimal configuration template.
- Updated `.env.example` to remove deprecated variables and include new Docreader settings.
- Enhanced Docker configurations to support the Lite version, including a new Dockerfile for the Docreader service.
- Introduced a Makefile target for building and running the Lite version, along with packaging capabilities.
- Created GitHub workflows for building and releasing Lite binaries, including Homebrew formula support.
- Implemented a new service file for managing the Lite version as a system service.
This update enables a streamlined, single-binary deployment of WeKnora, reducing external dependencies and simplifying setup.
Ollama API returns reasoning model output in Message.Thinking field,
but OllamaChat only reads Message.Content. Add thinking content
handling for both streaming and non-streaming, consistent with
RemoteAPIChat behavior.
Handle thinking models that return wrapped content even when
Thinking=false is configured. This is a fallback strategy for models
like MiniMax-M2.1 that do not fully support the Thinking parameter.
The thinking tags and their enclosed content are completely stripped.
Remove '/embeddings' suffix from ZhipuEmbeddingBaseURL to align with
Chat and Rerank BaseURL patterns. The OpenAIEmbedder automatically
appends '/embeddings' to the baseURL, so including it in the constant
would result in duplicate '/embeddings/embeddings' in the final URL.