Repository navigation
fix(api): type vlmPipelineModelLocal/Api as objects and add temperature - #829
Merged
edeandrea merged 1 commit intoDec 1, 2026
Conversation
vlmPipelineModelLocal and vlmPipelineModelApi on ConvertDocumentOptions were declared as String, while Docling Serve expects an object, so a caller could never actually set either option: a String serializes to a JSON string rather than the expected shape. They now use the existing VlmModelLocal and VlmModelApi types, which were already fully modeled but never wired up. Both types also gain a temperature field, mirroring a docling-jobkit field they were missing. Closes docling-project#823 Assisted-By: Claude Code <noreply@anthropic.com> Signed-off-by: Eric Deandrea <eric.deandrea@ibm.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the VLM model-option type corrections and temperature support.
No open issues 🎉
What changed in this PR
Fixes #823 by aligning the Java API’s deprecated VLM pipeline model options with the object types Docling Serve expects.
Changes:
- Replaces the two
Stringmodel options withVlmModelLocalandVlmModelApi. - Adds optional
temperaturefields to both model types. - Adds model unit tests, a shared Jackson 2/3 serialization regression test, and release notes.
| File | Description |
|---|---|
docs/src/doc/docs/whats-new.md |
Documents the corrected types and temperature support. |
docling-serve/docling-serve-client/src/test/java/ai/docling/serve/client/AbstractDoclingServeClientTests.java |
Verifies model options serialize as objects with temperature values. |
docling-serve/docling-serve-api/src/test/java/ai/docling/serve/api/convert/request/options/VlmModelLocalTests.java |
Tests local model fields, defaults, and defensive map copying. |
docling-serve/docling-serve-api/src/test/java/ai/docling/serve/api/convert/request/options/VlmModelApiTests.java |
Tests API model fields, defaults, and defensive map copying. |
docling-serve/docling-serve-api/src/main/java/ai/docling/serve/api/convert/request/options/VlmModelLocal.java |
Adds optional temperature and builder documentation. |
docling-serve/docling-serve-api/src/main/java/ai/docling/serve/api/convert/request/options/VlmModelApi.java |
Adds optional temperature and builder documentation. |
docling-serve/docling-serve-api/src/main/java/ai/docling/serve/api/convert/request/options/ConvertDocumentOptions.java |
Uses model objects instead of strings for both VLM options. |
Review effort: Balanced
edeandrea
enabled auto-merge (squash)
December 1, 2026 19:08
edeandrea
disabled auto-merge
December 1, 2026 19:28
:java_duke: JaCoCo coverage report
|
|
||||||||||||||
|
HTML test reports are available as workflow artifacts (zipped HTML). • Download: Artifacts for this run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vlmPipelineModelLocalandvlmPipelineModelApionConvertDocumentOptionswere declared asString, while Docling Serve expects an object (VlmModelLocal/VlmModelApi), so a caller could never actually set either option correctly — aStringserializes to a JSON string rather than the object the server expects. This has been wrong since the fields were introduced, so the fix is not treated as a breaking change.VlmModelLocalandVlmModelApiwere both missingtemperature, which the server declares on both. It's added asDouble temperatureon each.docs/src/doc/docs/whats-new.md.See #823 for the root-cause history on both issues.
Test plan
VlmModelLocalTests,VlmModelApiTests(all fields, defaults, map immutability)AbstractDoclingServeClientTests(shouldSendVlmPipelineModelLocalAndApiAsObjects) asserting the request body serializesvlm_pipeline_model_local/vlm_pipeline_model_apias objects, not strings./gradlew --no-daemon :docling-serve-api:testpasses./gradlew --no-daemon :docling-serve-client:test --tests "*AbstractDoclingServeClientTests*"passes (both Jackson 2 and Jackson 3 clients)./gradlew --no-daemon spotlessCheckpassesCloses #823
Assisted-By: Claude Code noreply@anthropic.com