Skip to content

fix: make external plugin discovery explicit - #3878

Open
M-Hassan-Raza wants to merge 20 commits into
docling-project:mainfrom
M-Hassan-Raza:fix/plugin-discovery
Open

fix: make external plugin discovery explicit#3878
M-Hassan-Raza wants to merge 20 commits into
docling-project:mainfrom
M-Hassan-Raza:fix/plugin-discovery

Conversation

@M-Hassan-Raza

Copy link
Copy Markdown
Contributor

The CLI was discovering plugins during import, before it knew whether --allow-external-plugins was set. That is what caused the misleading disabled-plugin warning in #3284. This moves discovery into one cached registry and filters external entry points before importing their code.

The registry is shared by all four model factories, rejects ambiguous entry points and invalid hooks with useful errors, and keeps the existing factory override path intact. --show-external-plugins now also includes picture-description models and the package that provided each plugin. Pluggy is removed since this path no longer uses it.

Validation: branch hooks pass, along with the focused plugin, CLI, factory, options, and table tests. A full pytest run completed with 1,258 passing; the only two failures were tesserocr checks because this machine has no Tesseract language data installed.

Fixes #3284
Addresses #1444

Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
Signed-off-by: Hassan Raza <raihassanraza10@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @M-Hassan-Raza, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--allow-external-plugins not working with suryaocr

1 participant