Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/mixedbread-python'
if: |-
github.repository == 'stainless-sdks/mixedbread-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/mixedbread-python'
if: |-
github.repository == 'stainless-sdks/mixedbread-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.47.0"
".": "0.47.1"
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.47.1 (2026-03-08)

Full Changelog: [v0.47.0...v0.47.1](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.47.0...v0.47.1)

### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([ffb6f62](https://github.com/mixedbread-ai/mixedbread-python/commit/ffb6f62c5ad6afb7b6330ef4159a32f35327b1b9))
* **test:** do not count install time for mock server timeout ([5094a5c](https://github.com/mixedbread-ai/mixedbread-python/commit/5094a5c23d75363566963e806d60bf214575c89d))
* update placeholder string ([eeb1328](https://github.com/mixedbread-ai/mixedbread-python/commit/eeb13288a93f42b17d3f21a7980d22c34c7afc8b))

## 0.47.0 (2026-03-05)

Full Changelog: [v1.0.0...v0.47.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v1.0.0...v0.47.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mixedbread"
version = "0.47.0"
version = "0.47.1"
description = "The official Python library for the Mixedbread API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
13 changes: 12 additions & 1 deletion scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version

npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
# Wait for server to come online (max 30s)
echo -n "Waiting for server"
attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
echo "Timed out waiting for Prism server to start"
cat .prism.log
exit 1
fi
echo -n "."
sleep 0.1
done
Expand Down
2 changes: 1 addition & 1 deletion src/mixedbread/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "mixedbread"
__version__ = "0.47.0" # x-release-please-version
__version__ = "0.47.1" # x-release-please-version
28 changes: 14 additions & 14 deletions tests/api_resources/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class TestFiles:
@parametrize
def test_method_create(self, client: Mixedbread) -> None:
file = client.files.create(
file=b"raw file contents",
file=b"Example data",
)
assert_matches_type(FileObject, file, path=["response"])

@parametrize
def test_raw_response_create(self, client: Mixedbread) -> None:
response = client.files.with_raw_response.create(
file=b"raw file contents",
file=b"Example data",
)

assert response.is_closed is True
Expand All @@ -47,7 +47,7 @@ def test_raw_response_create(self, client: Mixedbread) -> None:
@parametrize
def test_streaming_response_create(self, client: Mixedbread) -> None:
with client.files.with_streaming_response.create(
file=b"raw file contents",
file=b"Example data",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -99,15 +99,15 @@ def test_path_params_retrieve(self, client: Mixedbread) -> None:
def test_method_update(self, client: Mixedbread) -> None:
file = client.files.update(
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
file=b"raw file contents",
file=b"Example data",
)
assert_matches_type(FileObject, file, path=["response"])

@parametrize
def test_raw_response_update(self, client: Mixedbread) -> None:
response = client.files.with_raw_response.update(
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
file=b"raw file contents",
file=b"Example data",
)

assert response.is_closed is True
Expand All @@ -119,7 +119,7 @@ def test_raw_response_update(self, client: Mixedbread) -> None:
def test_streaming_response_update(self, client: Mixedbread) -> None:
with client.files.with_streaming_response.update(
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
file=b"raw file contents",
file=b"Example data",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -134,7 +134,7 @@ def test_path_params_update(self, client: Mixedbread) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"):
client.files.with_raw_response.update(
file_id="",
file=b"raw file contents",
file=b"Example data",
)

@parametrize
Expand Down Expand Up @@ -276,14 +276,14 @@ class TestAsyncFiles:
@parametrize
async def test_method_create(self, async_client: AsyncMixedbread) -> None:
file = await async_client.files.create(
file=b"raw file contents",
file=b"Example data",
)
assert_matches_type(FileObject, file, path=["response"])

@parametrize
async def test_raw_response_create(self, async_client: AsyncMixedbread) -> None:
response = await async_client.files.with_raw_response.create(
file=b"raw file contents",
file=b"Example data",
)

assert response.is_closed is True
Expand All @@ -294,7 +294,7 @@ async def test_raw_response_create(self, async_client: AsyncMixedbread) -> None:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncMixedbread) -> None:
async with async_client.files.with_streaming_response.create(
file=b"raw file contents",
file=b"Example data",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -346,15 +346,15 @@ async def test_path_params_retrieve(self, async_client: AsyncMixedbread) -> None
async def test_method_update(self, async_client: AsyncMixedbread) -> None:
file = await async_client.files.update(
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
file=b"raw file contents",
file=b"Example data",
)
assert_matches_type(FileObject, file, path=["response"])

@parametrize
async def test_raw_response_update(self, async_client: AsyncMixedbread) -> None:
response = await async_client.files.with_raw_response.update(
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
file=b"raw file contents",
file=b"Example data",
)

assert response.is_closed is True
Expand All @@ -366,7 +366,7 @@ async def test_raw_response_update(self, async_client: AsyncMixedbread) -> None:
async def test_streaming_response_update(self, async_client: AsyncMixedbread) -> None:
async with async_client.files.with_streaming_response.update(
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
file=b"raw file contents",
file=b"Example data",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -381,7 +381,7 @@ async def test_path_params_update(self, async_client: AsyncMixedbread) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_id` but received ''"):
await async_client.files.with_raw_response.update(
file_id="",
file=b"raw file contents",
file=b"Example data",
)

@parametrize
Expand Down
Loading