Commit Graph

8030 Commits

Author SHA1 Message Date
euvre
e6667f198b fix: embedded/shared agent chat fails with retrieval query unmarshal error (#17831) dev-20260806 2026-08-06 09:46:12 +08:00
buua436
d16b2556a2 fix: split wiki template instruction and example (#17891) 2026-08-06 09:41:57 +08:00
chanx
d5000de534 fix(models-section): defer auto-fetch catalog until base_url is set for self-hosted providers (#17804) 2026-08-06 09:41:26 +08:00
Jin Hai
ae8cfd4d1e Go: fix heartbeat log (#17899)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-05 22:05:07 +08:00
Jin Hai
cf13082a1a Revert "feat: Go knowledge compiler with scheduler-driven dataset compilation" (#17897)
Reverts infiniflow/ragflow#17881
2026-08-05 21:50:28 +08:00
richboyneedcash
eaf553320f docs: fix broken sandbox link in quickstart (#17898) 2026-08-05 21:14:38 +08:00
Mage Lu
d9d75690de fix: correct Tongyi-Qianwen international endpoint typo (compatible-model -> compatible-mode) (#17887)
## Summary
- `api/apps/services/provider_api_service.py` hardcoded the DashScope
international base URL for Tongyi-Qianwen as `.../compatible-model/v1`
instead of `.../compatible-mode/v1`, in two places (`list_providers`,
lines ~93 and ~116).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 20:37:45 +08:00
Zhichang Yu
14b943a04a feat: Go knowledge compiler with scheduler-driven dataset compilation (#17881)
Ports the dataset knowledge compilation (wiki/graph/tree/mindmap) to the
Go scheduler with a status contract, aligns wiki storage/retrieval with
Python, and sizes prompts by content_length.
2026-08-05 20:00:42 +08:00
bigfish-emily
2403988b6d fix(chunker): drop dead atom-split path in mergeByTokenSizeFromJSON (#17873) 2026-08-05 19:58:51 +08:00
Kevin Hu
d2183e610d Fix: Adjust ExecutionStrategy of THINKING_MODES. (#17862)
### Summary

Adjust ExecutionStrategy of THINKING_MODES.
2026-08-05 19:41:00 +08:00
buua436
38435255f9 fix: filter wiki artifacts by keywords (#17871) 2026-08-05 19:40:27 +08:00
chanx
f3be551241 fix(agent): make global variable form fields reactive to i18n language changes (#17883) 2026-08-05 19:39:54 +08:00
chanx
2dfb34f7ab feat(agent-list): support multi-select canvas category filtering (#17843) 2026-08-05 19:32:45 +08:00
jay77721
dc6c0e5de5 fix: drop max_tokens from generic OpenAI-compatible request builder (#17857)
## Summary

The generic `buildRequestBody` in `internal/entity/models/base_model.go`
unconditionally forwarded `ChatConfig.MaxTokens` as `"max_tokens"` for
every OpenAI-compatible provider.

Providers that need a different token field already delete or override
it after the call (e.g. Xiaomi uses `max_completion_tokens`, Replicate
uses `max_new_tokens`). This change stops setting `max_tokens` in the
shared builder so it only forwards the parameters common across
providers, and each provider remains free to set its own token limit
field.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-05 19:31:12 +08:00
buua436
502921159a fix: use updated RAPTOR options for skill generation (#17859) 2026-08-05 19:27:17 +08:00
chanx
b2fea8ee66 fix: enhance agent tags display with tooltip for better visibility (#17879) 2026-08-05 19:27:05 +08:00
balibabu
24c0a77a3e Fix: The download button is displayed on the agent dialog page shared externally. (#17880) 2026-08-05 19:26:42 +08:00
Jack
da5215cb1f test(task): expect 1 chunk after #17739 global merge (#17841) 2026-08-05 19:08:52 +08:00
Jack
2fcc34904b fix(chunker): keep oversize text/markdown unit whole (OVER_CAP alignment) (#17854)
The Go `TokenChunker` text/markdown path (`mergeByTokenSize`)
unconditionally
called `splitOversizedUnit` on any unit that exceeded
`chunk_token_size`,
emitting Go-only sub-chunks. Python's `naive_merge`
(`_merge_paragraph_groups`,
`rag/nlp/__init__.py`) never atom-splits an oversize unit under either
`OVER_CAP` or `UNDER_CAP`: a paragraph larger than the budget becomes
its own
standalone chunk and the model layer truncates it later.

This aligns the text/markdown path with the **structured JSON path**
(`invokeJSONPayload` → `mergeByTokenSizeFromJSON(...,
subSplitOversize=false)`,
#17739). It completes the OVER_CAP alignment started in #17835.
2026-08-05 18:53:59 +08:00
js
2bee51ca90 fix(deps): bump Werkzeug to 3.1.8 to fix intermittent multipart CRLF corruption (#17884)
## Summary
- Pin `werkzeug>=3.1.7,<4` and refresh `uv.lock` to **3.1.8**.
- Fixes intermittent corruption of uploaded file bodies: when TCP
segments split right after multipart part headers, Werkzeug **3.1.5**
can include a leading `\r\n` in the file content
([pallets/werkzeug#3088](https://github.com/pallets/werkzeug/issues/3088);
fixed in 3.1.7).
- In RAGFlow this commonly breaks `.xlsx` parsing: ZIP/OOXML magic
(`PK\x03\x04`) no longer matches, the Excel parser falls back to CSV,
then fails with UTF-8 decode errors such as `invalid start/continuation
byte`.

Made with [Cursor](https://cursor.com)

Co-authored-by: zhangjiangshan1 <zhangjiangshan1@kingsoft.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-08-05 18:47:39 +08:00
taek105
b7966c98f2 fix: honor dataset language across VisionFigureParser paths (#17227) 2026-08-05 18:40:10 +08:00
Jin Hai
d2303cc46b Go: align with EE (#17882)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-05 18:31:44 +08:00
Wang Qi
eb9b621061 Fix go generated token expired in python - 2 (#906) (#17875) 2026-08-05 17:29:08 +08:00
Jack
0227b2684e fix(chunker): drop delimiter from chunk text on primary and children splits (#17868)
Go's `TokenChunker` kept the captured delimiter glued to the preceding
segment on **both** the primary (`chunkFromItem`) and secondary
(`children_delimiters`) split paths, while Python's reference
`token_chunker` drops it via `_split_text_by_pattern`
(`token_chunker.py:79-93`, used by both `_build_json_chunks` and
`_split_chunk_docs_by_children`). The divergence leaked the delimiter
into every emitted chunk's `text`.
2026-08-05 17:26:36 +08:00
chanx
91dcecd2b9 Fix: applying model config in one multi-chat card no longer overrides sibling cards (#17866) 2026-08-05 17:11:33 +08:00
balibabu
479c3efd74 Fix: The hover card referenced in the agent's floating dialog box is not fully displayed. (#17867) 2026-08-05 17:10:01 +08:00
chanx
fe02f5402f feat: add more file type preview support in document viewer (#17872) 2026-08-05 17:09:03 +08:00
maoyifeng
409b75868d CI:fix merge to main,cancel display fail (#17869)
CI:fix merge to main,cancel display faile
2026-08-05 16:55:59 +08:00
YanZhang
1210788121 docs: change data source guide docs (#17870)
add data source guide
delete data source guide form dataset guide
solve some conflicts
2026-08-05 16:49:40 +08:00
Jin Hai
583ba3cb97 Go: add context for DB access (#17861)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-05 16:22:36 +08:00
balibabu
fd6d5faceb Fix: Remove CompilationTemplateFormField from dataset setting page. (#17852) 2026-08-05 15:59:57 +08:00
buua436
cd6e73bcb5 fix: stream agentic reasoning and answers correctly (#17849) 2026-08-05 15:59:19 +08:00
balibabu
affad91b08 Fix: Add an icon to the tag on the agent card to distinguish it from the wiki card type. (#17847) 2026-08-05 15:58:06 +08:00
chanx
1227c88c1d fix(knowledge-base): display embedding model friendly name in datasetlabel (#17842) 2026-08-05 15:57:04 +08:00
euvre
0a444343b9 Fix: dataset tag file setting cannot be saved (#17428) 2026-08-05 15:55:34 +08:00
Hz_
a55a438b42 fix(go-agent): finish retrieval component (#17845)
- Prefer canonical `dataset_ids` over legacy `kb_ids` in Canvas
retrieval components.
- Cover selected and explicitly cleared dataset IDs with regression
tests.
- Add cross-language retrieval with dataset-specific embedding and
rerank models.
- Support vector and keyword similarity controls, metadata filtering,
TOC enhancement, and child-chunk expansion.
- Route Canvas retrieval across datasets and memories with compatible
embedding validation.
2026-08-05 15:48:54 +08:00
jay77721
40ff1c9d03 feat: update all_models.json to content_length + max_output (#17839)
## Summary

Update `conf/all_models.json`: replace legacy `max_tokens` with
`content_length` + `max_output` for all 2,178 chat/vision models, with
values verified against official vendor documentation.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-05 15:43:11 +08:00
jay77721
47ecc2a231 feat: populate content_length and max_output from official docs (#17836)
## Summary

- Verify and populate `content_length` (context window) and `max_output`
(max generation tokens) for all **478 chat/vision models** across **47
provider configs**
- Data sourced from **official API documentation** via 12 parallel
agents + targeted web verification
- Update Go test assertions to match verified values

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-05 15:22:57 +08:00
Jack
310275208b refactor(chunker): replace allowBoundaryOverflow bool with MergeStrategy enum (#17851)
## Summary

Follow-up to #17835 (merged). The OVER_CAP / UNDER_CAP merge strategy
was threaded through `mergeDecision` and `mergeByTokenSizeFromJSON` as
an inlined `allowBoundaryOverflow bool` derived from `!c.param.UnderCap`
at three call sites. This replaces that with a named
`schema.MergeStrategy` enum.

## Why

- The `!c.param.UnderCap` inversion was hand-written in three places, so
a future strategy addition could silently drift between the JSON path
(`invokeTextPayload` / `invokeJSONPayload`) and the text path
(`mergeByTokenSize`) — no compile error, and the existing tests don't
cover all three sites with both strategies.
- The strategy concept was never named; `allowBoundaryOverflow` (true =
OVER_CAP) is a double-negation of `UnderCap` and reads opaquely at the
5th positional argument.

## What changed

- Add `schema.MergeStrategy` (`MergeOverCap` / `MergeUnderCap`)
mirroring Python's `rag/nlp/__init__.py` `MergeStrategy`, so Go and
Python stay on the same vocabulary.
- Expose `TokenChunkerParam.MergeStrategy()` derived from the
wire-facing `UnderCap bool` (existing `"under_cap"` configs keep working
— no schema break).
- `mergeDecision` and `mergeByTokenSizeFromJSON` now take
`schema.MergeStrategy` instead of `allowBoundaryOverflow bool`; the
three call sites pass `c.param.MergeStrategy()` (no `!`).
- Tests updated to pass the enum; added a guard test for the `UnderCap`
-> `MergeStrategy` mapping and an end-to-end test for UNDER_CAP on the
JSON path.

No behavior change: default remains OVER_CAP, `under_cap=true` still
selects UNDER_CAP.

## Test plan

`bash build.sh --test ./internal/ingestion/component/chunker/...
./internal/ingestion/component/schema/...` — all green, including
`TestMergeByTokenSizeFromJSON_UnderCapNoOverflow`,
`TestMergeByTokenSize_UnderCapNoOverflow`,
`TestInvokeJSONPayload_UnderCapEndToEnd`, and
`TestTokenChunkerParamMergeStrategy`.

## Related issues

- Relates to #17835 — wired UNDER_CAP as a tested merge-strategy seam
(merged)
- Relates to #17799 — contract doc for token-chunker cap/delimiter
alignment
- Relates to #17808 — related chunker alignment work

---------

Co-authored-by: CodeBuddy <noreply@cnb.cool>
2026-08-05 14:59:53 +08:00
Lynn
02923bfc46 Fix: display embedding model name in list dataset api response (#17832) 2026-08-05 14:51:07 +08:00
Kevin Hu
510e1197c6 Fix: graph explore bug. (#17829)
### Summary

Fix: graph explore bug.
2026-08-05 14:00:45 +08:00
Jack
17bafb363f fix(chunker): align Go token merge with Python OVER_CAP and delimiter boundary (#17835)
Consolidates the Go chunker work that syncs `TokenChunker` with the Python reference (`rag/nlp.naive_merge` / `rag/flow/chunker/token_chunker.py`)
2026-08-05 13:58:45 +08:00
Jin Hai
1e78789448 Go: add soft fingerprint framework (#17837)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
dev-20260805
2026-08-05 13:54:09 +08:00
Wang Qi
f057544e31 Fix: SIGTERM not handle well in ragflow server chat channel (#17828) 2026-08-05 11:52:53 +08:00
Jack
9b05e5c67e Fix: delimiter is chunk boundary, drop token_size atom-split (OVER_CAP default) (#17808)
## Summary

Fixes a regression introduced by #17203 (strict-cap atom-split) and a
secondary delimiter-handling bug from #17723.

**Root cause:**
- #17203 added `_split_oversized_unit` / `_compute_chunk_update`, which
split oversize units into ≤ token_size pieces. This collapsed
`token_size=1` into 1-token chunks and set the cap at 512, mismatching
the model-layer truncation boundary (embedding ~8191 / rerank
500/4096/8192/2048). Atom-split is unnecessary: oversize units stay
whole and the model layer truncates.
- #17723's delimiter handling dropped consecutive delimiters (`A####B`
-> `A##B`), glued JSON items with `"".join`, ignored
`children_delimiters`, and stripped whitespace delimiters.

## Changes

- New pure helper `merge_paragraphs(paragraphs, token_size, strategy)`
with a `MergeStrategy` enum (`UNDER_CAP` / `OVER_CAP`); **default
`OVER_CAP`**. `UNDER_CAP` is a strict cap (never overflows
`token_size`); `OVER_CAP` greedily accumulates adjacent paragraphs while
the projected total stays within `token_size`, merging one
boundary-overflow paragraph before closing. Oversize paragraphs stand
alone.
- `naive_merge` / `naive_merge_with_images` /
`RAGFlowTxtParser.parser_txt` now use `merge_paragraphs`; atom-split
removed. `naive_merge` / `naive_merge_with_images` always split a
section on the delimiter whenever one is present (even when the section
already fits `token_size`), so delimiter text never leaks into a chunk.
Only the empty-delimiter (size-only) mode skips splitting.
- `token_chunker`: delimiter text is dropped (not stripped); JSON flush
joins buffered items with `"\n"`; `children_delimiters` and
`PDF_POSITIONS_KEY` are preserved on the delimiter path. PDF positions
are now attributed **per segment** — each split chunk carries only the
positions of the item(s) that contributed to it — fixing a leak where
page-N coordinates were attached to page-M chunks and all segments
shared one preview image.
- `test_txt_parser.py` rewritten to assert the new contract (not the old
strict cap); `naive_merge` and delimiter-case-sensitive matrices
updated.

## Contract (refs #17799)

- user specified delimiter = chunk boundary; user specified delimiter
text never enters a chunk.
- `token_size` = soft target + merge strategy; no atom-split.
- Default strategy = `OVER_CAP`; migration can switch to `UNDER_CAP`
(strict cap).
- `OVER_CAP` has no hard cap; the model layer truncates oversize units.
`UNDER_CAP` enforces a strict cap.

## Notes

- Closes the wrong-object revert in #17774 (revert #17723 would
re-introduce delimiter-in-chunk and the strict cap).
- Go-side alignment (`internal/ingestion/component/chunker/token.go`) is
a follow-up PR.

---------

Co-authored-by: CodeBuddy <noreply@tencent.com>
2026-08-05 11:50:07 +08:00
Yingfeng
302e611a43 Fix: throw exception when switching ingestion pipeline (#17833)
### Summary

Throw exception when switching pipeline :

OperationalError('Attempting to close database while transaction is open.!)
2026-08-05 11:44:15 +08:00
balibabu
f5cdd0160e Fix: Switching back and forth between the wiki template's custom options caused the Instructions to disappear. (#17805) 2026-08-05 10:57:25 +08:00
balibabu
b0061fb4cc Feat: Remove the pageindex option from the extraction operator. (#17826) 2026-08-05 10:57:10 +08:00
chanx
9b81112db0 fix(list-filter-bar): correct nested filter to prune non-matching children (#17814) 2026-08-05 10:56:52 +08:00
deadtrickster
f063cfdb19 fix(api): decrement knowledgebase counters on SDK re-parse / stop-parse (#17236) 2026-08-05 10:28:46 +08:00