Skip to content

ConvertDocumentOptions default from_formats field potentially breaks compatibility with Docling Serve instances running older Docling versions #3548

Description

@jspast

With the latest Docling 2.97.0 release, DoclingServiceClient convert*() and submit*() methods started to fail for me with the default Docling Serve Docker images (even the latest v1.21.0 with Docling 2.96.1). It took me a couple of hours to understand why. It did not help that the only feedback is Task submission failed. (status=422). Also could not find any information from the Docling Serve container logs, even with debug logs. Hopefully the logs can be improved in the future (docling-project/docling-serve#622).

Bug

Basically, the client now has a Docling version (2.97.0) with the introduction of EMAIL to the InputFormat enum (#3475) while the server (<2.97.0) does not. Then, calling DoclingServiceClient methods without overriding the options from_formats field will default to a list of all client InputFormat values which may not be known by the server.

Steps to reproduce

  1. Start a Docling Serve instance with docling<2.97.0.
  2. In a client with docling>=2.97.0, call DoclingServiceClient convert*() and submit*() methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions