From 8344ac463dd76eb2d36d7da43fc6e22d95886fdc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 02:02:10 +0000 Subject: [PATCH 01/11] fix: use correct field name format for multipart file arrays --- src/landingai_ade/_qs.py | 8 ++---- src/landingai_ade/_types.py | 3 +++ src/landingai_ade/_utils/_utils.py | 42 ++++++++++++++++++++++++------ tests/test_extract_files.py | 28 ++++++++++++++++---- tests/test_files.py | 2 +- 5 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/landingai_ade/_qs.py b/src/landingai_ade/_qs.py index 22023f2..e53c836 100644 --- a/src/landingai_ade/_qs.py +++ b/src/landingai_ade/_qs.py @@ -2,17 +2,13 @@ from typing import Any, List, Tuple, Union, Mapping, TypeVar from urllib.parse import parse_qs, urlencode -from typing_extensions import Literal, get_args +from typing_extensions import get_args -from ._types import NotGiven, not_given +from ._types import NotGiven, ArrayFormat, NestedFormat, not_given from ._utils import flatten _T = TypeVar("_T") - -ArrayFormat = Literal["comma", "repeat", "indices", "brackets"] -NestedFormat = Literal["dots", "brackets"] - PrimitiveData = Union[str, int, float, bool, None] # this should be Data = Union[PrimitiveData, "List[Data]", "Tuple[Data]", "Mapping[str, Data]"] # https://github.com/microsoft/pyright/issues/3555 diff --git a/src/landingai_ade/_types.py b/src/landingai_ade/_types.py index 2aa87a2..ff726f6 100644 --- a/src/landingai_ade/_types.py +++ b/src/landingai_ade/_types.py @@ -47,6 +47,9 @@ ModelT = TypeVar("ModelT", bound=pydantic.BaseModel) _T = TypeVar("_T") +ArrayFormat = Literal["comma", "repeat", "indices", "brackets"] +NestedFormat = Literal["dots", "brackets"] + # Approximates httpx internal ProxiesTypes and RequestFiles types # while adding support for `PathLike` instances diff --git a/src/landingai_ade/_utils/_utils.py b/src/landingai_ade/_utils/_utils.py index 771859f..199cd23 100644 --- a/src/landingai_ade/_utils/_utils.py +++ b/src/landingai_ade/_utils/_utils.py @@ -17,11 +17,11 @@ ) from pathlib import Path from datetime import date, datetime -from typing_extensions import TypeGuard +from typing_extensions import TypeGuard, get_args import sniffio -from .._types import Omit, NotGiven, FileTypes, HeadersLike +from .._types import Omit, NotGiven, FileTypes, ArrayFormat, HeadersLike _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) @@ -40,25 +40,45 @@ def extract_files( query: Mapping[str, object], *, paths: Sequence[Sequence[str]], + array_format: ArrayFormat = "brackets", ) -> list[tuple[str, FileTypes]]: """Recursively extract files from the given dictionary based on specified paths. A path may look like this ['foo', 'files', '', 'data']. + ``array_format`` controls how ```` segments contribute to the emitted + field name. Supported values: ``"brackets"`` (``foo[]``), ``"repeat"`` and + ``"comma"`` (``foo``), ``"indices"`` (``foo[0]``, ``foo[1]``). + Note: this mutates the given dictionary. """ files: list[tuple[str, FileTypes]] = [] for path in paths: - files.extend(_extract_items(query, path, index=0, flattened_key=None)) + files.extend(_extract_items(query, path, index=0, flattened_key=None, array_format=array_format)) return files +def _array_suffix(array_format: ArrayFormat, array_index: int) -> str: + if array_format == "brackets": + return "[]" + if array_format == "indices": + return f"[{array_index}]" + if array_format == "repeat" or array_format == "comma": + # Both repeat the bare field name for each file part; there is no + # meaningful way to comma-join binary parts. + return "" + raise NotImplementedError( + f"Unknown array_format value: {array_format}, choose from {', '.join(get_args(ArrayFormat))}" + ) + + def _extract_items( obj: object, path: Sequence[str], *, index: int, flattened_key: str | None, + array_format: ArrayFormat, ) -> list[tuple[str, FileTypes]]: try: key = path[index] @@ -75,9 +95,11 @@ def _extract_items( if is_list(obj): files: list[tuple[str, FileTypes]] = [] - for entry in obj: - assert_is_file_content(entry, key=flattened_key + "[]" if flattened_key else "") - files.append((flattened_key + "[]", cast(FileTypes, entry))) + for array_index, entry in enumerate(obj): + suffix = _array_suffix(array_format, array_index) + emitted_key = (flattened_key + suffix) if flattened_key else suffix + assert_is_file_content(entry, key=emitted_key) + files.append((emitted_key, cast(FileTypes, entry))) return files assert_is_file_content(obj, key=flattened_key) @@ -106,6 +128,7 @@ def _extract_items( path, index=index, flattened_key=flattened_key, + array_format=array_format, ) elif is_list(obj): if key != "": @@ -117,9 +140,12 @@ def _extract_items( item, path, index=index, - flattened_key=flattened_key + "[]" if flattened_key is not None else "[]", + flattened_key=( + (flattened_key if flattened_key is not None else "") + _array_suffix(array_format, array_index) + ), + array_format=array_format, ) - for item in obj + for array_index, item in enumerate(obj) ] ) diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index e0cda4c..5e53539 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -4,7 +4,7 @@ import pytest -from landingai_ade._types import FileTypes +from landingai_ade._types import FileTypes, ArrayFormat from landingai_ade._utils import extract_files @@ -37,10 +37,7 @@ def test_multiple_files() -> None: def test_top_level_file_array() -> None: query = {"files": [b"file one", b"file two"], "title": "hello"} - assert extract_files(query, paths=[["files", ""]]) == [ - ("files[]", b"file one"), - ("files[]", b"file two"), - ] + assert extract_files(query, paths=[["files", ""]]) == [("files[]", b"file one"), ("files[]", b"file two")] assert query == {"title": "hello"} @@ -71,3 +68,24 @@ def test_ignores_incorrect_paths( expected: list[tuple[str, FileTypes]], ) -> None: assert extract_files(query, paths=paths) == expected + + +@pytest.mark.parametrize( + "array_format,expected_top_level,expected_nested", + [ + ("brackets", [("files[]", b"a"), ("files[]", b"b")], [("items[][file]", b"a"), ("items[][file]", b"b")]), + ("repeat", [("files", b"a"), ("files", b"b")], [("items[file]", b"a"), ("items[file]", b"b")]), + ("comma", [("files", b"a"), ("files", b"b")], [("items[file]", b"a"), ("items[file]", b"b")]), + ("indices", [("files[0]", b"a"), ("files[1]", b"b")], [("items[0][file]", b"a"), ("items[1][file]", b"b")]), + ], +) +def test_array_format_controls_file_field_names( + array_format: ArrayFormat, + expected_top_level: list[tuple[str, FileTypes]], + expected_nested: list[tuple[str, FileTypes]], +) -> None: + top_level = {"files": [b"a", b"b"]} + assert extract_files(top_level, paths=[["files", ""]], array_format=array_format) == expected_top_level + + nested = {"items": [{"file": b"a"}, {"file": b"b"}]} + assert extract_files(nested, paths=[["items", "", "file"]], array_format=array_format) == expected_nested diff --git a/tests/test_files.py b/tests/test_files.py index 8527bac..3ce1487 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -132,7 +132,7 @@ def test_extract_files_does_not_mutate_original_nested_array_path(self) -> None: copied = deepcopy_with_paths(original, [["items", "", "file"]]) extracted = extract_files(copied, paths=[["items", "", "file"]]) - assert extracted == [("items[][file]", file1), ("items[][file]", file2)] + assert [entry for _, entry in extracted] == [file1, file2] assert original == { "items": [ {"file": file1, "extra": 1}, From a3a857d74244911f8f70937f1159d232b488b2f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 02:03:19 +0000 Subject: [PATCH 02/11] feat: support setting headers via env --- src/landingai_ade/_client.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/landingai_ade/_client.py b/src/landingai_ade/_client.py index cb8c846..6af2ec3 100644 --- a/src/landingai_ade/_client.py +++ b/src/landingai_ade/_client.py @@ -39,6 +39,7 @@ ) from ._utils import ( is_given, + is_mapping_t, extract_files, maybe_transform, get_async_library, @@ -219,6 +220,15 @@ def __init__( except KeyError as exc: raise ValueError(f"Unknown environment: {environment}") from exc + custom_headers_env = os.environ.get("LANDINGAI_ADE_CUSTOM_HEADERS") + if custom_headers_env is not None: + parsed: dict[str, str] = {} + for line in custom_headers_env.split("\n"): + colon = line.find(":") + if colon >= 0: + parsed[line[:colon].strip()] = line[colon + 1 :].strip() + default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})} + super().__init__( version=__version__, base_url=base_url, @@ -909,6 +919,15 @@ def __init__( except KeyError as exc: raise ValueError(f"Unknown environment: {environment}") from exc + custom_headers_env = os.environ.get("LANDINGAI_ADE_CUSTOM_HEADERS") + if custom_headers_env is not None: + parsed: dict[str, str] = {} + for line in custom_headers_env.split("\n"): + colon = line.find(":") + if colon >= 0: + parsed[line[:colon].strip()] = line[colon + 1 :].strip() + default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})} + super().__init__( version=__version__, base_url=base_url, From 289e1bbebef7c9d798d31c8f5584a01810cf55d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 02:09:56 +0000 Subject: [PATCH 03/11] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 852fb18..34f370b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 9 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai%2Fade-027fb87ba705ac701f9632cddf16c55874cc5fa02d6cc0759a6a8f39583ff1b7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai/ade-027fb87ba705ac701f9632cddf16c55874cc5fa02d6cc0759a6a8f39583ff1b7.yml openapi_spec_hash: 1b0a0f468129939b1f96fa130c1c60e2 config_hash: d3c62c183c1d0f73f5d04504a415859b From 540c5c21f4c90dcc2a4109d49026bacb96a9cee1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 02:06:47 +0000 Subject: [PATCH 04/11] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 34f370b..31f3aa9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 9 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai/ade-027fb87ba705ac701f9632cddf16c55874cc5fa02d6cc0759a6a8f39583ff1b7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai/ade-26d41350e522076899778b95ee97505ad9d5bce8b3b66b8213ca00dcfa05b95b.yml openapi_spec_hash: 1b0a0f468129939b1f96fa130c1c60e2 config_hash: d3c62c183c1d0f73f5d04504a415859b From ecfd5e233952511a64c8277168682f7e4ed3dbd4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 02:09:19 +0000 Subject: [PATCH 05/11] chore(internal): reformat pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 54f387f..b4b65e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -168,7 +168,7 @@ show_error_codes = true # # We also exclude our `tests` as mypy doesn't always infer # types correctly and Pyright will still catch any type errors. -exclude = ['src/landingai_ade/_files.py', '_dev/.*.py', 'tests/.*'] +exclude = ["src/landingai_ade/_files.py", "_dev/.*.py", "tests/.*"] strict_equality = true implicit_reexport = true From 3dde871a50f9b541f2b12ef37b7c97ee1a9b23e3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 02:05:47 +0000 Subject: [PATCH 06/11] fix(client): add missing f-string prefix in file type error message --- src/landingai_ade/_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/landingai_ade/_files.py b/src/landingai_ade/_files.py index 1e26af6..ec69f9b 100644 --- a/src/landingai_ade/_files.py +++ b/src/landingai_ade/_files.py @@ -104,7 +104,7 @@ async def async_to_httpx_files(files: RequestFiles | None) -> HttpxRequestFiles elif is_sequence_t(files): files = [(key, await _async_transform_file(file)) for key, file in files] else: - raise TypeError("Unexpected file type input {type(files)}, expected mapping or sequence") + raise TypeError(f"Unexpected file type input {type(files)}, expected mapping or sequence") return files From 92a4a3af2789b0189ad1e3f5efaf6ba83c7e0a36 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 02:04:59 +0000 Subject: [PATCH 07/11] feat(internal/types): support eagerly validating pydantic iterators --- src/landingai_ade/_models.py | 80 ++++++++++++++++++++++++++++++++++++ tests/test_models.py | 60 +++++++++++++++++++++++++-- 2 files changed, 137 insertions(+), 3 deletions(-) diff --git a/src/landingai_ade/_models.py b/src/landingai_ade/_models.py index 29070e0..8c5ab26 100644 --- a/src/landingai_ade/_models.py +++ b/src/landingai_ade/_models.py @@ -25,7 +25,9 @@ ClassVar, Protocol, Required, + Annotated, ParamSpec, + TypeAlias, TypedDict, TypeGuard, final, @@ -79,7 +81,15 @@ from ._constants import RAW_RESPONSE_HEADER if TYPE_CHECKING: + from pydantic import GetCoreSchemaHandler, ValidatorFunctionWrapHandler + from pydantic_core import CoreSchema, core_schema from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema +else: + try: + from pydantic_core import CoreSchema, core_schema + except ImportError: + CoreSchema = None + core_schema = None __all__ = ["BaseModel", "GenericModel"] @@ -396,6 +406,76 @@ def model_dump_json( ) +class _EagerIterable(list[_T], Generic[_T]): + """ + Accepts any Iterable[T] input (including generators), consumes it + eagerly, and validates all items upfront. + + Validation preserves the original container type where possible + (e.g. a set[T] stays a set[T]). Serialization (model_dump / JSON) + always emits a list — round-tripping through model_dump() will not + restore the original container type. + """ + + @classmethod + def __get_pydantic_core_schema__( + cls, + source_type: Any, + handler: GetCoreSchemaHandler, + ) -> CoreSchema: + (item_type,) = get_args(source_type) or (Any,) + item_schema: CoreSchema = handler.generate_schema(item_type) + list_of_items_schema: CoreSchema = core_schema.list_schema(item_schema) + + return core_schema.no_info_wrap_validator_function( + cls._validate, + list_of_items_schema, + serialization=core_schema.plain_serializer_function_ser_schema( + cls._serialize, + info_arg=False, + ), + ) + + @staticmethod + def _validate(v: Iterable[_T], handler: "ValidatorFunctionWrapHandler") -> Any: + original_type: type[Any] = type(v) + + # Normalize to list so list_schema can validate each item + if isinstance(v, list): + items: list[_T] = v + else: + try: + items = list(v) + except TypeError as e: + raise TypeError("Value is not iterable") from e + + # Validate items against the inner schema + validated: list[_T] = handler(items) + + # Reconstruct original container type + if original_type is list: + return validated + # str(list) produces the list's repr, not a string built from items, + # so skip reconstruction for str and its subclasses. + if issubclass(original_type, str): + return validated + try: + return original_type(validated) + except (TypeError, ValueError): + # If the type cannot be reconstructed, just return the validated list + return validated + + @staticmethod + def _serialize(v: Iterable[_T]) -> list[_T]: + """Always serialize as a list so Pydantic's JSON encoder is happy.""" + if isinstance(v, list): + return v + return list(v) + + +EagerIterable: TypeAlias = Annotated[Iterable[_T], _EagerIterable] + + def _construct_field(value: object, field: FieldInfo, key: str) -> object: if value is None: return field_get_default(field) diff --git a/tests/test_models.py b/tests/test_models.py index 3c46e88..d8b9344 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,7 +1,8 @@ import json -from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast +from typing import TYPE_CHECKING, Any, Dict, List, Union, Iterable, Optional, cast from datetime import datetime, timezone -from typing_extensions import Literal, Annotated, TypeAliasType +from collections import deque +from typing_extensions import Literal, Annotated, TypedDict, TypeAliasType import pytest import pydantic @@ -9,7 +10,7 @@ from landingai_ade._utils import PropertyInfo from landingai_ade._compat import PYDANTIC_V1, parse_obj, model_dump, model_json -from landingai_ade._models import DISCRIMINATOR_CACHE, BaseModel, construct_type +from landingai_ade._models import DISCRIMINATOR_CACHE, BaseModel, EagerIterable, construct_type class BasicModel(BaseModel): @@ -961,3 +962,56 @@ def __getattr__(self, attr: str) -> Item: ... assert model.a.prop == 1 assert isinstance(model.a, Item) assert model.other == "foo" + + +# NOTE: Workaround for Pydantic Iterable behavior. +# Iterable fields are replaced with a ValidatorIterator and may be consumed +# during serialization, which can cause subsequent dumps to return empty data. +# See: https://github.com/pydantic/pydantic/issues/9541 +@pytest.mark.parametrize( + "data, expected_validated", + [ + ([1, 2, 3], [1, 2, 3]), + ((1, 2, 3), (1, 2, 3)), + (set([1, 2, 3]), set([1, 2, 3])), + (iter([1, 2, 3]), [1, 2, 3]), + ([], []), + ((x for x in [1, 2, 3]), [1, 2, 3]), + (map(lambda x: x, [1, 2, 3]), [1, 2, 3]), + (frozenset([1, 2, 3]), frozenset([1, 2, 3])), + (deque([1, 2, 3]), deque([1, 2, 3])), + ], + ids=["list", "tuple", "set", "iterator", "empty", "generator", "map", "frozenset", "deque"], +) +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2") +def test_iterable_construction(data: Iterable[int], expected_validated: Iterable[int]) -> None: + class TypeWithIterable(TypedDict): + items: EagerIterable[int] + + class Model(BaseModel): + data: TypeWithIterable + + m = Model.model_validate({"data": {"items": data}}) + assert m.data["items"] == expected_validated + + # Verify repeated dumps don't lose data (the original bug) + assert m.model_dump()["data"]["items"] == list(expected_validated) + assert m.model_dump()["data"]["items"] == list(expected_validated) + + +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2") +def test_iterable_construction_str_falls_back_to_list() -> None: + # str is iterable (over chars), but str(list_of_chars) produces the list's repr + # rather than reconstructing a string from items. We special-case str to fall + # back to list instead of attempting reconstruction. + class TypeWithIterable(TypedDict): + items: EagerIterable[str] + + class Model(BaseModel): + data: TypeWithIterable + + m = Model.model_validate({"data": {"items": "hello"}}) + + # falls back to list of chars rather than calling str(["h", "e", "l", "l", "o"]) + assert m.data["items"] == ["h", "e", "l", "l", "o"] + assert m.model_dump()["data"]["items"] == ["h", "e", "l", "l", "o"] From 9ad511e7ca1d67e8d5d438918d2a936e245f4b65 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 02:02:46 +0000 Subject: [PATCH 08/11] ci: pin GitHub Actions to commit SHAs Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run. --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6645518..5794a44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/ade-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rye run: | @@ -46,7 +46,7 @@ jobs: id-token: write runs-on: ${{ github.repository == 'stainless-sdks/ade-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rye run: | @@ -67,7 +67,7 @@ jobs: github.repository == 'stainless-sdks/ade-python' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -87,7 +87,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/ade-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rye run: | diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 9da549b..eea7f0a 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rye run: | diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index f8b7b98..bdb107c 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'landing-ai/ade-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | From 3216770f746525a87780e26d228a4f1f8e0c9403 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 21:12:41 +0000 Subject: [PATCH 09/11] feat(api): api update --- .stats.yml | 4 ++-- src/landingai_ade/types/parse_job_get_response.py | 6 ++++++ src/landingai_ade/types/parse_job_list_response.py | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 31f3aa9..8a32648 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 9 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai/ade-26d41350e522076899778b95ee97505ad9d5bce8b3b66b8213ca00dcfa05b95b.yml -openapi_spec_hash: 1b0a0f468129939b1f96fa130c1c60e2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai/ade-d733e95dce6606899f1a6fd5a50d29e69e09460c6175551f2426119c9c1b6e39.yml +openapi_spec_hash: 9ac652238fd78f84d5515665eea04fe1 config_hash: d3c62c183c1d0f73f5d04504a415859b diff --git a/src/landingai_ade/types/parse_job_get_response.py b/src/landingai_ade/types/parse_job_get_response.py index 7fb9b33..65ede29 100644 --- a/src/landingai_ade/types/parse_job_get_response.py +++ b/src/landingai_ade/types/parse_job_get_response.py @@ -296,6 +296,12 @@ class ParseJobGetResponse(BaseModel): status: str + created_at: Optional[int] = None + """Unix timestamp (seconds) for when the job was created. + + Mirrors received_at; exposed so clients have an explicit creation time. + """ + data: Optional[Data] = None """ The parsed output (ParseResponse for documents, SpreadsheetParseResponse for diff --git a/src/landingai_ade/types/parse_job_list_response.py b/src/landingai_ade/types/parse_job_list_response.py index b7e5dc1..2af6c87 100644 --- a/src/landingai_ade/types/parse_job_list_response.py +++ b/src/landingai_ade/types/parse_job_list_response.py @@ -22,6 +22,12 @@ class Job(BaseModel): status: str + created_at: Optional[int] = None + """Unix timestamp (seconds) for when the job was created. + + Mirrors received_at; exposed so clients have an explicit creation time. + """ + failure_reason: Optional[str] = None From c9846e3a63660a1001212a73e5c919edf81ce323 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 20:12:44 +0000 Subject: [PATCH 10/11] feat(api): api update --- .stats.yml | 4 ++-- src/landingai_ade/types/parse_job_list_response.py | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8a32648..f2c526d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 9 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai/ade-d733e95dce6606899f1a6fd5a50d29e69e09460c6175551f2426119c9c1b6e39.yml -openapi_spec_hash: 9ac652238fd78f84d5515665eea04fe1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/landingai/ade-01ce724ecd99c32b78188edb388b532c95927b012607ae96a407bb68e91236d8.yml +openapi_spec_hash: c1beafa45f4fb1c4efa01b32a761e902 config_hash: d3c62c183c1d0f73f5d04504a415859b diff --git a/src/landingai_ade/types/parse_job_list_response.py b/src/landingai_ade/types/parse_job_list_response.py index 2af6c87..ed454d5 100644 --- a/src/landingai_ade/types/parse_job_list_response.py +++ b/src/landingai_ade/types/parse_job_list_response.py @@ -13,10 +13,7 @@ class Job(BaseModel): job_id: str progress: float - """ - Job completion progress as a decimal from 0 to 1, where 0 is not started, 1 is - finished, and values between 0 and 1 indicate work in progress. - """ + """Job completion as a decimal from 0 (not started) to 1 (complete).""" received_at: int From 0990b2da407b2276658c2da1d941af4fdf693dc7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 20:13:07 +0000 Subject: [PATCH 11/11] release: 1.13.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/landingai_ade/_version.py | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index de0960a..f94eeca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.12.0" + ".": "1.13.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 61b1436..4a16991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## 1.13.0 (2026-07-07) + +Full Changelog: [v1.12.0...v1.13.0](https://github.com/landing-ai/ade-python/compare/v1.12.0...v1.13.0) + +### Features + +* **api:** api update ([c9846e3](https://github.com/landing-ai/ade-python/commit/c9846e3a63660a1001212a73e5c919edf81ce323)) +* **api:** api update ([3216770](https://github.com/landing-ai/ade-python/commit/3216770f746525a87780e26d228a4f1f8e0c9403)) +* **internal/types:** support eagerly validating pydantic iterators ([92a4a3a](https://github.com/landing-ai/ade-python/commit/92a4a3af2789b0189ad1e3f5efaf6ba83c7e0a36)) +* smart save_to with full path support and bug fix ([#85](https://github.com/landing-ai/ade-python/issues/85)) ([7576d1f](https://github.com/landing-ai/ade-python/commit/7576d1f80c20744c0dbbb81ebf1b5f72323c3ec2)) +* support setting headers via env ([a3a857d](https://github.com/landing-ai/ade-python/commit/a3a857d74244911f8f70937f1159d232b488b2f8)) + + +### Bug Fixes + +* **client:** add missing f-string prefix in file type error message ([3dde871](https://github.com/landing-ai/ade-python/commit/3dde871a50f9b541f2b12ef37b7c97ee1a9b23e3)) +* use correct field name format for multipart file arrays ([8344ac4](https://github.com/landing-ai/ade-python/commit/8344ac463dd76eb2d36d7da43fc6e22d95886fdc)) + + +### Chores + +* **internal:** reformat pyproject.toml ([ecfd5e2](https://github.com/landing-ai/ade-python/commit/ecfd5e233952511a64c8277168682f7e4ed3dbd4)) + + +### Documentation + +* use theme-aware logo in README ([#89](https://github.com/landing-ai/ade-python/issues/89)) ([2f49d2a](https://github.com/landing-ai/ade-python/commit/2f49d2ab0395fabdfdb6e8b25f3fceb270efb933)) + ## 1.12.0 (2026-04-23) Full Changelog: [v1.11.1...v1.12.0](https://github.com/landing-ai/ade-python/compare/v1.11.1...v1.12.0) diff --git a/pyproject.toml b/pyproject.toml index b4b65e3..403d022 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "landingai-ade" -version = "1.12.0" +version = "1.13.0" description = "The official Python library for the landingai-ade API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/landingai_ade/_version.py b/src/landingai_ade/_version.py index 22cefc1..332112c 100644 --- a/src/landingai_ade/_version.py +++ b/src/landingai_ade/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "landingai_ade" -__version__ = "1.12.0" # x-release-please-version +__version__ = "1.13.0" # x-release-please-version