Commit Graph

7513 Commits

Author SHA1 Message Date
euvre
1c828daea1 Fix: shared chatbot completion ignores knowledge base and empty response (#17092) 2026-07-21 10:43:06 +08:00
euvre
ee8aa03fa0 fix(web): regenerate in multi-model chat uses the card's own state and model (#17126) 2026-07-21 10:40:59 +08:00
balibabu
c098c4c296 Fix: The form related to switching the dataset pipeline configuration was not rendered. (#17124) dev-20260721 2026-07-21 10:12:41 +08:00
Wang Qi
178b40cb25 Fix SharePoint connector not run after added (#17058) 2026-07-21 10:06:01 +08:00
Lynn
5c95b57d85 Fix(go): get VolcEngine model list (#17127) 2026-07-21 09:37:11 +08:00
Jin Hai
3670b047f0 Go: add audit log framework (#17129)
### Summary

Prepare for audit log

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 23:50:45 +08:00
euvre
f45f03a016 Add Go service/handler tests for API contract parity (#16905) 2026-07-20 20:02:41 +08:00
Jack
2f7c2eb53c Feat(ingestion): align image to MinIO upload, unify chunk-id computation and add PPT parsing support (#17111)
## Summary

Align the Go ingestion pipeline with Python's `image` → `img_id`
persistence semantics, and unify the chunk-id computation across all
paths.

### Changes

**1. Image upload at chunker stage **

- Add `ImageUploader` type and `DefaultImageUploader` in
`internal/ingestion/component/image_uploader.go` — the write-side
counterpart to `FetchBinary`, storing raw image bytes at `(bucket=kbID,
key=chunkID)`, no re-encoding.
- Add `uploadOneImage` — pure upload primitive (bytes in, `img_id` out),
does not touch chunk maps.
- Add `uploadChunkImages` / `uploadChunkImage` — caller-side helper:
decodes `image` from a chunk, uploads bytes, writes `ck["img_id"]`,
`delete(ck,"image")` , bounded by a process-wide semaphore (default 10,
env `MAX_CONCURRENT_MINIO`).
- Wire via `imageUploadDecorator` in `register.go`: every chunker runs
the upload pass at invocation time, writing `ck["id"]` before upload and
dropping image bytes right after — peak memory = single chunk image
lifetime.

**2. Unify chunk-id computation**

- Consolidate three separate id-computation paths (`component.ChunkID`,
`task.ChunkID`, inline `FormatUint` in API) into one:
`common.ChunkID(docID, text string)`, using `%016x` +
`xxhash.Sum64String(text+docID)` (matching Python `hexdigest()`).
- The chunker decorator writes `ck["id"]` via `common.ChunkID`; the
persist stage (`ProcessChunksForPipeline`) falls back to the same
function (`if !exists id`).
- The API AddChunk path now also calls `common.ChunkID` instead of the
divergent `FormatUint(xxhash.Sum64(...))` — fixing a pre-existing
inconsistency.
- Delete `internal/ingestion/component/chunk_id.go` and
`internal/ingestion/task/chunk_builder.go` (both were pure forwarding
shells).

**3. Preserve `img_id` (never deleted)**

- `img_id` is a persistent index field (Infinity, OB) and the only
consumer-side reference for image retrieval; it is NEVER removed from
the chunk map. Only `image` (raw data URL) is dropped after upload.

**4. PPT parser support**
Previously PPT parsing failed. Add support to parse.

### Key design decisions

| Decision | Choice |
|----------|--------|
| Upload timing | Chunker stage (not persist), so image bytes are
dropped immediately — bounds peak memory to one chunk image |
| Upload concurrency | Process-wide semaphore, default 10 (matches
Python `minio_limiter`), env `MAX_CONCURRENT_MINIO` |
| Image encoding | Store as-is, no JPEG re-encoding (unlike Python) |
| `img_id` format | `"<kb_id>-<chunk_id>"` — matches Python
task_executor path |
| id function | Single `common.ChunkID(docID, text)`, concatenation
`text+docID` inside hash (matching Python) |
| `removeInternalChunkFields` | Retains `delete(ck,"image")` as
defensive fallback for non-chunker paths |

### Files touched

| File | Change |
|------|--------|
| `internal/common/format.go` | Add `ChunkID(docID, text)` |
| `internal/common/format_test.go` | Add ChunkID golden-value test |
| `internal/ingestion/component/image_uploader.go` | Add `ImageUploader`
type + `DefaultImageUploader` |
| `internal/ingestion/component/chunker/image_upload.go` | Add
`uploadOneImage`, `uploadChunkImages`, `uploadChunkImage`,
`decodeChunkImage`, semaphore |
| `internal/ingestion/component/chunker/image_upload_test.go` | Tests:
upload/drop, skip, no-image, concurrency, missing-id error |
| `internal/ingestion/component/chunker/register.go` | Add
`imageUploadDecorator` (writes `ck["id"]`, runs upload) |
| `internal/ingestion/task/chunk_process.go` | Use `common.ChunkID` for
persist fallback |
| `internal/service/chunk/chunk.go` | Use `common.ChunkID` instead of
`FormatUint` |
| `internal/ingestion/component/chunk_id.go` | **Deleted** (moved to
`common`) |
| `internal/ingestion/task/chunk_builder.go` | **Deleted** (shell, no
callers left) |
| `internal/ingestion/task/chunk_builder_test.go` | **Deleted** (test
migrated to `common/format_test.go`) |

### Verification

```
bash build.sh --test ./internal/service/chunk/... ./internal/common/... ./internal/ingestion/component/... ./internal/ingestion/task/...
→ ok   service/chunk / common / component / chunker / schema / task
```
2026-07-20 19:33:51 +08:00
euvre
33765c1a64 Fix: add missing model provider icons (#17122) 2026-07-20 19:30:26 +08:00
euvre
bfd5e842ff style(web): unify model provider parameter labels to uppercase across locales (#17120) 2026-07-20 19:26:48 +08:00
euvre
b769c3edfd fix: soften ask_summary refusal for partially relevant knowledge (#17121) 2026-07-20 19:22:03 +08:00
euvre
8c18c4402a fix(web): make raw memory type non-removable in multi-select (#17119) 2026-07-20 19:20:26 +08:00
Haruko386
da2b1ce6d6 fix: one can edit team's memory (#17104)
### Summary

As title
2026-07-20 19:19:06 +08:00
Haruko386
0cd06e4013 Go: add tools for gitee, volcengine and zhipuAI (#17091)
### Summary

As title

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-07-20 19:18:48 +08:00
euvre
cf95d9ac0d fix(web): avoid flashing empty state when returning to agent list (#17118) 2026-07-20 19:14:49 +08:00
chanx
b3f731d4de Fix: model selection format compat and provider api_key wrapping (#17112) 2026-07-20 19:12:59 +08:00
Lynn
9a2a3c0459 Fix: add new default moonshot model (#17106) 2026-07-20 19:07:26 +08:00
balibabu
392b249404 Feat: Render the skills list using a tree view. (#17115)
### Summary
Feat: Render the skills list using a tree view.
2026-07-20 19:00:08 +08:00
Yurii214
aff9ff6d0a fix(agent/tools): surface github search error responses (#17064)
### Summary

`agent/tools/github.py` indexes `response["items"]` directly after
`requests.get(...).json()`. the github search api returns `{"message":
...}` **without** an `items` key on realistic conditions — a rate limit
(403/429; this tool sends no auth token, so the unauthenticated ~10
req/min search limit is easy to hit) or an invalid query (422). that
raised `KeyError('items')`, which the tool's retry loop then surfaced to
the model as the opaque `"GitHub error: 'items'"` instead of the real
reason.

this guards the missing key and raises the api's actual `message` (with
a clear fallback) into the existing retry/`_ERROR` path, so the model
sees e.g. `"GitHub error: API rate limit exceeded ..."`. valid responses
are unchanged.

adds `test/unit_test/agent/tools/test_github_unit.py` covering the
rate-limit response (asserts the real message is surfaced, no
`KeyError`) and the normal result path.

Co-authored-by: Yaroslav98214 <diakovichyaroslav30@gmail.com>
Co-authored-by: Haruko386 <tryeverypossible@163.com>
2026-07-20 17:53:53 +08:00
Jin Hai
75a8228d33 Fix missing info (#17107)
### Summary

1. Fix docker/service_conf.yaml.template
2. Remove unused config

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 17:32:32 +08:00
euvre
bc8bb9c51a fix(web): capitalize URL and drop exclamation marks in base URL locale strings (#17113) 2026-07-20 17:31:41 +08:00
maoyifeng
a150db6277 fix ci port allocated (#17109)
### Summary
1. fix the issue of ci failures under specific circumstances.
2. fix ci  port allocated
3. modified unit_test file only run on python
2026-07-20 17:29:52 +08:00
euvre
0e3a579fec fix(web): capitalize URL and drop exclamation mark in base URL locale strings (#17110) 2026-07-20 17:18:19 +08:00
euvre
3fa890294a fix: selected destination appears white in file move dialog in dark mode (#17085) 2026-07-20 16:47:48 +08:00
balibabu
9d850e782b Feat: Configure the relevant pipeline parameters on the dataset configuration page. (#17100) 2026-07-20 16:05:03 +08:00
Hz_
e87008e26c fix(go-agent): support Aliyun tool calls (#17099)
## Summary

  - Enable synchronous and streaming tool calls for Aliyun models.
- Preserve provider-specific chat endpoints and prevent repeated
qwen-flash tool calls.
  - Restrict retrieval tool inputs to model-provided query parameters.

  ## Testing

- `bash build.sh --test ./internal/entity/models
./internal/agent/component ./internal/agent/tool`
  - Manual frontend UI testing passed.
2026-07-20 15:54:55 +08:00
Haruko386
64541048c8 fix: unable to use multi model chat (#17097)
### Summary

As title
dev-20260720-2
2026-07-20 15:48:26 +08:00
euvre
67a2310ea4 fix: prevent share pages from overriding the user's theme preference (#17098) 2026-07-20 15:46:47 +08:00
euvre
624b4b03f3 fix[go]: skip LLM call for shared chatbot session handshake (#17095) 2026-07-20 15:30:50 +08:00
Jin Hai
b2e88c9933 Go: fix missing route (#17094)
As title.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 14:52:09 +08:00
Jin Hai
6b8a76c659 Go: refactor API route for EE (#17093)
### Summary

As title.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 14:34:35 +08:00
qinling0210
6c002ced86 Bump Infinity to v0.7.2 (#17075)
### Summary

Bump to infinity v0.7.2

Infinity image: infiniflow/infinity:v0.7.2-x64-v3
2026-07-20 14:30:24 +08:00
euvre
94708f8305 Fix: regenerate chat message does not truncate history (#17087) 2026-07-20 14:30:15 +08:00
Jin Hai
7ad27adecb Go CLI: add admin stats commands (#17090)
### Summary

```
RAGFlow(admin)> STATS USERS TOP 5 FROM '2026-01-01' TO '2026-02-01';
+-----------------------+----------------------------------------------+------------+---------------------+-----+
| command               | error                                        | from_date  | to_date             | top |
+-----------------------+----------------------------------------------+------------+---------------------+-----+
| get_token_users_stats | 'Get API token users stats' is not supported | 2026-01-01 | 2026-02-01 23:59:59 | 5   |
+-----------------------+----------------------------------------------+------------+---------------------+-----+
RAGFlow(admin)> STATS USER 'aaa@aaa.com' FROM '2026-01-01' TO '2026-02-01' MONTH;
+-----------------+----------------------------------------+------------+-------------+---------------------+-------------+
| command         | error                                  | from_date  | granularity | to_date             | user_name   |
+-----------------+----------------------------------------+------------+-------------+---------------------+-------------+
| get_token_stats | 'Get API token stats' is not supported | 2026-01-01 | month       | 2026-02-01 23:59:59 | aaa@aaa.com |
+-----------------+----------------------------------------+------------+-------------+---------------------+-------------+
RAGFlow(admin)> STATS SUMMARY FROM '2026-01-01' TO '2026-02-01' MONTH;
+-----------+------------------------------------------------+
| field     | value                                          |
+-----------+------------------------------------------------+
| to_date   | 2026-02-01 23:59:59                            |
| command   | get_token_stats_summary                        |
| error     | 'Get API token stats summary' is not supported |
| from_date | 2026-01-01                                     |
+-----------+------------------------------------------------+
```

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 14:24:28 +08:00
euvre
27b6cd1a65 fix(web): unify required asterisk color in instance name section (#17082) 2026-07-20 14:20:38 +08:00
Jin Hai
1fdf167f79 Go: refactor system stats (#17089)
### Summary

Move stats to a specific service from system

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 14:13:05 +08:00
chanx
2e396629e3 Fix: model provider save button label and light mode input background (#17081)
### Summary

Fix: model provider save button label and light mode input background

Co-authored-by: Wang Qi <wangq8@outlook.com>
2026-07-20 13:41:46 +08:00
maoyifeng
65b7d1565c fix: ci build apt install list error (#17086) 2026-07-20 13:33:58 +08:00
euvre
2e06c1dfcc fix[go]: stop leaking [DONE] sentinel into streamed chat answers (#17084) 2026-07-20 13:23:44 +08:00
Jack
b20ca452e6 Remove selectUploadParser: documents now inherit parser_id from KB directly (#17083) 2026-07-20 12:59:06 +08:00
Jack
c396ae912e Remove redundant PatchDSL and consolidate component-param injection into override_params (#17079)
## Summary

`Pipeline.Run` already accepts an `override_params` map (keyed by
`cpnID`, override-wins) that is merged into each component's params at
compile time via `canvas.WithOverrideParams`. `PatchDSL` performed a
byte-for-byte equivalent merge by baking `ParserConfig` into the DSL
text before compilation, so `runPipelineWithDSL` applied the same
`Doc.ParserConfig` twice with no effect.

## Change

- Delete the now-dead `PatchDSL` function
(`internal/ingestion/pipeline/pipeline.go`); it had a single call site.
- In `runPipelineWithDSL`, compile the DSL unchanged and pass the
extracted component params to `Run` as `override_params`.

## Behavioral note (important)

Previously `PatchDSL` was also the channel that delivered the tenant LLM
id into Extractor components: it baked `parserConfig` — after
`common.InjectExtractorLLMID(parserConfig, Tenant.LLMID)` had injected
`llm_id` — into the DSL. The old `Run` override_params re-cast
`Doc.ParserConfig` (which intentionally omits `llm_id`). So removing
`PatchDSL` while keeping that re-cast would have silently dropped LLM id
injection. This change passes the local `parserConfig` (the
LLMID-injected copy) to `Run`, preserving the prior behavior.

The DSL string returned by `runPipelineWithDSL` is only consumed by
`recordPipelineLog` (structure storage) and `ExtractPayload` (which
reads the terminal structure, not params), so returning the original DSL
is equivalent.

## Test plan

- `bash build.sh --test ./internal/ingestion/task/...
./internal/ingestion/pipeline/...` — both packages pass.
- `gofmt` clean; pre-commit hooks pass.

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-20 11:46:07 +08:00
Lynn
af3813b218 Fix: display timeout error when checking model accessibility (#17080) 2026-07-20 11:34:20 +08:00
Haruko386
0f94e05ffa refactor[go]: replace DSModel with ModelListItem (#17038) 2026-07-20 10:50:53 +08:00
Haruko386
a9db04ab23 fix: unable to got SEE response when use tools (#17076)
### Summary

As title
2026-07-20 10:50:30 +08:00
iwasaki
679d0d2ad2 i18n: complete Japanese translation for ja.ts (#17042)
## What

The Japanese locale (`web/src/locales/ja.ts`) was missing translations
for **1703 of 2686 keys (~63%)**. Because i18next's `fallbackLng`
silently falls back to English for any missing key, most of the UI
stayed in English even after selecting 日本語 — e.g. the Settings > Model
Providers page, the Agent/Flow builder, dataset configuration panels,
and more.

This PR fills in all 1703 missing keys with Japanese translations.
2026-07-20 10:37:38 +08:00
Kevin Hu
3da2425158 Feat: Add dataset_navigate to agentic searhc (#17052)
### Summary

Add dataset_navigate tool to agentic search

---------

Co-authored-by: Yingfeng Zhang <yingfeng.zhang@gmail.com>
dev-20260720
2026-07-20 09:59:33 +08:00
Lynn
e37cd86122 Fix: OpenDataLoader parser (#17037) 2026-07-20 09:49:19 +08:00
Jack
965590ccbe Refactor: dataset/document/file service (#17071)
### Summary

Refactor dataset.go document.do file.go file2document.go in
internal/service.
2026-07-20 09:48:24 +08:00
buua436
99f13172ad fix: preserve chunks when updating compilation templates (#17035) 2026-07-20 09:48:20 +08:00
S
962fe9ff57 Fix: right-anchored split in web parseModelValue / parseModelUuid (#16737)
Follow-up to #16468.

PR #16468 fixed the Python
(`api/db/joint_services/tenant_model_service.py
split_model_name`) and Go (`internal/service/model_service.go
parseModelName`)
parsers to right-anchor the '@'-split on the composite
"model_name@instance@provider" key, but the matching helper in the
front-end
(`web/src/utils/llm-util.ts parseModelValue`) was missed.

parseModelValue used `split('@')` (anchored on the first '@'), which
silently
mangles composite keys whose model_name itself contains '@' (e.g. LM
Studio
embedding IDs like `text-embedding-nomic-embed-text-v1.5@q8_0`):

  text-embedding-nomic-embed-text-v1.5@q8_0@lmstudio@LM-Studio

became

  model_name:     text-embedding-nomic-embed-text-v1.5
  model_instance: q8_0@lmstudio
  model_provider: LM-Studio

`PATCH /api/v1/models/default` then sent those to the server, which
returned
HTTP 200 with body `{"code": 102, "message": "Instance 'q8_0@lmstudio'
not
found for provider 'LM-Studio'"}`. The UI swallowed the body-level error
code, so the failure was silent: no toast, the Embedding field stayed
empty.

This change makes parseModelValue do a right-anchored split that mirrors
the
Python `split_model_name` `rsplit('@', 2)` exactly:

  - 3-part form: model_name@instance@provider -> same three fields.
- 2-part form: model_name@provider -> model_instance defaults to
"default"
    (matching Python).
- 4+-part form (embedded '@' in model name): last two fields are
anchored
as instance and provider, everything to the left is the bare model name.

`parseModelUuid` is updated to the same right-anchored split so the
factoryId portion of `model_name@factory_id[#instance]` keeps the last
'@'
as the separator even when the model name itself contains '@'.

Adds jest cases under `web/src/utils/tests/llm-util.test.ts` (12 total)
covering the plain 3-part, 2-part, 4-part, multi-'@' name,
buildModelValue
round-trip and parseModelUuid variants.

Note for reviewers: the front-end is bundled into the published docker
image, so a release containing this fix will need `docker compose build
--no-cache ragflow-cpu` (or equivalent) for it to be visible to end
users.

Refs #16468, #16467
2026-07-20 09:31:02 +08:00