Skip to content

Commit a4678db

Browse files
authored
Merge pull request #265 from mixedbread-ai/release-please--branches--main--changes--next
release: 0.47.0
2 parents 8d14736 + a824f57 commit a4678db

41 files changed

Lines changed: 2182 additions & 61 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.0.0"
2+
".": "0.47.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 51
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-68449c5f406b2b3bc2b94ef7f94c47b3724aa0a69e1033bef1a84477f79420f5.yml
3-
openapi_spec_hash: 2b6de88d9a14a977a66f37c066d0b47a
4-
config_hash: fb2cfcdc5ef83ff03407a8b66c26a59b
1+
configured_endpoints: 56
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-83afe8d98b70a903eb9aa13b512b18aa3df9e5ec4c784bded17ac78d0a163c3c.yml
3+
openapi_spec_hash: 90b33b757e12f21c94705b6243054b5f
4+
config_hash: c32ffa6858a02d7f23f6f3dda0b461ed

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# Changelog
22

3+
## 0.47.0 (2026-03-05)
4+
5+
Full Changelog: [v1.0.0...v0.47.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v1.0.0...v0.47.0)
6+
7+
### Features
8+
9+
* **api:** add uploads (multipart) subresource to files ([f510cc9](https://github.com/mixedbread-ai/mixedbread-python/commit/f510cc9d7ae96b0874ee2e7ed9b6f4bf37fe8a07))
10+
* **api:** api update ([e95f5f1](https://github.com/mixedbread-ai/mixedbread-python/commit/e95f5f1ca1ad4215a5d2bc2fa3e5e6838bd17c3c))
11+
* **api:** api update ([eb27c60](https://github.com/mixedbread-ai/mixedbread-python/commit/eb27c606437eea717438344e343c1adfa5ebff16))
12+
* **api:** api update ([c4be5ae](https://github.com/mixedbread-ai/mixedbread-python/commit/c4be5ae024212e1fd1feaabdc1d2b07c14228eb7))
13+
* **api:** api update ([153c4ba](https://github.com/mixedbread-ai/mixedbread-python/commit/153c4ba201048975a882983f882491352a1d7bd3))
14+
* **api:** api update ([216baf6](https://github.com/mixedbread-ai/mixedbread-python/commit/216baf6093ec37db5b57d0fb675a7c7212bea750))
15+
* **api:** api update ([8fef561](https://github.com/mixedbread-ai/mixedbread-python/commit/8fef5613483e10652fd1e35ba3e2097a26a5cfcd))
16+
* **api:** api update ([10a541d](https://github.com/mixedbread-ai/mixedbread-python/commit/10a541d3fa4015fdb5e2b6720fdf1f97322b5439))
17+
* **api:** files uploads (multipart) subresource ([93a98e6](https://github.com/mixedbread-ai/mixedbread-python/commit/93a98e6c38cce16f1de10df080e6a81e9be25f93))
18+
* **api:** manual updates ([e38a505](https://github.com/mixedbread-ai/mixedbread-python/commit/e38a505829b962ad8115859cfb3eff149e3c6cb3))
19+
* **api:** manual updates ([860868e](https://github.com/mixedbread-ai/mixedbread-python/commit/860868e1b9d9c56570fe05e9525bd17bcf427515))
20+
* **api:** manual updates ([33abdc9](https://github.com/mixedbread-ai/mixedbread-python/commit/33abdc949c57c09804841b7d53c0fec22a02133a))
21+
* use multipart uploads API for large files automatically with optional config ([#18](https://github.com/mixedbread-ai/mixedbread-python/issues/18)) ([ff0f83f](https://github.com/mixedbread-ai/mixedbread-python/commit/ff0f83fda625c0c67d478bd4cccd6cd179fea44a))
22+
23+
24+
### Bug Fixes
25+
26+
* cancel orphaned upload tasks and fix file size calc for io bytes ([#21](https://github.com/mixedbread-ai/mixedbread-python/issues/21)) ([46aea64](https://github.com/mixedbread-ai/mixedbread-python/commit/46aea647e9aa19ee8095dd1bafe8c54d9f1d7bb9))
27+
* count uploaded bytes correctly even if parts finish out of order ([#20](https://github.com/mixedbread-ai/mixedbread-python/issues/20)) ([eb8af86](https://github.com/mixedbread-ai/mixedbread-python/commit/eb8af86bcc757e50199d5fc963cb203897b704b6))
28+
* do not block event loop for read_part on async coroutine in multipart upload ([#19](https://github.com/mixedbread-ai/mixedbread-python/issues/19)) ([537f825](https://github.com/mixedbread-ai/mixedbread-python/commit/537f8254bfa0e11fe3a32c14d5705fdac5b9bc04))
29+
* do not drop request uptions on multipart upload path ([#23](https://github.com/mixedbread-ai/mixedbread-python/issues/23)) ([2859304](https://github.com/mixedbread-ai/mixedbread-python/commit/2859304036ccc25bcee28d6f5a1c564c6a70ca9e))
30+
* explicit multipart upload config in store files APIs ([#22](https://github.com/mixedbread-ai/mixedbread-python/issues/22)) ([0ebb7b0](https://github.com/mixedbread-ai/mixedbread-python/commit/0ebb7b0d4cbdd0fd41842e5ac2caa8a4b0d3d9aa))
31+
32+
33+
### Chores
34+
35+
* format all `api.md` files ([d167e2d](https://github.com/mixedbread-ai/mixedbread-python/commit/d167e2d222b34334f86313213bb01d7c8a003f18))
36+
* **internal:** add request options to SSE classes ([f241bf6](https://github.com/mixedbread-ai/mixedbread-python/commit/f241bf6d47c31faf166869ef96219d7c7d4c8e10))
37+
* **internal:** fix lint error on Python 3.14 ([72f3d05](https://github.com/mixedbread-ai/mixedbread-python/commit/72f3d05d8e2b6bea43db9001270d836f21254a9e))
38+
* **internal:** make `test_proxy_environment_variables` more resilient ([d0ec2d9](https://github.com/mixedbread-ai/mixedbread-python/commit/d0ec2d97d74bbf31468fd8ef537f8d142dc92fc7))
39+
* **internal:** make `test_proxy_environment_variables` more resilient to env ([c287c24](https://github.com/mixedbread-ai/mixedbread-python/commit/c287c24551007387ccd78ce9faea8d4bae02719e))
40+
* update mock server docs ([b3523db](https://github.com/mixedbread-ai/mixedbread-python/commit/b3523db2445a8a389ca9828deea5d991c095bd0f))
41+
342
## 1.0.0 (2026-02-12)
443

544
Full Changelog: [v0.46.0...v1.0.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.46.0...v1.0.0)

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ $ pip install ./path-to-wheel-file.whl
8888
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
8989

9090
```sh
91-
# you will need npm installed
92-
$ npx prism mock path/to/your/openapi.yml
91+
$ ./scripts/mock
9392
```
9493

9594
```sh

api.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,35 @@ from mixedbread.types import FileObject, PaginationWithTotal, FileDeleteResponse
115115

116116
Methods:
117117

118-
- <code title="post /v1/files">client.files.<a href="./src/mixedbread/resources/files.py">create</a>(\*\*<a href="src/mixedbread/types/file_create_params.py">params</a>) -> <a href="./src/mixedbread/types/file_object.py">FileObject</a></code>
119-
- <code title="get /v1/files/{file_id}">client.files.<a href="./src/mixedbread/resources/files.py">retrieve</a>(file_id) -> <a href="./src/mixedbread/types/file_object.py">FileObject</a></code>
120-
- <code title="post /v1/files/{file_id}">client.files.<a href="./src/mixedbread/resources/files.py">update</a>(file_id, \*\*<a href="src/mixedbread/types/file_update_params.py">params</a>) -> <a href="./src/mixedbread/types/file_object.py">FileObject</a></code>
121-
- <code title="get /v1/files">client.files.<a href="./src/mixedbread/resources/files.py">list</a>(\*\*<a href="src/mixedbread/types/file_list_params.py">params</a>) -> <a href="./src/mixedbread/types/file_object.py">SyncCursor[FileObject]</a></code>
122-
- <code title="delete /v1/files/{file_id}">client.files.<a href="./src/mixedbread/resources/files.py">delete</a>(file_id) -> <a href="./src/mixedbread/types/file_delete_response.py">FileDeleteResponse</a></code>
123-
- <code title="get /v1/files/{file_id}/content">client.files.<a href="./src/mixedbread/resources/files.py">content</a>(file_id) -> BinaryAPIResponse</code>
118+
- <code title="post /v1/files">client.files.<a href="./src/mixedbread/resources/files/files.py">create</a>(\*\*<a href="src/mixedbread/types/file_create_params.py">params</a>) -> <a href="./src/mixedbread/types/file_object.py">FileObject</a></code>
119+
- <code title="get /v1/files/{file_id}">client.files.<a href="./src/mixedbread/resources/files/files.py">retrieve</a>(file_id) -> <a href="./src/mixedbread/types/file_object.py">FileObject</a></code>
120+
- <code title="post /v1/files/{file_id}">client.files.<a href="./src/mixedbread/resources/files/files.py">update</a>(file_id, \*\*<a href="src/mixedbread/types/file_update_params.py">params</a>) -> <a href="./src/mixedbread/types/file_object.py">FileObject</a></code>
121+
- <code title="get /v1/files">client.files.<a href="./src/mixedbread/resources/files/files.py">list</a>(\*\*<a href="src/mixedbread/types/file_list_params.py">params</a>) -> <a href="./src/mixedbread/types/file_object.py">SyncCursor[FileObject]</a></code>
122+
- <code title="delete /v1/files/{file_id}">client.files.<a href="./src/mixedbread/resources/files/files.py">delete</a>(file_id) -> <a href="./src/mixedbread/types/file_delete_response.py">FileDeleteResponse</a></code>
123+
- <code title="get /v1/files/{file_id}/content">client.files.<a href="./src/mixedbread/resources/files/files.py">content</a>(file_id) -> BinaryAPIResponse</code>
124+
125+
## Uploads
126+
127+
Types:
128+
129+
```python
130+
from mixedbread.types.files import (
131+
MultipartUploadPart,
132+
MultipartUploadPartURL,
133+
UploadCreateResponse,
134+
UploadRetrieveResponse,
135+
UploadListResponse,
136+
UploadAbortResponse,
137+
)
138+
```
139+
140+
Methods:
141+
142+
- <code title="post /v1/files/uploads">client.files.uploads.<a href="./src/mixedbread/resources/files/uploads.py">create</a>(\*\*<a href="src/mixedbread/types/files/upload_create_params.py">params</a>) -> <a href="./src/mixedbread/types/files/upload_create_response.py">UploadCreateResponse</a></code>
143+
- <code title="get /v1/files/uploads/{upload_id}">client.files.uploads.<a href="./src/mixedbread/resources/files/uploads.py">retrieve</a>(upload_id) -> <a href="./src/mixedbread/types/files/upload_retrieve_response.py">UploadRetrieveResponse</a></code>
144+
- <code title="get /v1/files/uploads">client.files.uploads.<a href="./src/mixedbread/resources/files/uploads.py">list</a>() -> <a href="./src/mixedbread/types/files/upload_list_response.py">UploadListResponse</a></code>
145+
- <code title="post /v1/files/uploads/{upload_id}/abort">client.files.uploads.<a href="./src/mixedbread/resources/files/uploads.py">abort</a>(upload_id) -> <a href="./src/mixedbread/types/files/upload_abort_response.py">UploadAbortResponse</a></code>
146+
- <code title="post /v1/files/uploads/{upload_id}/complete">client.files.uploads.<a href="./src/mixedbread/resources/files/uploads.py">complete</a>(upload_id, \*\*<a href="src/mixedbread/types/files/upload_complete_params.py">params</a>) -> <a href="./src/mixedbread/types/file_object.py">FileObject</a></code>
124147

125148
# Extractions
126149

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mixedbread"
3-
version = "1.0.0"
3+
version = "0.47.0"
44
description = "The official Python library for the Mixedbread API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -69,7 +69,7 @@ format = { chain = [
6969
# run formatting again to fix any inconsistencies when imports are stripped
7070
"format:ruff",
7171
]}
72-
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
72+
"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'"
7373
"format:ruff" = "ruff format"
7474

7575
"lint" = { chain = [

src/mixedbread/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import typing as _t
44

55
from . import types
6+
from .lib import PartUploadEvent as PartUploadEvent, MultipartUploadOptions as MultipartUploadOptions
67
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
78
from ._utils import file_from_path
89
from ._client import (
@@ -83,6 +84,8 @@
8384
"DefaultHttpxClient",
8485
"DefaultAsyncHttpxClient",
8586
"DefaultAioHttpClient",
87+
"MultipartUploadOptions",
88+
"PartUploadEvent",
8689
]
8790

8891
if not _t.TYPE_CHECKING:

src/mixedbread/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
if TYPE_CHECKING:
5656
from .resources import chat, files, stores, parsing, api_keys, embeddings, extractions, data_sources
5757
from .resources.chat import ChatResource, AsyncChatResource
58-
from .resources.files import FilesResource, AsyncFilesResource
5958
from .resources.api_keys import APIKeysResource, AsyncAPIKeysResource
6059
from .resources.embeddings import EmbeddingsResource, AsyncEmbeddingsResource
60+
from .resources.files.files import FilesResource, AsyncFilesResource
6161
from .resources.stores.stores import StoresResource, AsyncStoresResource
6262
from .resources.parsing.parsing import ParsingResource, AsyncParsingResource
6363
from .resources.extractions.extractions import ExtractionsResource, AsyncExtractionsResource

src/mixedbread/_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
152152
),
153153
response=self.http_response,
154154
client=cast(Any, self._client),
155+
options=self._options,
155156
),
156157
)
157158

@@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
162163
cast_to=extract_stream_chunk_type(self._stream_cls),
163164
response=self.http_response,
164165
client=cast(Any, self._client),
166+
options=self._options,
165167
),
166168
)
167169

@@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
175177
cast_to=cast_to,
176178
response=self.http_response,
177179
client=cast(Any, self._client),
180+
options=self._options,
178181
),
179182
)
180183

src/mixedbread/_streaming.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55
import inspect
66
from types import TracebackType
7-
from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast
7+
from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast
88
from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable
99

1010
import httpx
@@ -13,6 +13,7 @@
1313

1414
if TYPE_CHECKING:
1515
from ._client import Mixedbread, AsyncMixedbread
16+
from ._models import FinalRequestOptions
1617

1718

1819
_T = TypeVar("_T")
@@ -22,7 +23,7 @@ class Stream(Generic[_T]):
2223
"""Provides the core interface to iterate over a synchronous stream response."""
2324

2425
response: httpx.Response
25-
26+
_options: Optional[FinalRequestOptions] = None
2627
_decoder: SSEBytesDecoder
2728

2829
def __init__(
@@ -31,10 +32,12 @@ def __init__(
3132
cast_to: type[_T],
3233
response: httpx.Response,
3334
client: Mixedbread,
35+
options: Optional[FinalRequestOptions] = None,
3436
) -> None:
3537
self.response = response
3638
self._cast_to = cast_to
3739
self._client = client
40+
self._options = options
3841
self._decoder = client._make_sse_decoder()
3942
self._iterator = self.__stream__()
4043

@@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]):
8588
"""Provides the core interface to iterate over an asynchronous stream response."""
8689

8790
response: httpx.Response
88-
91+
_options: Optional[FinalRequestOptions] = None
8992
_decoder: SSEDecoder | SSEBytesDecoder
9093

9194
def __init__(
@@ -94,10 +97,12 @@ def __init__(
9497
cast_to: type[_T],
9598
response: httpx.Response,
9699
client: AsyncMixedbread,
100+
options: Optional[FinalRequestOptions] = None,
97101
) -> None:
98102
self.response = response
99103
self._cast_to = cast_to
100104
self._client = client
105+
self._options = options
101106
self._decoder = client._make_sse_decoder()
102107
self._iterator = self.__stream__()
103108

0 commit comments

Comments
 (0)