From 72f3d05d8e2b6bea43db9001270d836f21254a9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:47:55 +0000 Subject: [PATCH 01/15] chore(internal): fix lint error on Python 3.14 --- src/mixedbread/_utils/_compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mixedbread/_utils/_compat.py b/src/mixedbread/_utils/_compat.py index dd703233..2c70b299 100644 --- a/src/mixedbread/_utils/_compat.py +++ b/src/mixedbread/_utils/_compat.py @@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool: else: import types - return tp is Union or tp is types.UnionType + return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap] def is_typeddict(tp: Type[Any]) -> bool: From d167e2d222b34334f86313213bb01d7c8a003f18 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 07:35:06 +0000 Subject: [PATCH 02/15] chore: format all `api.md` files --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index babc8df7..e563f7e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ format = { chain = [ # run formatting again to fix any inconsistencies when imports are stripped "format:ruff", ]} -"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" +"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'" "format:ruff" = "ruff format" "lint" = { chain = [ From 4c8fd78b6d0fc691a8a09d8b5e3fbbb3266371a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 20:29:02 +0000 Subject: [PATCH 03/15] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9f60014e..b53b5204 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-68449c5f406b2b3bc2b94ef7f94c47b3724aa0a69e1033bef1a84477f79420f5.yml -openapi_spec_hash: 2b6de88d9a14a977a66f37c066d0b47a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-c8b3f2a21a904339787e1a5cf78ef9d3ad47bf20a368d45b50fbc7f9b6240ce1.yml +openapi_spec_hash: 645cbaa3a4bb0b67c49bb11b0e46310b config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b From 10a541d3fa4015fdb5e2b6720fdf1f97322b5439 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 17:29:02 +0000 Subject: [PATCH 04/15] feat(api): api update --- .stats.yml | 4 ++-- src/mixedbread/types/scored_audio_url_input_chunk.py | 3 +++ src/mixedbread/types/scored_image_url_input_chunk.py | 3 +++ src/mixedbread/types/scored_text_input_chunk.py | 3 +++ src/mixedbread/types/scored_video_url_input_chunk.py | 3 +++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b53b5204..eaf004f9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-c8b3f2a21a904339787e1a5cf78ef9d3ad47bf20a368d45b50fbc7f9b6240ce1.yml -openapi_spec_hash: 645cbaa3a4bb0b67c49bb11b0e46310b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-b1dc7adca94d1a8c12d66e06400ce2f254a7e0ff0036c3817189c68ff1405ece.yml +openapi_spec_hash: dff0a2dc18d54f7f0a8c5be2cfe0aa09 config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b diff --git a/src/mixedbread/types/scored_audio_url_input_chunk.py b/src/mixedbread/types/scored_audio_url_input_chunk.py index ce6ad67a..58295201 100644 --- a/src/mixedbread/types/scored_audio_url_input_chunk.py +++ b/src/mixedbread/types/scored_audio_url_input_chunk.py @@ -251,6 +251,9 @@ class ScoredAudioURLInputChunk(BaseModel): store_id: str """store id""" + external_id: Optional[str] = None + """external identifier for this file""" + metadata: Optional[object] = None """file metadata""" diff --git a/src/mixedbread/types/scored_image_url_input_chunk.py b/src/mixedbread/types/scored_image_url_input_chunk.py index 5c41db69..c9211b51 100644 --- a/src/mixedbread/types/scored_image_url_input_chunk.py +++ b/src/mixedbread/types/scored_image_url_input_chunk.py @@ -254,6 +254,9 @@ class ScoredImageURLInputChunk(BaseModel): store_id: str """store id""" + external_id: Optional[str] = None + """external identifier for this file""" + metadata: Optional[object] = None """file metadata""" diff --git a/src/mixedbread/types/scored_text_input_chunk.py b/src/mixedbread/types/scored_text_input_chunk.py index 025eecdc..e799821c 100644 --- a/src/mixedbread/types/scored_text_input_chunk.py +++ b/src/mixedbread/types/scored_text_input_chunk.py @@ -243,6 +243,9 @@ class ScoredTextInputChunk(BaseModel): store_id: str """store id""" + external_id: Optional[str] = None + """external identifier for this file""" + metadata: Optional[object] = None """file metadata""" diff --git a/src/mixedbread/types/scored_video_url_input_chunk.py b/src/mixedbread/types/scored_video_url_input_chunk.py index 878c5bdf..359f7395 100644 --- a/src/mixedbread/types/scored_video_url_input_chunk.py +++ b/src/mixedbread/types/scored_video_url_input_chunk.py @@ -251,6 +251,9 @@ class ScoredVideoURLInputChunk(BaseModel): store_id: str """store id""" + external_id: Optional[str] = None + """external identifier for this file""" + metadata: Optional[object] = None """file metadata""" From 8fef5613483e10652fd1e35ba3e2097a26a5cfcd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 07:28:37 +0000 Subject: [PATCH 05/15] feat(api): api update --- .stats.yml | 4 ++-- src/mixedbread/types/scored_audio_url_input_chunk.py | 2 ++ src/mixedbread/types/scored_image_url_input_chunk.py | 2 ++ src/mixedbread/types/scored_text_input_chunk.py | 2 ++ src/mixedbread/types/scored_video_url_input_chunk.py | 2 ++ src/mixedbread/types/stores/store_file.py | 8 ++++++++ 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index eaf004f9..ffd73101 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-b1dc7adca94d1a8c12d66e06400ce2f254a7e0ff0036c3817189c68ff1405ece.yml -openapi_spec_hash: dff0a2dc18d54f7f0a8c5be2cfe0aa09 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-6ba48fa06aa557530108aa3c41662495c0df7de025f3c8d5986bf920a8d23519.yml +openapi_spec_hash: 42e7e3822156c5fde4bed8fb291fc05a config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b diff --git a/src/mixedbread/types/scored_audio_url_input_chunk.py b/src/mixedbread/types/scored_audio_url_input_chunk.py index 58295201..b7049d49 100644 --- a/src/mixedbread/types/scored_audio_url_input_chunk.py +++ b/src/mixedbread/types/scored_audio_url_input_chunk.py @@ -192,6 +192,8 @@ class GeneratedMetadataVideoChunkGeneratedMetadata(BaseModel): frame_count: int + has_audio_stream: Optional[bool] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/mixedbread/types/scored_image_url_input_chunk.py b/src/mixedbread/types/scored_image_url_input_chunk.py index c9211b51..ea58bb83 100644 --- a/src/mixedbread/types/scored_image_url_input_chunk.py +++ b/src/mixedbread/types/scored_image_url_input_chunk.py @@ -192,6 +192,8 @@ class GeneratedMetadataVideoChunkGeneratedMetadata(BaseModel): frame_count: int + has_audio_stream: Optional[bool] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/mixedbread/types/scored_text_input_chunk.py b/src/mixedbread/types/scored_text_input_chunk.py index e799821c..254193a6 100644 --- a/src/mixedbread/types/scored_text_input_chunk.py +++ b/src/mixedbread/types/scored_text_input_chunk.py @@ -191,6 +191,8 @@ class GeneratedMetadataVideoChunkGeneratedMetadata(BaseModel): frame_count: int + has_audio_stream: Optional[bool] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/mixedbread/types/scored_video_url_input_chunk.py b/src/mixedbread/types/scored_video_url_input_chunk.py index 359f7395..e05a7f5c 100644 --- a/src/mixedbread/types/scored_video_url_input_chunk.py +++ b/src/mixedbread/types/scored_video_url_input_chunk.py @@ -192,6 +192,8 @@ class GeneratedMetadataVideoChunkGeneratedMetadata(BaseModel): frame_count: int + has_audio_stream: Optional[bool] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/mixedbread/types/stores/store_file.py b/src/mixedbread/types/stores/store_file.py index 7c3c0e2e..106f3e3e 100644 --- a/src/mixedbread/types/stores/store_file.py +++ b/src/mixedbread/types/stores/store_file.py @@ -240,6 +240,8 @@ class ChunkTextInputChunkGeneratedMetadataVideoChunkGeneratedMetadata(BaseModel) frame_count: int + has_audio_stream: Optional[bool] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -463,6 +465,8 @@ class ChunkImageURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata(BaseMo frame_count: int + has_audio_stream: Optional[bool] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -699,6 +703,8 @@ class ChunkAudioURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata(BaseMo frame_count: int + has_audio_stream: Optional[bool] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -935,6 +941,8 @@ class ChunkVideoURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata(BaseMo frame_count: int + has_audio_stream: Optional[bool] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. From b3523db2445a8a389ca9828deea5d991c095bd0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 11:25:11 +0000 Subject: [PATCH 06/15] chore: update mock server docs --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b147f05..ed6fa9a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,8 +88,7 @@ $ pip install ./path-to-wheel-file.whl Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. ```sh -# you will need npm installed -$ npx prism mock path/to/your/openapi.yml +$ ./scripts/mock ``` ```sh From 216baf6093ec37db5b57d0fb675a7c7212bea750 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Feb 2026 23:28:49 +0000 Subject: [PATCH 07/15] feat(api): api update --- .stats.yml | 4 +- .../types/scored_audio_url_input_chunk.py | 40 +++++ .../types/scored_image_url_input_chunk.py | 40 +++++ .../types/scored_text_input_chunk.py | 40 +++++ .../types/scored_video_url_input_chunk.py | 40 +++++ src/mixedbread/types/stores/store_file.py | 160 ++++++++++++++++++ 6 files changed, 322 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ffd73101..74bbf70b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-6ba48fa06aa557530108aa3c41662495c0df7de025f3c8d5986bf920a8d23519.yml -openapi_spec_hash: 42e7e3822156c5fde4bed8fb291fc05a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-b1e738661f623d4043d56f4d1b9d9c010701964b40823831b7e28d86b496463f.yml +openapi_spec_hash: 986f5e966aae0a82a7f45c7d5bf48dba config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b diff --git a/src/mixedbread/types/scored_audio_url_input_chunk.py b/src/mixedbread/types/scored_audio_url_input_chunk.py index b7049d49..237a55b7 100644 --- a/src/mixedbread/types/scored_audio_url_input_chunk.py +++ b/src/mixedbread/types/scored_audio_url_input_chunk.py @@ -19,6 +19,7 @@ "GeneratedMetadataCodeChunkGeneratedMetadata", "GeneratedMetadataAudioChunkGeneratedMetadata", "GeneratedMetadataVideoChunkGeneratedMetadata", + "GeneratedMetadataImageChunkGeneratedMetadata", "AudioURL", ] @@ -54,6 +55,8 @@ class GeneratedMetadataMarkdownChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + frontmatter: Optional[Dict[str, object]] = None if TYPE_CHECKING: @@ -84,6 +87,8 @@ class GeneratedMetadataTextChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -106,6 +111,8 @@ class GeneratedMetadataPdfChunkGeneratedMetadata(BaseModel): total_size: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -134,6 +141,8 @@ class GeneratedMetadataCodeChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -162,6 +171,8 @@ class GeneratedMetadataAudioChunkGeneratedMetadata(BaseModel): audio_format: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -194,6 +205,34 @@ class GeneratedMetadataVideoChunkGeneratedMetadata(BaseModel): has_audio_stream: Optional[bool] = None + file_extension: Optional[str] = None + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class GeneratedMetadataImageChunkGeneratedMetadata(BaseModel): + type: Optional[Literal["image"]] = None + + file_type: str + + file_size: int + + width: int + + height: int + + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -215,6 +254,7 @@ def __getattr__(self, attr: str) -> object: ... GeneratedMetadataCodeChunkGeneratedMetadata, GeneratedMetadataAudioChunkGeneratedMetadata, GeneratedMetadataVideoChunkGeneratedMetadata, + GeneratedMetadataImageChunkGeneratedMetadata, None, ], PropertyInfo(discriminator="type"), diff --git a/src/mixedbread/types/scored_image_url_input_chunk.py b/src/mixedbread/types/scored_image_url_input_chunk.py index ea58bb83..412bcb5a 100644 --- a/src/mixedbread/types/scored_image_url_input_chunk.py +++ b/src/mixedbread/types/scored_image_url_input_chunk.py @@ -19,6 +19,7 @@ "GeneratedMetadataCodeChunkGeneratedMetadata", "GeneratedMetadataAudioChunkGeneratedMetadata", "GeneratedMetadataVideoChunkGeneratedMetadata", + "GeneratedMetadataImageChunkGeneratedMetadata", "ImageURL", ] @@ -54,6 +55,8 @@ class GeneratedMetadataMarkdownChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + frontmatter: Optional[Dict[str, object]] = None if TYPE_CHECKING: @@ -84,6 +87,8 @@ class GeneratedMetadataTextChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -106,6 +111,8 @@ class GeneratedMetadataPdfChunkGeneratedMetadata(BaseModel): total_size: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -134,6 +141,8 @@ class GeneratedMetadataCodeChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -162,6 +171,8 @@ class GeneratedMetadataAudioChunkGeneratedMetadata(BaseModel): audio_format: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -194,6 +205,34 @@ class GeneratedMetadataVideoChunkGeneratedMetadata(BaseModel): has_audio_stream: Optional[bool] = None + file_extension: Optional[str] = None + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class GeneratedMetadataImageChunkGeneratedMetadata(BaseModel): + type: Optional[Literal["image"]] = None + + file_type: str + + file_size: int + + width: int + + height: int + + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -215,6 +254,7 @@ def __getattr__(self, attr: str) -> object: ... GeneratedMetadataCodeChunkGeneratedMetadata, GeneratedMetadataAudioChunkGeneratedMetadata, GeneratedMetadataVideoChunkGeneratedMetadata, + GeneratedMetadataImageChunkGeneratedMetadata, None, ], PropertyInfo(discriminator="type"), diff --git a/src/mixedbread/types/scored_text_input_chunk.py b/src/mixedbread/types/scored_text_input_chunk.py index 254193a6..74977788 100644 --- a/src/mixedbread/types/scored_text_input_chunk.py +++ b/src/mixedbread/types/scored_text_input_chunk.py @@ -19,6 +19,7 @@ "GeneratedMetadataCodeChunkGeneratedMetadata", "GeneratedMetadataAudioChunkGeneratedMetadata", "GeneratedMetadataVideoChunkGeneratedMetadata", + "GeneratedMetadataImageChunkGeneratedMetadata", ] @@ -53,6 +54,8 @@ class GeneratedMetadataMarkdownChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + frontmatter: Optional[Dict[str, object]] = None if TYPE_CHECKING: @@ -83,6 +86,8 @@ class GeneratedMetadataTextChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -105,6 +110,8 @@ class GeneratedMetadataPdfChunkGeneratedMetadata(BaseModel): total_size: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -133,6 +140,8 @@ class GeneratedMetadataCodeChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -161,6 +170,8 @@ class GeneratedMetadataAudioChunkGeneratedMetadata(BaseModel): audio_format: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -193,6 +204,34 @@ class GeneratedMetadataVideoChunkGeneratedMetadata(BaseModel): has_audio_stream: Optional[bool] = None + file_extension: Optional[str] = None + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class GeneratedMetadataImageChunkGeneratedMetadata(BaseModel): + type: Optional[Literal["image"]] = None + + file_type: str + + file_size: int + + width: int + + height: int + + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -214,6 +253,7 @@ def __getattr__(self, attr: str) -> object: ... GeneratedMetadataCodeChunkGeneratedMetadata, GeneratedMetadataAudioChunkGeneratedMetadata, GeneratedMetadataVideoChunkGeneratedMetadata, + GeneratedMetadataImageChunkGeneratedMetadata, None, ], PropertyInfo(discriminator="type"), diff --git a/src/mixedbread/types/scored_video_url_input_chunk.py b/src/mixedbread/types/scored_video_url_input_chunk.py index e05a7f5c..788e0c37 100644 --- a/src/mixedbread/types/scored_video_url_input_chunk.py +++ b/src/mixedbread/types/scored_video_url_input_chunk.py @@ -19,6 +19,7 @@ "GeneratedMetadataCodeChunkGeneratedMetadata", "GeneratedMetadataAudioChunkGeneratedMetadata", "GeneratedMetadataVideoChunkGeneratedMetadata", + "GeneratedMetadataImageChunkGeneratedMetadata", "VideoURL", ] @@ -54,6 +55,8 @@ class GeneratedMetadataMarkdownChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + frontmatter: Optional[Dict[str, object]] = None if TYPE_CHECKING: @@ -84,6 +87,8 @@ class GeneratedMetadataTextChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -106,6 +111,8 @@ class GeneratedMetadataPdfChunkGeneratedMetadata(BaseModel): total_size: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -134,6 +141,8 @@ class GeneratedMetadataCodeChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -162,6 +171,8 @@ class GeneratedMetadataAudioChunkGeneratedMetadata(BaseModel): audio_format: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -194,6 +205,34 @@ class GeneratedMetadataVideoChunkGeneratedMetadata(BaseModel): has_audio_stream: Optional[bool] = None + file_extension: Optional[str] = None + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class GeneratedMetadataImageChunkGeneratedMetadata(BaseModel): + type: Optional[Literal["image"]] = None + + file_type: str + + file_size: int + + width: int + + height: int + + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -215,6 +254,7 @@ def __getattr__(self, attr: str) -> object: ... GeneratedMetadataCodeChunkGeneratedMetadata, GeneratedMetadataAudioChunkGeneratedMetadata, GeneratedMetadataVideoChunkGeneratedMetadata, + GeneratedMetadataImageChunkGeneratedMetadata, None, ], PropertyInfo(discriminator="type"), diff --git a/src/mixedbread/types/stores/store_file.py b/src/mixedbread/types/stores/store_file.py index 106f3e3e..f8d4c162 100644 --- a/src/mixedbread/types/stores/store_file.py +++ b/src/mixedbread/types/stores/store_file.py @@ -24,6 +24,7 @@ "ChunkTextInputChunkGeneratedMetadataCodeChunkGeneratedMetadata", "ChunkTextInputChunkGeneratedMetadataAudioChunkGeneratedMetadata", "ChunkTextInputChunkGeneratedMetadataVideoChunkGeneratedMetadata", + "ChunkTextInputChunkGeneratedMetadataImageChunkGeneratedMetadata", "ChunkImageURLInputChunk", "ChunkImageURLInputChunkGeneratedMetadata", "ChunkImageURLInputChunkGeneratedMetadataMarkdownChunkGeneratedMetadata", @@ -34,6 +35,7 @@ "ChunkImageURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata", "ChunkImageURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata", "ChunkImageURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata", + "ChunkImageURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata", "ChunkImageURLInputChunkImageURL", "ChunkAudioURLInputChunk", "ChunkAudioURLInputChunkGeneratedMetadata", @@ -45,6 +47,7 @@ "ChunkAudioURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata", "ChunkAudioURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata", "ChunkAudioURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata", + "ChunkAudioURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata", "ChunkAudioURLInputChunkAudioURL", "ChunkVideoURLInputChunk", "ChunkVideoURLInputChunkGeneratedMetadata", @@ -56,6 +59,7 @@ "ChunkVideoURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata", "ChunkVideoURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata", "ChunkVideoURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata", + "ChunkVideoURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata", "ChunkVideoURLInputChunkVideoURL", ] @@ -102,6 +106,8 @@ class ChunkTextInputChunkGeneratedMetadataMarkdownChunkGeneratedMetadata(BaseMod num_lines: Optional[int] = None + file_extension: Optional[str] = None + frontmatter: Optional[Dict[str, object]] = None if TYPE_CHECKING: @@ -132,6 +138,8 @@ class ChunkTextInputChunkGeneratedMetadataTextChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -154,6 +162,8 @@ class ChunkTextInputChunkGeneratedMetadataPdfChunkGeneratedMetadata(BaseModel): total_size: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -182,6 +192,8 @@ class ChunkTextInputChunkGeneratedMetadataCodeChunkGeneratedMetadata(BaseModel): num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -210,6 +222,8 @@ class ChunkTextInputChunkGeneratedMetadataAudioChunkGeneratedMetadata(BaseModel) audio_format: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -242,6 +256,34 @@ class ChunkTextInputChunkGeneratedMetadataVideoChunkGeneratedMetadata(BaseModel) has_audio_stream: Optional[bool] = None + file_extension: Optional[str] = None + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class ChunkTextInputChunkGeneratedMetadataImageChunkGeneratedMetadata(BaseModel): + type: Optional[Literal["image"]] = None + + file_type: str + + file_size: int + + width: int + + height: int + + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -263,6 +305,7 @@ def __getattr__(self, attr: str) -> object: ... ChunkTextInputChunkGeneratedMetadataCodeChunkGeneratedMetadata, ChunkTextInputChunkGeneratedMetadataAudioChunkGeneratedMetadata, ChunkTextInputChunkGeneratedMetadataVideoChunkGeneratedMetadata, + ChunkTextInputChunkGeneratedMetadataImageChunkGeneratedMetadata, None, ], PropertyInfo(discriminator="type"), @@ -327,6 +370,8 @@ class ChunkImageURLInputChunkGeneratedMetadataMarkdownChunkGeneratedMetadata(Bas num_lines: Optional[int] = None + file_extension: Optional[str] = None + frontmatter: Optional[Dict[str, object]] = None if TYPE_CHECKING: @@ -357,6 +402,8 @@ class ChunkImageURLInputChunkGeneratedMetadataTextChunkGeneratedMetadata(BaseMod num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -379,6 +426,8 @@ class ChunkImageURLInputChunkGeneratedMetadataPdfChunkGeneratedMetadata(BaseMode total_size: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -407,6 +456,8 @@ class ChunkImageURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata(BaseMod num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -435,6 +486,8 @@ class ChunkImageURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata(BaseMo audio_format: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -467,6 +520,34 @@ class ChunkImageURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata(BaseMo has_audio_stream: Optional[bool] = None + file_extension: Optional[str] = None + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class ChunkImageURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata(BaseModel): + type: Optional[Literal["image"]] = None + + file_type: str + + file_size: int + + width: int + + height: int + + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -488,6 +569,7 @@ def __getattr__(self, attr: str) -> object: ... ChunkImageURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata, ChunkImageURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata, ChunkImageURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata, + ChunkImageURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata, None, ], PropertyInfo(discriminator="type"), @@ -565,6 +647,8 @@ class ChunkAudioURLInputChunkGeneratedMetadataMarkdownChunkGeneratedMetadata(Bas num_lines: Optional[int] = None + file_extension: Optional[str] = None + frontmatter: Optional[Dict[str, object]] = None if TYPE_CHECKING: @@ -595,6 +679,8 @@ class ChunkAudioURLInputChunkGeneratedMetadataTextChunkGeneratedMetadata(BaseMod num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -617,6 +703,8 @@ class ChunkAudioURLInputChunkGeneratedMetadataPdfChunkGeneratedMetadata(BaseMode total_size: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -645,6 +733,8 @@ class ChunkAudioURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata(BaseMod num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -673,6 +763,8 @@ class ChunkAudioURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata(BaseMo audio_format: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -705,6 +797,34 @@ class ChunkAudioURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata(BaseMo has_audio_stream: Optional[bool] = None + file_extension: Optional[str] = None + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class ChunkAudioURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata(BaseModel): + type: Optional[Literal["image"]] = None + + file_type: str + + file_size: int + + width: int + + height: int + + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -726,6 +846,7 @@ def __getattr__(self, attr: str) -> object: ... ChunkAudioURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata, ChunkAudioURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata, ChunkAudioURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata, + ChunkAudioURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata, None, ], PropertyInfo(discriminator="type"), @@ -803,6 +924,8 @@ class ChunkVideoURLInputChunkGeneratedMetadataMarkdownChunkGeneratedMetadata(Bas num_lines: Optional[int] = None + file_extension: Optional[str] = None + frontmatter: Optional[Dict[str, object]] = None if TYPE_CHECKING: @@ -833,6 +956,8 @@ class ChunkVideoURLInputChunkGeneratedMetadataTextChunkGeneratedMetadata(BaseMod num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -855,6 +980,8 @@ class ChunkVideoURLInputChunkGeneratedMetadataPdfChunkGeneratedMetadata(BaseMode total_size: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -883,6 +1010,8 @@ class ChunkVideoURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata(BaseMod num_lines: Optional[int] = None + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -911,6 +1040,8 @@ class ChunkVideoURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata(BaseMo audio_format: int + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -943,6 +1074,34 @@ class ChunkVideoURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata(BaseMo has_audio_stream: Optional[bool] = None + file_extension: Optional[str] = None + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class ChunkVideoURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata(BaseModel): + type: Optional[Literal["image"]] = None + + file_type: str + + file_size: int + + width: int + + height: int + + file_extension: Optional[str] = None + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -964,6 +1123,7 @@ def __getattr__(self, attr: str) -> object: ... ChunkVideoURLInputChunkGeneratedMetadataCodeChunkGeneratedMetadata, ChunkVideoURLInputChunkGeneratedMetadataAudioChunkGeneratedMetadata, ChunkVideoURLInputChunkGeneratedMetadataVideoChunkGeneratedMetadata, + ChunkVideoURLInputChunkGeneratedMetadataImageChunkGeneratedMetadata, None, ], PropertyInfo(discriminator="type"), From f241bf6d47c31faf166869ef96219d7c7d4c8e10 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 12:12:25 +0000 Subject: [PATCH 08/15] chore(internal): add request options to SSE classes --- src/mixedbread/_response.py | 3 +++ src/mixedbread/_streaming.py | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/mixedbread/_response.py b/src/mixedbread/_response.py index 543946b9..50547a3b 100644 --- a/src/mixedbread/_response.py +++ b/src/mixedbread/_response.py @@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: ), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=extract_stream_chunk_type(self._stream_cls), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) diff --git a/src/mixedbread/_streaming.py b/src/mixedbread/_streaming.py index e7f6340f..235a94a8 100644 --- a/src/mixedbread/_streaming.py +++ b/src/mixedbread/_streaming.py @@ -4,7 +4,7 @@ import json import inspect from types import TracebackType -from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast +from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable import httpx @@ -13,6 +13,7 @@ if TYPE_CHECKING: from ._client import Mixedbread, AsyncMixedbread + from ._models import FinalRequestOptions _T = TypeVar("_T") @@ -22,7 +23,7 @@ class Stream(Generic[_T]): """Provides the core interface to iterate over a synchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEBytesDecoder def __init__( @@ -31,10 +32,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: Mixedbread, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() @@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]): """Provides the core interface to iterate over an asynchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEDecoder | SSEBytesDecoder def __init__( @@ -94,10 +97,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: AsyncMixedbread, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() From d0ec2d97d74bbf31468fd8ef537f8d142dc92fc7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 12:23:01 +0000 Subject: [PATCH 09/15] chore(internal): make `test_proxy_environment_variables` more resilient --- tests/test_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_client.py b/tests/test_client.py index 6696b539..83a44b8c 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -967,6 +967,8 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has this set + monkeypatch.delenv("HTTP_PROXY", raising=False) client = DefaultHttpxClient() @@ -1887,6 +1889,8 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has this set + monkeypatch.delenv("HTTP_PROXY", raising=False) client = DefaultAsyncHttpxClient() From 153c4ba201048975a882983f882491352a1d7bd3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 00:28:39 +0000 Subject: [PATCH 10/15] feat(api): api update --- .stats.yml | 4 ++-- src/mixedbread/types/store_chunk_search_options_param.py | 3 --- src/mixedbread/types/stores/file_search_params.py | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 74bbf70b..cdc7fd24 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-b1e738661f623d4043d56f4d1b9d9c010701964b40823831b7e28d86b496463f.yml -openapi_spec_hash: 986f5e966aae0a82a7f45c7d5bf48dba +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-1942d52b83f70e100db8b891551aa54fb02d9574aec159e105013a33640d2c7f.yml +openapi_spec_hash: 8971bb33a2af97d9e0b649ff8f02a33e config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b diff --git a/src/mixedbread/types/store_chunk_search_options_param.py b/src/mixedbread/types/store_chunk_search_options_param.py index 12e5f590..90bb9816 100644 --- a/src/mixedbread/types/store_chunk_search_options_param.py +++ b/src/mixedbread/types/store_chunk_search_options_param.py @@ -38,9 +38,6 @@ class AgenticAgenticSearchConfig(TypedDict, total=False): queries_per_round: int """Maximum queries per round""" - results_per_query: int - """Results to fetch per query""" - Agentic: TypeAlias = Union[bool, AgenticAgenticSearchConfig] diff --git a/src/mixedbread/types/stores/file_search_params.py b/src/mixedbread/types/stores/file_search_params.py index e70bc15b..6f6aa2d1 100644 --- a/src/mixedbread/types/stores/file_search_params.py +++ b/src/mixedbread/types/stores/file_search_params.py @@ -78,9 +78,6 @@ class SearchOptionsAgenticAgenticSearchConfig(TypedDict, total=False): queries_per_round: int """Maximum queries per round""" - results_per_query: int - """Results to fetch per query""" - SearchOptionsAgentic: TypeAlias = Union[bool, SearchOptionsAgenticAgenticSearchConfig] From c287c24551007387ccd78ce9faea8d4bae02719e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 12:39:07 +0000 Subject: [PATCH 11/15] chore(internal): make `test_proxy_environment_variables` more resilient to env --- tests/test_client.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 83a44b8c..8cc00170 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -967,8 +967,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultHttpxClient() @@ -1889,8 +1895,14 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultAsyncHttpxClient() From c4be5ae024212e1fd1feaabdc1d2b07c14228eb7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 13:28:43 +0000 Subject: [PATCH 12/15] feat(api): api update --- .stats.yml | 4 ++-- src/mixedbread/types/parsing/parsing_job.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index cdc7fd24..d2a86c88 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-1942d52b83f70e100db8b891551aa54fb02d9574aec159e105013a33640d2c7f.yml -openapi_spec_hash: 8971bb33a2af97d9e0b649ff8f02a33e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-67f1ae8cdd8a043199c7da700cf26c5da787862faf895c2e0d737c83085e1573.yml +openapi_spec_hash: 38dde555682223f7b5c92e9e575e2beb config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b diff --git a/src/mixedbread/types/parsing/parsing_job.py b/src/mixedbread/types/parsing/parsing_job.py index 56380010..2f3d250d 100644 --- a/src/mixedbread/types/parsing/parsing_job.py +++ b/src/mixedbread/types/parsing/parsing_job.py @@ -29,11 +29,14 @@ class ResultChunkElement(BaseModel): """The page number where the element was found""" content: str - """The full content of the extracted element""" + """The extracted text content of the element""" summary: Optional[str] = None """A brief summary of the element's content""" + image: Optional[str] = None + """The base64-encoded image data for figure elements""" + class ResultChunk(BaseModel): """A chunk of text extracted from a document page.""" From eb27c606437eea717438344e343c1adfa5ebff16 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 28 Feb 2026 04:28:45 +0000 Subject: [PATCH 13/15] feat(api): api update --- .stats.yml | 4 ++-- src/mixedbread/resources/stores/files.py | 4 ++-- src/mixedbread/types/stores/file_list_params.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index d2a86c88..bcefba01 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-67f1ae8cdd8a043199c7da700cf26c5da787862faf895c2e0d737c83085e1573.yml -openapi_spec_hash: 38dde555682223f7b5c92e9e575e2beb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-0f4c537661b6b41d8a474988d30d94b16886f6969589c8c86e13f6dac8c54d72.yml +openapi_spec_hash: f585ba82e9ab6363aa405fa685c12db8 config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b diff --git a/src/mixedbread/resources/stores/files.py b/src/mixedbread/resources/stores/files.py index 6edd79dd..a4aafabd 100644 --- a/src/mixedbread/resources/stores/files.py +++ b/src/mixedbread/resources/stores/files.py @@ -271,7 +271,7 @@ def list( metadata_filter: Metadata filter to apply to the query - q: Search query for fuzzy matching over name and description fields + q: Search query for fuzzy matching over name and external_id fields extra_headers: Send extra headers @@ -810,7 +810,7 @@ async def list( metadata_filter: Metadata filter to apply to the query - q: Search query for fuzzy matching over name and description fields + q: Search query for fuzzy matching over name and external_id fields extra_headers: Send extra headers diff --git a/src/mixedbread/types/stores/file_list_params.py b/src/mixedbread/types/stores/file_list_params.py index 2782573a..2089f9cf 100644 --- a/src/mixedbread/types/stores/file_list_params.py +++ b/src/mixedbread/types/stores/file_list_params.py @@ -37,7 +37,7 @@ class FileListParams(TypedDict, total=False): """Metadata filter to apply to the query""" q: Optional[str] - """Search query for fuzzy matching over name and description fields""" + """Search query for fuzzy matching over name and external_id fields""" MetadataFilterUnionMember2: TypeAlias = Union["SearchFilter", SearchFilterCondition] From ca0c308b6beddf95360a9aec2f0c6e54170699f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:29:03 +0000 Subject: [PATCH 14/15] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bcefba01..01d8c465 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-0f4c537661b6b41d8a474988d30d94b16886f6969589c8c86e13f6dac8c54d72.yml -openapi_spec_hash: f585ba82e9ab6363aa405fa685c12db8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-ad292a2fcdc2f827982c79762c5fdcadf57202228d0598afc6af5ef39c0897e9.yml +openapi_spec_hash: 9140dca6fb813601f82f32b54316a18a config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b From 08d7596a79c53907cfa4f6674e39d30a7b8b3a6b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:29:26 +0000 Subject: [PATCH 15/15] release: 1.1.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ pyproject.toml | 2 +- src/mixedbread/_version.py | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fea34540..2601677b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.0.0" + ".": "1.1.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 844a5b1c..a54ae5ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## 1.1.0 (2026-03-02) + +Full Changelog: [v1.0.0...v1.1.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v1.0.0...v1.1.0) + +### Features + +* **api:** api update ([eb27c60](https://github.com/mixedbread-ai/mixedbread-python/commit/eb27c606437eea717438344e343c1adfa5ebff16)) +* **api:** api update ([c4be5ae](https://github.com/mixedbread-ai/mixedbread-python/commit/c4be5ae024212e1fd1feaabdc1d2b07c14228eb7)) +* **api:** api update ([153c4ba](https://github.com/mixedbread-ai/mixedbread-python/commit/153c4ba201048975a882983f882491352a1d7bd3)) +* **api:** api update ([216baf6](https://github.com/mixedbread-ai/mixedbread-python/commit/216baf6093ec37db5b57d0fb675a7c7212bea750)) +* **api:** api update ([8fef561](https://github.com/mixedbread-ai/mixedbread-python/commit/8fef5613483e10652fd1e35ba3e2097a26a5cfcd)) +* **api:** api update ([10a541d](https://github.com/mixedbread-ai/mixedbread-python/commit/10a541d3fa4015fdb5e2b6720fdf1f97322b5439)) + + +### Chores + +* format all `api.md` files ([d167e2d](https://github.com/mixedbread-ai/mixedbread-python/commit/d167e2d222b34334f86313213bb01d7c8a003f18)) +* **internal:** add request options to SSE classes ([f241bf6](https://github.com/mixedbread-ai/mixedbread-python/commit/f241bf6d47c31faf166869ef96219d7c7d4c8e10)) +* **internal:** fix lint error on Python 3.14 ([72f3d05](https://github.com/mixedbread-ai/mixedbread-python/commit/72f3d05d8e2b6bea43db9001270d836f21254a9e)) +* **internal:** make `test_proxy_environment_variables` more resilient ([d0ec2d9](https://github.com/mixedbread-ai/mixedbread-python/commit/d0ec2d97d74bbf31468fd8ef537f8d142dc92fc7)) +* **internal:** make `test_proxy_environment_variables` more resilient to env ([c287c24](https://github.com/mixedbread-ai/mixedbread-python/commit/c287c24551007387ccd78ce9faea8d4bae02719e)) +* update mock server docs ([b3523db](https://github.com/mixedbread-ai/mixedbread-python/commit/b3523db2445a8a389ca9828deea5d991c095bd0f)) + ## 1.0.0 (2026-02-12) Full Changelog: [v0.46.0...v1.0.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.46.0...v1.0.0) diff --git a/pyproject.toml b/pyproject.toml index e563f7e5..e2882452 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mixedbread" -version = "1.0.0" +version = "1.1.0" description = "The official Python library for the Mixedbread API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/mixedbread/_version.py b/src/mixedbread/_version.py index a6b0880b..3a84f331 100644 --- a/src/mixedbread/_version.py +++ b/src/mixedbread/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "mixedbread" -__version__ = "1.0.0" # x-release-please-version +__version__ = "1.1.0" # x-release-please-version