Fix GET /api/v1/memories list filters — memory_type, tenant_id, owner_ids, ids now read all repeated query keys (was only first). Matches /datasets//documents pattern.
Fix MCP session cleanup — now properly awaits server task and closes transport contexts/executors before stopping event loop. Wakes queued callers on shutdown.
Fix non-streaming chat sending empty tools=[] (rejected by strict providers). Restored mdl.is_tools check and added helper to omit tools field when unbound.
Fix agentic search ignoring chat retrieval settings — now passes knn_top_k, weights, threshold, and top_n. knn_top_k critical for HNSW recall on large indices.
Fix reasoning + KB requests using models without tool-calling — now fall back to async_chat RAG path instead of answering from general knowledge.
Co-authored-by: Chen Li <george_lichne@163.com>
### Summary
GET /api/v1/files/{id} now sets attachment filename for both Python and
Go handlers so browsers can save downloads with the correct name.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes#18833.
When the reasoning level is enabled, `dialog_service.rag_agent()` builds a custom system prompt and passes it to `RAGTools`. `RAGTools.sys_prompt()`, however, returned only the router instructions, so the configured system prompt was dropped from the outer LLM.
This change prepends the configured system prompt to the router prompt when one is provided, and adds regression tests.
### Summary
Fix `.wmf` file type detection by matching lowercased filename
normalization in both Python and Go extension checks.
This PR also removes a duplicate `avi` entry from the Python visual file
type regex.
---------
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
### Problem
When a chat assistant has a configured system prompt and the reasoning
level is set to anything other than `NONE`, the request goes through
`rag_agent()` / the agentic RAG harness. That path generated the final
answer with a fixed `FINAL_ANSWER_SYSTEM` prompt and never injected the
user-configured system prompt, so the assistant ignored
role/tone/language instructions (reported in #18833).
Fix Artifacts Tree tab to show error message on navigation API failure instead of misleading "No navigation nodes". Added error handling in frontend, i18n strings, and backend unit tests. 6 tests pass.
### What problem does this PR solve?
Closes#18116.
Fix cross-KB document ID collision (#18116). Older ID derivation excluded kb_id, causing two KBs to fight over one row. Unified derivation to be KB-scoped, with fallback for existing rows. Stranded rows are reclaimed, dataset deletion now cleans up state, and upgraded instances update in place. Tests added.
### Summary
Fix add_message so API-key callers can pass user_id (previously ignored because Python checked a Go-only flag). Now uses g.auth_type == AUTH_API. JWT/session callers stay bound to the authenticated principal. Tests added; backward compatible.
### Summary
Fixes#18653. Groq rejects every chat request on v0.27.0 with `property
'conversationId' is unsupported`, while the same chat works on Ollama.
Closes#18653
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
### Summary
The fix is one line per helper — assign the `order_by(...)` result back
so the
ordering is actually applied to the query.
Co-authored-by: rsnetworkinginc <rsnetworkinginc@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>