@docling/docling-client 2.149.1 → 2.151.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  # Python client parity
2
2
 
3
- This document compares `@docling/docling-client` with Docling Python 2.149.0
4
- at commit `8103d81`, specifically:
3
+ This document compares `@docling/docling-client` with Docling Python 2.151.1
4
+ at commit `56d39ff`, specifically:
5
5
 
6
6
  - `DoclingServiceClient`
7
7
  - `AsyncDoclingServiceClient`
@@ -160,6 +160,51 @@ High-level limits match Python:
160
160
  TypeScript restricts limit values to safe integers, which is stricter than
161
161
  Python's unbounded integer type.
162
162
 
163
+ ## Service client changes (v2.151.1)
164
+
165
+ Python v2.151.1 at commit `56d39ff` (including v2.151.0 and v2.150.1) changes
166
+ two service-client behaviors and one service-datamodel description. The remaining
167
+ changes (backend, CLI, and pipeline fixes) are server-side or core-library
168
+ behavior with no service-client or service-datamodel surface.
169
+
170
+ | Python change | TypeScript | Notes |
171
+ | ---------------------------------------------------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
172
+ | WebSocket poll fallback stays within the original timeout (#5121) | `watchTask()` | The fallback polls with the time left; exhausted or expired budgets raise the caller's timeout. |
173
+ | Input iterator errors propagate from batch scheduling (#5013) | `boundedOutcomes()`, `convertAll()` | Already matched: iterator failures reject the generator and cancel active work. Regression test added. |
174
+ | Chart extraction preset examples list `granite_vision_v4_mlx` and `..._v3_3` | `ConvertDocumentsOptions` | Documentation comment on `chart_extraction_preset` updated; the field remains `string \| null`. |
175
+
176
+ References:
177
+
178
+ ```
179
+ https://github.com/docling-project/docling/blob/v2.151.1/docling/service_client/watchers.py#L98
180
+ https://github.com/docling-project/docling/blob/v2.151.1/docling/service_client/watchers.py#L184
181
+ https://github.com/docling-project/docling/blob/v2.151.1/docling/service_client/_scheduler.py#L86
182
+ https://github.com/docling-project/docling/blob/v2.151.1/docling/datamodel/service/options.py#L650
183
+ ```
184
+
185
+ ## Service client changes (v2.150.0)
186
+
187
+ Python v2.150.0 at commit `6852c27` is a release bump over v2.149.0.
188
+ All service-client and service datamodel APIs, options, enums, endpoints,
189
+ watchers, schedulers, and error models remain in full parity:
190
+
191
+ - `DoclingServiceClient` and `AsyncDoclingServiceClient`:
192
+ ```
193
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/client.py#L914
194
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/_async_client.py#L109
195
+ ```
196
+ - Service datamodels and options in `docling.datamodel.service`:
197
+ ```
198
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/options.py#L302
199
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/requests.py#L199
200
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/responses.py#L264
201
+ ```
202
+ - Task status watchers and jobs:
203
+ ```
204
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/watchers.py#L92
205
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/job.py#L67
206
+ ```
207
+
163
208
  ## Service client changes (v2.149.0)
164
209
 
165
210
  Python v2.149.0 at commit `8103d81` is a release bump over v2.148.0.
@@ -168,19 +213,19 @@ watchers, schedulers, and error models remain in full parity:
168
213
 
169
214
  - `DoclingServiceClient` and `AsyncDoclingServiceClient`:
170
215
  ```
171
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/client.py#L914
172
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/_async_client.py#L109
216
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/client.py#L914
217
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/_async_client.py#L109
173
218
  ```
174
219
  - Service datamodels and options in `docling.datamodel.service`:
175
220
  ```
176
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/service/options.py#L302
177
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/service/requests.py#L199
178
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/service/responses.py#L264
221
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/options.py#L302
222
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/requests.py#L199
223
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/responses.py#L264
179
224
  ```
180
225
  - Task status watchers and jobs:
181
226
  ```
182
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/watchers.py#L92
183
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/job.py#L67
227
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/watchers.py#L92
228
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/job.py#L67
184
229
  ```
185
230
 
186
231
  ## Service client changes (v2.148.0)
@@ -195,7 +240,7 @@ service-datamodel surface.
195
240
  type. `ConvertDocumentsOptions.from_formats` defaults to every `InputFormat`:
196
241
 
197
242
  ```
198
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/base_models.py#L136
243
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/base_models.py#L136
199
244
  ```
200
245
 
201
246
  The TypeScript `InputFormat` union includes `'calendar'`, the `from_formats`
@@ -204,7 +249,7 @@ service-datamodel surface.
204
249
  `_build_extension_to_format_map()`:
205
250
 
206
251
  ```
207
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/client.py#L906
252
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/client.py#L906
208
253
  ```
209
254
 
210
255
  - `ResponseFormat` gained `SURYA_HTML` (Surya OCR 2.5), `UNLIMITED_OCR2`,
@@ -212,7 +257,7 @@ service-datamodel surface.
212
257
  `VlmModelLocal.response_format` and `VlmModelApi.response_format`:
213
258
 
214
259
  ```
215
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/pipeline_options_vlm_model.py#L120
260
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/pipeline_options_vlm_model.py#L120
216
261
  ```
217
262
 
218
263
  The TypeScript `VlmResponseFormat` (alias `ResponseFormat`) union and the
@@ -232,7 +277,7 @@ service-datamodel surface.
232
277
  Python v2.147.0 at commit `e3681a6` formally exposes `artifact_url_allowlist` and `_allow_private_artifact_urls` in `DoclingServiceClient.__init__`:
233
278
 
234
279
  ```
235
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/client.py#L933
280
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/client.py#L933
236
281
  ```
237
282
 
238
283
  TypeScript fully supports these options:
@@ -255,7 +300,7 @@ with no service-client or service-datamodel surface.
255
300
  - `ArtifactRef.artifact_type` now allows `"chunks"`:
256
301
 
257
302
  ```
258
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/service/responses.py#L138
303
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/responses.py#L138
259
304
  ```
260
305
 
261
306
  The TypeScript `ArtifactType` union includes `'chunks'` and the presigned
@@ -269,7 +314,7 @@ with no service-client or service-datamodel surface.
269
314
  status and appends the presigned detail:
270
315
 
271
316
  ```
272
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/client.py#L857
317
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/client.py#L857
273
318
  ```
274
319
 
275
320
  TypeScript `combineInBodyFallbackError()` mirrors this and throws a
@@ -294,7 +339,7 @@ behavior with no service-client or service-datamodel surface.
294
339
  download name for the archive:
295
340
 
296
341
  ```
297
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/service/responses.py#L122
342
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/responses.py#L122
298
343
  ```
299
344
 
300
345
  The TypeScript `ZipArchiveResult` interface exposes `filename?: string | null`.
@@ -306,7 +351,7 @@ behavior with no service-client or service-datamodel surface.
306
351
  the effective range differs from the merged options:
307
352
 
308
353
  ```
309
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/client.py#L454
354
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/client.py#L431
310
355
  ```
311
356
 
312
357
  TypeScript `applyPageLimits()` mirrors this: with no `page_range`, `pageRange`,
@@ -332,7 +377,7 @@ Python v2.141.0 to use an internal `_run_bounded()` helper from
332
377
  `docling/service_client/_scheduler.py` for bounded concurrency fan-out:
333
378
 
334
379
  ```
335
- https://github.com/docling-project/docling/blob/v2.149.0/docling/service_client/_scheduler.py#L31
380
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/service_client/_scheduler.py#L31
336
381
  ```
337
382
 
338
383
  The TypeScript scheduler already implements equivalent bounded-concurrency
@@ -344,7 +389,7 @@ changes are needed; this is a pure internal refactoring on the Python side.
344
389
  `ConfidenceScores` gained a recursive `pages` field in Python v2.139.0:
345
390
 
346
391
  ```
347
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/service/responses.py#L45
392
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/responses.py#L45
348
393
  ```
349
394
 
350
395
  When present, it maps 1-based page numbers to per-page `ConfidenceScores`
@@ -362,7 +407,7 @@ objects. The TypeScript `ConfidenceScores` interface includes the
362
407
  `content` to `document` in Python v2.133.0:
363
408
 
364
409
  ```
365
- https://github.com/docling-project/docling/blob/v2.149.0/docling/datamodel/service/responses.py#L80
410
+ https://github.com/docling-project/docling/blob/v2.150.0/docling/datamodel/service/responses.py#L80
366
411
  ```
367
412
 
368
413
  Pydantic continues to serialize the field as `content` on the wire via
package/dist/index.cjs CHANGED
@@ -2670,11 +2670,24 @@ async function* watchTask(options) {
2670
2670
  yield* pollUpdates(options);
2671
2671
  return;
2672
2672
  }
2673
+ const timeoutMs = options.timeoutMs ?? 3e5;
2674
+ const deadline = Date.now() + timeoutMs;
2673
2675
  try {
2674
2676
  yield* webSocketUpdates(options);
2675
2677
  } catch (error) {
2676
2678
  if (error instanceof DoclingServiceUnavailableError && options.fallbackToPoll) {
2677
- yield* pollUpdates(options);
2679
+ const remaining = deadline - Date.now();
2680
+ if (remaining <= 0) {
2681
+ throw new DoclingTimeoutError(options.taskId, timeoutMs);
2682
+ }
2683
+ try {
2684
+ yield* pollUpdates({ ...options, timeoutMs: remaining });
2685
+ } catch (pollError) {
2686
+ if (pollError instanceof DoclingTimeoutError) {
2687
+ throw new DoclingTimeoutError(options.taskId, timeoutMs);
2688
+ }
2689
+ throw pollError;
2690
+ }
2678
2691
  return;
2679
2692
  }
2680
2693
  throw error;