Skip to content

feat(parser): support PaddleOCR-VL API key#1722

Open
langcaiye wants to merge 2 commits into
Tencent:mainfrom
langcaiye:feat/paddleocr-vl-api-key
Open

feat(parser): support PaddleOCR-VL API key#1722
langcaiye wants to merge 2 commits into
Tencent:mainfrom
langcaiye:feat/paddleocr-vl-api-key

Conversation

@langcaiye

@langcaiye langcaiye commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an optional paddleocr_vl_api_key setting for the self-hosted PaddleOCR-VL parser
  • send Authorization: Bearer <API Key> on self-hosted PaddleOCR-VL availability checks and /layout-parsing parse requests
  • expose the optional API Key field in Parser Engine settings and update API typings / i18n / swagger schema

Closes #1721

Test plan

go test ./internal/infrastructure/docparser

npm run type-check was also run. It fails with pre-existing unrelated TypeScript errors that are reproducible on upstream main (3b317f7e) in files such as src/api/agent/index.ts, src/api/embed/index.ts, and src/views/knowledge/KnowledgeBase.vue.

@lyingbug

Copy link
Copy Markdown
Collaborator

This field is not part of the official PaddleOCR/PaddleX self-hosted /layout-parsing API. The official PaddleX serving docs only define the request body (file, fileType, etc.) and do not document any auth header.
Do you have some related docs about it ?

@langcaiye

Copy link
Copy Markdown
Contributor Author

This field is not part of the official PaddleOCR/PaddleX self-hosted /layout-parsing API. The official PaddleX serving docs only define the request body (file, fileType, etc.) and do not document any auth header. Do you have some related docs about it ?

Thanks for pointing this out. You are right: this is not part of the official PaddleX self-hosted /layout-parsing API, and the previous field name/description made that unclear.

I updated the PR to rename the setting to paddleocr_vl_bearer_token and clarified that it is only for deployments where the self-hosted service is protected by an external auth gateway or reverse proxy. Official PaddleX Serving does not require this field, and leaving it empty keeps the official API behavior unchanged.

I also kept backward-compatible reading of the old paddleocr_vl_api_key field internally, but it is no longer exposed in the public config schema.

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.

[Feature]: Support optional API Key for self-hosted PaddleOCR-VL parser

2 participants