Skip to content

fix(api): type vlmPipelineModelLocal/Api as objects and add temperature - #829

Merged
edeandrea merged 1 commit into
docling-project:mainfrom
edeandrea:fix/vlm-pipeline-model-options-typing
Dec 1, 2026
Merged

edeandrea merged 1 commit into
docling-project:mainfrom
edeandrea:fix/vlm-pipeline-model-options-typing

Conversation

@edeandrea

Copy link
Copy Markdown
Contributor

Summary

  • vlmPipelineModelLocal and vlmPipelineModelApi on ConvertDocumentOptions were declared as String, while Docling Serve expects an object (VlmModelLocal/VlmModelApi), so a caller could never actually set either option correctly — a String serializes 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.
  • VlmModelLocal and VlmModelApi were both missing temperature, which the server declares on both. It's added as Double temperature on each.
  • Updated docs/src/doc/docs/whats-new.md.

See #823 for the root-cause history on both issues.

Test plan

  • New unit tests: VlmModelLocalTests, VlmModelApiTests (all fields, defaults, map immutability)
  • New regression test in AbstractDoclingServeClientTests (shouldSendVlmPipelineModelLocalAndApiAsObjects) asserting the request body serializes vlm_pipeline_model_local/vlm_pipeline_model_api as objects, not strings
  • ./gradlew --no-daemon :docling-serve-api:test passes
  • ./gradlew --no-daemon :docling-serve-client:test --tests "*AbstractDoclingServeClientTests*" passes (both Jackson 2 and Jackson 3 clients)
  • ./gradlew --no-daemon spotlessCheck passes

Closes #823

Assisted-By: Claude Code noreply@anthropic.com

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>
Copilot AI balanced review requested due to automatic review settings December 1, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 String model options with VlmModelLocal and VlmModelApi.
  • Adds optional temperature fields 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
edeandrea enabled auto-merge (squash) December 1, 2026 19:08
@edeandrea
edeandrea disabled auto-merge December 1, 2026 19:28
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

:java_duke: JaCoCo coverage report

Overall Project 54.4% 🟢

There is no coverage information present for the Files changed

@edeandrea
edeandrea merged commit 93a2bd4 into docling-project:main Dec 1, 2026
28 checks passed
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
TestsPassed ✅SkippedFailed
Gradle Test Results (all modules & JDKs)2464 ran2464 passed0 skipped0 failed
TestResult
No test annotations available

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

HTML test reports are available as workflow artifacts (zipped HTML).

• Download: Artifacts for this run

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.

[Bug] VLM pipeline model options are mistyped as String and missing temperature

2 participants