Skip to content

Tags: infiniflow/ragflow

Tags

nightly

Toggle nightly's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: add Mistral OCR (/v1/ocr) as a document parser; fix "Can't find…

… model" mis-tag (#5782, #7075) (#17057)

### What problem does this PR solve?

Adds first-class support for **Mistral OCR** (`POST /v1/ocr`) as a
document parser, and fixes the long-standing bug where selecting
`mistral-ocr-latest` fails with `Can't find model for
<tenant>/image2text/mistral-ocr-latest`.

`mistral-ocr-latest` is Mistral's dedicated document-OCR endpoint, not a
vision-chat (`image2text`) model, but the catalog tagged it `image2text`
— so it resolved to the `CvModel` registry, which has no `Mistral`
entry, and there was no `OcrModel` entry either. This PR registers it
correctly and wires it end to end.

Closes #17056
Closes #5782
Closes #7075

**What it does**

1. **`MistralParser` + `MistralOcrModel`**
(`deepdoc/parser/mistral_parser.py`, `rag/llm/ocr_model.py`) — a proper
`OcrModel` factory `Mistral OCR`, mirroring the SoMark cloud-OCR
template. Tables stay inline as HTML; the page range maps to Mistral's
native `pages` selector (absolute page indices, billed per selected
page, so multi-task documents do not re-OCR the whole file); documents
over the inline limit go through the `/v1/files` signed-URL flow with
cleanup.
2. **Removes the `image2text` mis-tag** for `mistral-ocr-latest` from
the `Mistral` factory in `conf/llm_factories.json` (it now lives only in
the `Mistral OCR` factory, typed `ocr`). This is what closes the `Can't
find model` path.
3. **`MistralCV`** (`rag/llm/cv_model.py`) — a thin `GptV4` subclass
over Mistral's OpenAI-compatible endpoint, registering a `Mistral` entry
in the `CvModel` registry so Mistral vision models (`pixtral-*`) become
usable as `image2text` at all.
4. **Figure description** — Mistral-OCR-extracted figures are captioned
using the tenant's configured `image2text` model (any provider),
matching MinerU/deepdoc behaviour.
5. **Wires the parser into every chunking method** (`naive`, `paper`,
`book`, `laws`, `manual`, `one`, `presentation`) and the `rag/flow` DAG
path. This also fixes a related latent gap where those chunkers
forwarded only `mineru_llm_name`, so any model-based OCR provider
selected on a non-`naive` method silently fell through.

**Notes on the API contract** (verified against the live Mistral API):
`pages` is a selector (returns absolute `index`, bills only the
requested pages); `include_blocks: true` returns per-block bounding
boxes usable for chunk highlighting and figure cropping; large files use
`POST /v1/files` → signed URL → OCR → `DELETE`.

**Testing**: new unit tests cover the response→sections contract (both
the 2-tuple `naive` path and the typed 3-tuple DAG path), the
position-tag rescale, the HTTP client incl. upload failure/cleanup
paths, `parse_pdf` page-range threading, registry registration, env
config, the suffix normalization, the factory catalog entry, `MistralCV`
registration, and figure-description injection. Verified end to end
against the live Mistral API on real PDFs (table extraction,
page-selector cost avoidance, figure captioning).

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)

dev-20260724

Toggle dev-20260724's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(web): prevent multi-select popover from closing on first selection (

#17310)

dev-20260724-2

Toggle dev-20260724-2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix: parse by somark in parser (#17355)

dev-20260723

Toggle dev-20260723's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Go: add context to lots of interface (#17253)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>

dev-20260722

Toggle dev-20260722's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
migrate: replace zhipuai with zai-sdk to unblock pyjwt CVE fix (#17197)

## Summary

Old `zhipuai==2.0.1` SDK (MetaGLM/zhipuai-sdk-python-v4) requires
`pyjwt~=2.8.0`, which blocks upgrading pyjwt past 2.8.0 to address
active CVEs. The upstream project now recommends the maintained
successor [`zai-sdk`](https://github.com/zai-org/z-ai-sdk-python).

`zai-sdk` relaxes the pyjwt constraint to `>=2.9.0,<3.0.0`, allowing
pyjwt 2.13.0+. The embedding API surface (`client.embeddings.create`) is
identical, no functional changes required.

Related CVE's:

- CVE-2026-48522
- CVE-2026-48524
- CVE-2026-48525
- CVE-2026-48526
- CVE-2026-32597

dev-20260721

Toggle dev-20260721's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix: The form related to switching the dataset pipeline configuration…

… was not rendered. (#17124)

dev-20260721-2

Toggle dev-20260721-2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: add accessible check for datasets (#17116)

### Summary

As title:

Some operations on datasets have been fixed as they previously lacked
authentication, preventing team members from proper or correct usage.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

dev-20260720

Toggle dev-20260720's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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-2

Toggle dev-20260720-2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: unable to use multi model chat (#17097)

### Summary

As title

dev-20260717

Toggle dev-20260717's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix lefthook (#17023)