davsclaus opened a new pull request, #30734: URL: https://github.com/apache/camel/pull/30734
_Claude Code on behalf of davsclaus_ JIRA: https://issues.apache.org/jira/browse/CAMEL-27202 With docling-serve (`useDoclingServe=true`), the `ocrLanguage` option was only sent when `doOcr=true` was also set. With the defaults it was silently dropped. The `CamelDoclingOCRLanguage` header worked, because it turns `doOcr` on. The option had a default (`en`), so the producer could not tell a configured language from the default. In sync mode, a conversion that fails on the server ended with `Task result not found`, which hides that the conversion failed. ## Changes - `ocrLanguage` has no default now. When it is set, the docling-serve request has `do_ocr=true` and `ocr_lang`, the same way as the header, unless `enableOCR` or `doOcr` is `false`. - The docling CLI still uses `en` when no language is set, so the CLI command is unchanged. - On docling-serve, `doOcr=true` or `CamelDoclingEnableOCR=true` without a language no longer sends `en`: the server uses its own default languages. - The sync path recognises the 404 `Task result not found` answer and says that the conversion failed on the docling-serve server, pointing to the server log or `useAsyncMode=true`. Other errors keep their message. - Option descriptions, component doc and generated files (catalog, endpoint and component DSL) are updated. - Upgrade guide 4.24: new entry for the changed `ocrLanguage` behaviour. ## Tests - `DoclingOcrHeadersTest`: 8 new tests (option set, set with `enableOCR=false` or `doOcr=false`, header wins, header turns OCR off, header-only OCR leaves the language to the server, CLI with and without a language). 22 run, 22 passed. - `DoclingServeSyncFailureTest` (new, stub docling-serve): 3 tests for the `Task result not found` answer (markdown and JSON conversion) and another error. 3 run, 3 passed. - Whole module (`mvn package` in `camel-docling`): 124 run, 0 failures, 8 skipped (tests that need docling installed). The docling-serve ITs were not run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
