Commit Graph

7399 Commits

Author SHA1 Message Date
Harsh Kashyap
81361c2108 fix(mineru): thread page_from/page_to into MinerU API request (#16957) 2026-07-16 12:23:03 +08:00
Jin Hai
d2e5e480a1 Fix database data types (#16965)
### Summary

Fix two data types definition.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-16 11:44:00 +08:00
VincentLambert
8f87e19120 feat(llm): add AWS Bedrock reranker connector (#16960)
## What

Adds a reranker connector for the **Bedrock** factory, which previously
offered
chat/embedding/CV models but no reranker — selecting a Bedrock rerank
model
raised `Factory not in rerank model`.

## How

`BedrockRerank` calls the `bedrock-agent-runtime` Rerank API. It reuses
the same
JSON key protocol as `BedrockEmbed` (`auth_mode` / `bedrock_region` /
`bedrock_ak` / `bedrock_sk`, with `access_key_secret` / `iam_role` /
`assume_role` modes). Documents are truncated to the model window
(Cohere Rerank
v3.5 ~2k of its shared 4k window, Amazon Rerank v1 8k) on top of
Bedrock's own
internal truncation. Scores are returned in `[0, 1]`, so the shared
`Base.similarity` normalization applies unchanged.

Verified against `amazon.rerank-v1:0` and `cohere.rerank-v3-5:0` in
`eu-central-1`.

> Note: this PR adds the connector only. Bedrock rerank models can be
selected by
> adding the relevant entries to `conf/llm_factories.json` under the
Bedrock
> provider; that catalog change is intentionally left out of this PR.

## Tests

`test/unit_test/rag/llm/test_bedrock_rerank.py` — boto3 is mocked (no
AWS call):
score-by-index mapping, per-model document truncation, model ARN
construction,
auth-mode validation and the empty-input short-circuit. `pytest` green
alongside
the existing reranker normalization suite.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-07-16 11:06:20 +08:00
Jack
047c714ffb Feat: ingestion cleanup (#16953)
### Summary

1. Remove dead code (replaced by builtin ingestion pipeline)
2. Refactor (move document parsing progress from http api into ingestion
executor)
2026-07-16 11:05:26 +08:00
buua436
06f23ddc38 fix: avoid resetting documents on non-parser updates (#16962) 2026-07-16 10:57:42 +08:00
Lynn
1c8578d819 Fix: verify model (#16951) 2026-07-16 10:49:02 +08:00
Wang Qi
4518a588bd Fix agent upload file permission (#16963)
Follow on #16946
2026-07-16 09:52:28 +08:00
Zane
e961ef04bf fix: avoid duplicating video descriptions during parsing (#16847)
## What this PR does

Removes the self-concatenation of the vision model response in the video
parsing path, so each generated video description is tokenized and
indexed exactly once.

A focused regression test exercises the public `picture.chunk` video
path with a mocked vision model and asserts that the returned
description is passed to `tokenize` once without duplication.

## Root cause

The original video parsing implementation used:

```python
ans += "\n" + ans
tokenize(doc, ans, ...)
```

This duplicates the same model response. The adjacent image path
combines two distinct values (`OCR text + vision description`); the
video path has only the model response, so concatenating it with itself
is an unintended copy/paste error from that image logic.

## Impact

Before this fix, every successfully parsed video stored repeated text,
increasing token and embedding input and potentially distorting indexed
chunk content and retrieval scoring.

## Compatibility

The change affects only the video branch in `rag/app/picture.py`. Image
parsing, model invocation, prompts, callbacks, and error handling remain
unchanged.

## Validation

- `pytest --confcutdir=test/unit_test/rag/app
test/unit_test/rag/app/test_picture_video.py -q`: 1 passed
- Ruff check: passed
- Ruff format check for the new test: passed
- `git diff --check`: passed

Closes #16846.

---------

Co-authored-by: openhands <openhands@all-hands.dev>
dev-20260716
2026-07-16 09:41:18 +08:00
Zane
eeb59ec4f2 feat(stt): support Fun-ASR-Flash in Tongyi-Qianwen provider (#16844)
## What this PR does

Adds support for Alibaba Cloud's hosted Fun-ASR-Flash snapshots to the
existing Tongyi-Qianwen speech-to-text provider.

- registers `fun-asr-flash-2026-06-15` as a speech-to-text model;
- routes only `fun-asr-flash*` models to the documented workspace-native
multimodal-generation endpoint;
- supports local audio through size-checked data URIs as well as
URL/data-URI inputs;
- uses the documented SSE response mode for incremental streaming
transcription;
- closes the streamed HTTP response on completion, failure, or early
consumer cancellation;
- preserves the existing `dashscope.MultiModalConversation` path for all
other Qwen audio models;
- keeps RAGFlow's existing synchronous and streaming adapter interfaces.

## Why

Fun-ASR-Flash does not use the legacy Qwen audio request shape currently
used by `QWenSeq2txt`. Its synchronous API expects `input_audio` at:

`/api/v1/services/aigc/multimodal-generation/generation`

Without a narrowly scoped adapter path, the hosted model cannot be
selected successfully through RAGFlow's Tongyi-Qianwen speech-to-text
provider.

Closes #16843.

## Compatibility

The new behavior is gated by the `fun-asr-flash` model-name prefix.
Existing Qwen audio models continue through the original code path
unchanged.

## Validation

- `pytest test/unit_test/rag/llm/test_sequence2txt_model.py`: 10 passed
- Ruff check: passed
- Ruff format check: passed
- `llm_factories.json` validation: passed
- Real hosted-API validation with WAV audio
- Real RAGFlow upload/indexing validation with MP3 audio

The unit tests cover the native Fun-ASR-Flash request, regression
behavior for the legacy Qwen path, SSE streaming, and early response
cleanup.

## Documentation

- https://help.aliyun.com/document_detail/2979031.html
- https://help.aliyun.com/document_detail/2869541.html
### Why a dedicated adapter path is necessary (official evidence)

Alibaba Cloud's [Fun-ASR RESTful API
reference](https://help.aliyun.com/en/model-studio/fun-asr-recorded-speech-recognition-http-api)
makes the incompatibilities with RAGFlow's existing Qwen audio path
explicit:

| Adapter change | Official API requirement | Why the existing path is
insufficient |
| --- | --- | --- |
| Call the workspace-native HTTP endpoint | The Fun-ASR-Flash
synchronous section states that SDK calls are not supported and
specifies `POST /api/v1/services/aigc/multimodal-generation/generation`.
| The existing adapter calls `dashscope.MultiModalConversation`, so a
direct HTTP path is required. |
| Use the `input_audio` message shape | `input.messages`, `content`,
`type: input_audio`, `input_audio`, and `input_audio.data` are
documented as required for an audio request. | The existing Qwen path
sends the legacy `audio` content shape, which does not match this API
contract. |
| Send `parameters.format` | The request schema marks `parameters` and
`format` as **Required**, and says the value must match the actual audio
format. | The legacy request has no Fun-ASR-Flash `parameters.format`
field, so the adapter must derive and send it. |
| Encode local files as Data URIs | `input_audio.data` accepts either a
public URL or a Base64 Data URI; the reference gives the exact
`data:{MIME_TYPE};base64,...` form. | RAGFlow supplies local file paths,
which the remote API cannot read directly. |
| Parse `output.text` | The documented non-streaming response returns
the accumulated transcription in `output.text`. | The legacy Qwen
response parser reads `output.choices[].message.content`, so a separate
response parser is required. |
| Enforce the Base64 input limit | The reference requires the
Base64-encoded audio to remain within the 10 MB input limit. | The
adapter checks encoded size before reading/sending local audio and
directs oversized inputs to the existing public-URL path. |
| Use SSE for streaming | The reference specifies `X-DashScope-SSE:
enable` and documents intermediate and final SSE events. | The adapter
parses those events instead of wrapping one blocking response as a
synthetic stream. |
| Release streamed responses | Streaming responses must be closed when
iteration completes or stops early. | A `finally` cleanup releases the
HTTP response on completion, errors, and consumer cancellation. |

`sample_rate` is documented as **Optional**. The implementation omits it
instead of declaring a fixed value that may not match remote or
compressed audio.

The [official speech-to-text model
list](https://help.aliyun.com/en/model-studio/asr-model/) separately
confirms that `fun-asr-flash-2026-06-15` is an offline HTTP model with a
five-minute audio limit.

---------

Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: LauraGPT <LauraGPT@users.noreply.github.com>
2026-07-16 09:37:37 +08:00
SYED ALI ABBAS RAHIL
bda703b588 test: add regression coverage for metadata filter pagination beyond push-down cap (#16932)
### Summary

#16524 reports that a manual metadata filter matching more documents
than the ES push-down cap (`filter_doc_ids_by_meta_pushdown`'s default
`limit=10000`) drops documents once the request falls back to the
in-memory path — e.g. a `canon Not in ["0"]` filter over a
39,573-document KB where ~38,500 matching documents never come back.

I traced through the current code path for this exact scenario:
- `_filter_doc_ids_by_metadata_es` correctly detects when the match
total exceeds the push-down cap and bails to the in-memory fallback
instead of returning a truncated slice.
- `get_flatted_meta_by_kbs` (fixed by #16095) now fully paginates
through every document in the KB rather than stopping after the first
page.
- `es_conn.py`'s `search()` already switches to `search_after`-based
pagination once `offset + limit` would exceed ES's `max_result_window`
(10,000), so the outer pagination loop doesn't get cut off by that
ceiling either.
- `meta_filter()` then aggregates over the complete flattened metadata
with no additional cap.

I couldn't reproduce the drop against current `main` following that
path. This PR adds a test that simulates the exact reported scenario
(12,000 synthetic documents, `canon Not in ["0"]` matching all but 30 of
them) against a fake, paginated `docStoreConn` standing in for
Elasticsearch — both assertions pass on current `main`.

To make sure this is a meaningful regression test and not a false
positive, I temporarily reverted `get_flatted_meta_by_kbs` to stop after
the first page (the pre-#16095 behavior) and confirmed the test
correctly fails (970 of the expected 11,970 documents), then restored
the original code before committing.

Given all of that, it looks like #16524 may already be fixed by the
combination of #16095 and the existing `search_after` handling in
`es_conn.py`, but I could be missing something about the reporter's
specific deployment or a scenario I haven't considered (e.g. a
downstream cap once matched doc_ids feed into the content-chunk
retrieval query). I've left a comment on the issue with this same
analysis so a maintainer familiar with the history here can confirm or
point me at what I'm missing. Either way, this test is a useful
regression guard for the pagination behavior going forward.
2026-07-16 09:33:48 +08:00
Harsh Kashyap
5c96fa51f0 fix(docling): detect chunked response by shape, not request payload (#16921)
Fixes #16917.

## Problem

`deepdoc/parser/docling_parser.py::_parse_pdf_remote` decides whether
the
response is chunked based on which payload was sent, not on what came
back.
Docling Serve silently drops unknown fields such as `do_chunking`
(Pydantic
`extra="ignore"`) and returns a standard `{"document": ..., "status":
...}`
conversion response. The code then:

1. sets `is_chunked_response = True` from the request shape,
2. logs `Successfully used native chunking on: <endpoint>`,
3. extracts 0 chunks from `response_json.get("results", [])`,
4. logs `Native chunks received: 0`,
5. falls through to the existing `md_content` fallback.

The `md_content` fallback path is fine. The misleading log lines are the
problem: operators see "Successfully used native chunking" immediately
followed by "Native chunks received: 0" and "No chunk built", which
looks
like an internal regression rather than a server contract gap.

## Fix

Decide chunked-vs-standard from the **response shape**, not the request:

```python
response_is_chunk = self._looks_like_chunk_response(response_json)
is_chunked_response = chunk_flag and response_is_chunk
```

`_looks_like_chunk_response` returns True iff the response is a
non-empty
list or a dict with a non-empty `results` or `chunks` list. A standard
conversion response (`{"document": ..., "status": ...}`) does not match,
so
a server that ignored the chunking flag is correctly classified as
standard
even when the request payload asked for chunking.

When chunking was requested but the server returned a standard response,
log a single WARNING ("Server ignored chunking request on <endpoint>;
treating response as standard conversion.") instead of the INFO success
line. The misleading "Prioritizes native chunking endpoints" docstring
is
replaced with what the code actually does.

## Tests

`test/unit_test/deepdoc/parser/test_docling_parser_remote.py` (6 tests,
all passing):

- `test_remote_chunked_200_standard_payload_falls_back` (existing —
still
  passes; the `md_content` path is unchanged)
- `test_chunk_shape_helper_recognises_chunk_payloads`
- `test_chunk_shape_helper_rejects_standard_payloads`
- `test_remote_chunked_request_with_results_list_is_treated_as_chunked`
- `test_remote_top_level_list_response_is_treated_as_chunked`
- `test_remote_chunked_request_with_ignored_flag_does_not_log_success`

```
$ uv run pytest test/unit_test/deepdoc/parser/test_docling_parser_remote.py -v
============================== 6 passed in 0.26s ==============================
```

## Files changed

- `deepdoc/parser/docling_parser.py` (+35 / -5)
- `test/unit_test/deepdoc/parser/test_docling_parser_remote.py` (+89 /
-4)

## Backward compatibility

- All four payload/endpoint combinations continue to be tried in the
same order.
- The bundled-docling happy path (`parse_pdf`, not `_parse_pdf_remote`)
is
  untouched.
- A server that returns a real chunked response to a chunked request
still
goes down the chunked branch. A server that returns a standard response
  to a chunked request now goes down the standard branch with
  `is_chunked_response=False` instead of misleadingly logging success.

## Follow-up (out of scope)

Calling the real Docling-Serve native chunk endpoints
(`/v1/chunk/hybrid/source`, `/v1/chunk/hierarchical/source`) with
`HybridChunkerOptions` is a larger feature change and warrants its own
PR after this lands.

Co-authored-by: Harsh23Kashyap <harsh@example.com>
2026-07-16 09:29:09 +08:00
Yingfeng
df5c8e73fc Fix slow CI case (#16955) 2026-07-16 00:32:51 +08:00
Kevin Hu
454dea686e Feat: agentic search framework (#16859)
### Summary

Agentic search

<img width="1149" height="1575" alt="image"
src="https://github.com/user-attachments/assets/bce9a3e7-0517-4fb2-80a2-5d2a81a4da78"
/>

---------

Co-authored-by: Yingfeng Zhang <yingfeng.zhang@gmail.com>
2026-07-15 23:46:23 +08:00
Jin Hai
2a6e210020 Go: align db schema to python (#16935)
As title.

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-15 23:05:06 +08:00
Haruko386
ff3d566a4f fix[go]: support retrieval kb in agent chat (#16944)
### Summary

As title
- [x] fix tool & component `Retrieval KB`
- [x] fix agent cannot use  `Retrieval KB` in agent chat

#### Main cause

Model provider do not set up:
```Go
if chatModelConfig.Tools != nil {
    reqBody["tools"] = chatModelConfig.Tools
}
```

#### Working Now
<img width="3774" height="2128" alt="image"
src="https://github.com/user-attachments/assets/400a349d-0211-43e5-a7ec-7a014acf77a6"
/>

```
 ____________________________________
< This PR takes me all day to do it. >
 ------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ                                                                                                                                                                                                    
```
2026-07-15 21:44:28 +08:00
Hz_
a7da78d0d7 refactor(go-agent): unify tool-backed canvas components (#16912)
## Summary

This PR consolidates Eino-backed Agent tools behind the shared
ToolBackedComponent implementation and aligns their Canvas
configuration,
runtime inputs, output conversion, validation, and registration.

## What changed

- Migrated these Canvas components to the unified tool-backed path:
    - Tavily Search and Extract
    - Execute SQL
    - Google
    - Yahoo Finance
    - Email
    - DuckDuckGo
    - Wikipedia
    - Google Scholar
    - ArXiv
    - PubMed
    - BGPT
    - GitHub
    - WenCai
    - SearXNG
    - Keenable Search

- Removed superseded component wrappers and their duplicate tests.
- Added dedicated registry builders for node-level configuration and
validation.
- Kept model-emitted runtime inputs separate from Canvas node
configuration.
- Moved Email defaults, template resolution, recipient parsing, SMTP
execution, and output conversion into the owning tool.
- Added complete ToolComponent specifications for Canvas inputs,
outputs, and input forms.
- Preserved raw upstream fields where downstream workflows may depend on
them.
- Added workflow registration coverage for all migrated component names.
- Kept HTTP Request, Docs Generator, and Browser as standalone
components because they are not Eino-backed tools.

## Testing

Passed:

bash build.sh --test ./internal/agent/tool/...
bash build.sh --test ./internal/agent/component/...
bash build.sh --test ./internal/agent/runtime/...

<img width="2057" height="1111" alt="image"
src="https://github.com/user-attachments/assets/c728d7a3-9d15-4c5c-b0eb-6b77ad0e41ac"
/>
<img width="2057" height="1111" alt="image"
src="https://github.com/user-attachments/assets/ef13119a-ef92-4b43-9061-eee9511bf492"
/>
<img width="2057" height="1111" alt="image"
src="https://github.com/user-attachments/assets/f50f2c30-eab0-463c-b0b3-0a02523219f1"
/>
2026-07-15 21:42:08 +08:00
Jakob
d55de09b7d Updated RAGcon model provider (go) (#16950)
### Summary
We have updated our model driver to work with go.
It is based on OpenAI-API-Compatible model provider.

Draft
#15519

Our old model provider
#13425
2026-07-15 20:59:23 +08:00
zhifu gao
794c6b63e4 fix(agent): return DataOperations input form (#16930)
## Summary

- return the input form collected by
`DataOperationsComponent.GetInputForm`
- add a regression test covering system variables, component outputs,
and duplicate references
2026-07-15 20:32:59 +08:00
zhifu gao
06e36d24f4 feat(stt): add FunASR / SenseVoice provider (#16473)
### Summary

Adds FunASR as a self-hosted speech-to-text provider through its
OpenAI-compatible `/v1/audio/transcriptions` endpoint.

This is a focused replacement for #15526 by @Rene0422 and relates to
#15448. The unrelated Markdown parser changes from the previous branch
are intentionally removed so this PR contains only the FunASR provider
integration.

- register FunASR as a `SPEECH2TEXT` factory;
- add `FunASRSeq2txt` with `sensevoice` and `http://localhost:8000/v1`
defaults, an optional API key, URL normalization, and inherited
transcription handling;
- wire FunASR into the current local-provider schema with a prefilled
local URL and official documentation link;
- discover the server's `/v1/models` dynamically and expose every
returned model as speech-to-text in the model picker;
- use RAGFlow's existing default provider icon fallback instead of
referencing a missing `funasr` asset;
- list FunASR in the supported-provider documentation;
- add focused backend and frontend regression tests.

### Validation

- focused backend pytest suite -> `7 passed`
- real CPU `funasr-server` + RAGFlow provider smoke test -> discovered
`fun-asr-nano`, `sensevoice`, and `paraformer`; transcribed a real WAV
as `我现在在录一段测试音频` (`10` tokens, `0.504s`)
- `ruff check` and `ruff format --check` on the changed Python files
- `python3 -m py_compile` on the provider and its test
- JSON parse and a semantic assertion for exactly one enabled FunASR
`SPEECH2TEXT` factory
- focused frontend Jest test -> `2 passed`
- ESLint and Prettier on all changed TypeScript files
- `npm run build` -> production build succeeded (`14,181` modules
transformed)
- `git diff --check`

### Deployment

Run FunASR separately and point the RAGFlow provider at it:

```bash
pip install funasr
funasr-server --device cuda --model sensevoice
```

The API key remains optional because the stock local server does not
require authentication. A key can still be supplied when the endpoint is
protected by a gateway.

---------

Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com>
Co-authored-by: LauraGPT <LauraGPT@users.noreply.github.com>
2026-07-15 19:02:05 +08:00
Wang Qi
2223a514de Fix cancel ingest task, it will be stilling running and show internal server error (#836) (#16945) 2026-07-15 18:33:51 +08:00
Wang Qi
3b26688d68 Fix rename file only update the first linked dataset (#831) (#16947) 2026-07-15 18:33:26 +08:00
Jack
3d65e8d124 Revert frontend changes from PR #16873 (#16948) 2026-07-15 17:49:37 +08:00
euvre
70a49c947d Remove unused /datasets/<id>/embedding endpoint (#16936) 2026-07-15 17:42:41 +08:00
Wang Qi
77d35a3387 Fix agentbot cannot upload file (#828) (#16946) 2026-07-15 17:30:10 +08:00
buua436
4391e03886 refa: optimize knowledge compilation concurrency (#16933)
### What problem does this PR solve?

Improve concurrency in the knowledge compilation pipeline:

- Run Compile LLM requests concurrently while preserving ordered
commits.
- Run merge flush tasks concurrently while keeping ES writes ordered.
- Improve concurrency for local deduplication, chain validation, and ES
deduplication.
- Remove temporary debugging instrumentation and unused timing
variables.

### Type of change

- [x] Refactor (no functional change)
2026-07-15 16:24:35 +08:00
Lynn
63c010cd04 Fix: code-rabbit review comment (#16940) 2026-07-15 15:44:08 +08:00
Haruko386
166ed3c159 Json: add some aliyun models (#16926)
### Summary

As title
2026-07-15 15:42:54 +08:00
balibabu
33e224cc4f Feat: Modify the Chinese translation file for the knowledge compilation template. (#16941)
### Summary

Feat: Modify the Chinese translation file for the knowledge compilation
template.
2026-07-15 15:34:57 +08:00
Lynn
51fa76295f Fix: sort memory by create_time desc (#16942) 2026-07-15 15:00:39 +08:00
euvre
5184373a97 refactor: remove localStorage persistence for system model settings (#16934) 2026-07-15 14:58:32 +08:00
Jack
e543ff02c4 Feat: nats message processing refactor and support built in DSL (#16873) 2026-07-15 14:53:16 +08:00
maoyifeng
e082e69951 fix ci : only run web ci (#16939)
### Summary

fix  ci : only run web ci
2026-07-15 14:51:10 +08:00
chanx
30cc00bed2 feat(dataflow-result): scroll to and highlight newly created chunk (#16937) 2026-07-15 14:33:36 +08:00
Haruko386
14d361aa51 refactor: remove unused getInputElementsFromText function (#16927)
### Summary

Removed unused function getInputElementsFromText and its associated
comments.
2026-07-15 11:38:52 +08:00
Haruko386
a19af34d31 fix: unable to use agent in agent (#16910)
### Summary

As title

#### Agent:
<img width="3707" height="2030" alt="image"
src="https://github.com/user-attachments/assets/68480004-9c79-4302-ae22-eb3375b7fac9"
/>

#### Data_operations
<img width="3716" height="2044" alt="image"
src="https://github.com/user-attachments/assets/068cc1a6-1ba5-4746-a447-a706d2149ef5"
/>
2026-07-15 10:58:59 +08:00
Haruko386
215d291cfa fix: support email send for go backend (#16895)
### Summary

As title

<img width="3761" height="2036" alt="image"
src="https://github.com/user-attachments/assets/775f8c2a-784e-4713-bcf0-c26bfc368dac"
/>


<img width="1256" height="2760" alt="d2aeeb50dd11cc8dc76bc4743425680e"
src="https://github.com/user-attachments/assets/80f9c572-549d-427f-8e48-35dc04cfa98a"
/>
2026-07-15 10:56:36 +08:00
Haruko386
654279a745 fix: support code_execute for go backend (#16903)
### Summary

As title

<img width="3764" height="2033" alt="image"
src="https://github.com/user-attachments/assets/3f5084c2-0a04-4a44-bb31-a39a59c2a91f"
/>
2026-07-15 10:55:39 +08:00
Haruko386
3339040987 fix: add GetInputForm for string_transform (#16900)
### Summary

As title:

#### merge:
<img width="2972" height="1473" alt="image"
src="https://github.com/user-attachments/assets/2171e31f-13f4-4799-a6d0-1b9326210658"
/>

---
#### split
<img width="858" height="416" alt="image"
src="https://github.com/user-attachments/assets/f89d39e3-da85-4349-a53c-e27a17cc9dfa"
/>
2026-07-15 10:54:18 +08:00
Hz_
276941f7b4 fix(go-agent): add VariableAssigner input form (#16902)
## Summary

- Add the runtime input form for VariableAssigner components
- Allow the component input-form endpoint to resolve VariableAssigner
nodes

## Testing

- `bash build.sh --test ./internal/agent/component/...`
2026-07-15 10:47:49 +08:00
VincentLambert
5cf95d2c0f Fix: admin password update crashes for SSO users (500 'NoneType' object has no attribute 'split') (#16914)
### What problem does this PR solve?

Setting a password from the admin panel for an SSO-provisioned account
(OIDC/OAuth/GitHub) returns a **500** with:

```
'NoneType' object has no attribute 'split'
```

**Root cause** — SSO-provisioned accounts have no local password, so
`usr.password` is `None` (the `User.password` column is `null=True`). In
`UserMgr.update_user_password` (`admin/server/services.py`), the "same
password" optimization calls:

```python
if check_password_hash(usr.password, psw):
```

`werkzeug.security.check_password_hash(None, psw)` internally does
`pwhash.split("$")`, which raises `AttributeError: 'NoneType' object has
no attribute 'split'` → surfaced as a 500.

**Repro**
1. Configure an SSO channel (OIDC/OAuth) under `oauth` in the service
config.
2. Log in once via SSO so the account is auto-provisioned (created
without a local password).
3. In the admin panel, set/change that user's password.
4. → 500 `'NoneType' object has no attribute 'split'`.

**Fix** — guard the equality check with `usr.password`. A passwordless
(SSO) user skips the comparison and goes straight to setting the new
password, which is the desired behavior (it gives them a password
fallback in addition to SSO).

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dev-20260715
2026-07-14 23:30:35 +08:00
rayhan
75d9efa27c fix: remediate urllib3 CVEs (#16907) 2026-07-14 22:57:29 +08:00
Jin Hai
b506d8ec5f Go: add more frameworks (#16915)
### Summary

1. Add hooks for server init
2. Add hooks for router init
3. Add jaeger and otel related config

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-14 22:20:26 +08:00
Jin Hai
c242669a9d Go: fix bugs (#16911)
### Summary

1. Fix 'list users' in admin CLI
2. Change 3 slow test cases priority.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-14 21:58:33 +08:00
Lynn
bd7a3bb878 Fix: align go provider apis with python apis (#16867)
### Summary

As title.

---------

Co-authored-by: Jin Hai <haijin.chn@gmail.com>
Co-authored-by: Wang Qi <wangq8@outlook.com>
2026-07-14 21:06:11 +08:00
Wang Qi
55d5879622 Fix file link-to-datasets to suport both replace and add (#817) (#16908) 2026-07-14 20:12:31 +08:00
chanx
376a9057a8 fix(setting-model): keep newly saved instance card expanded after name save (#16904) 2026-07-14 20:11:45 +08:00
Wang Qi
3087eb854c Fix Agent bot 2 permission bugs (#818) (#16909) 2026-07-14 20:11:16 +08:00
hyotaek kim
760203be42 fix(agent): preserve zero temperature setting (#16897)
### Summary

- Preserve an explicitly enabled `temperature=0` in the Agent LLM
configuration.
  - Continue excluding invalid negative temperature values.
  - Add a focused regression test to the existing Agent LLM test file.

  Fixes #16683
2026-07-14 20:10:51 +08:00
Jin Hai
26161ce844 Go: refactor (#16906)
### Summary

remove and merge code

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-14 19:29:34 +08:00
Paul Y Hui
a5a6dcfd5d Fix: Refine the git ignore file to exclude dependencies (#16882)
### Summary
Refined the git ignore file to exclude the dependencies when working new PR.
2026-07-14 19:10:51 +08:00