Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
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.7.1"
".": "0.8.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 49
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-a331b701867ba3d3dd907c8389fde663be4fda24c91e23f54f4dde8a6ade683f.yml
openapi_spec_hash: 95587d9746abb97d5b294bfedf86b782
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-258cd9419639d2d3d821e9c63a336fb7fecc362f376a7f606868445bcef995cd.yml
openapi_spec_hash: e2c4cf1543194f94f3b0baad6a5735ba
config_hash: ca0dfb431a44ea42464c42b224addf36
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.8.0 (2025-06-17)

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

### Features

* **api:** api update ([c49a7d3](https://github.com/mixedbread-ai/mixedbread-python/commit/c49a7d306eb7cf9c3101db686f7b982f9bd53415))


### Chores

* **ci:** enable for pull requests ([fa2d679](https://github.com/mixedbread-ai/mixedbread-python/commit/fa2d67970ea8da1ea66ac588a774037d56571d14))
* **internal:** update conftest.py ([8f25dcd](https://github.com/mixedbread-ai/mixedbread-python/commit/8f25dcdee6c50210e5c7cdbea3af5b9e1aa2ae85))
* **tests:** add tests for httpx client instantiation & proxies ([290b160](https://github.com/mixedbread-ai/mixedbread-python/commit/290b160b115fe7518b71f773419ceabeecbd72b7))

## 0.7.1 (2025-06-16)

Full Changelog: [v0.7.0...v0.7.1](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.7.0...v0.7.1)
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.7.1"
version = "0.8.0"
description = "The official Python library for the Mixedbread API"
dynamic = ["readme"]
license = "Apache-2.0"
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.7.1" # x-release-please-version
__version__ = "0.8.0" # x-release-please-version
16 changes: 16 additions & 0 deletions src/mixedbread/resources/vector_stores/vector_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def create(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
is_public: bool | NotGiven = NOT_GIVEN,
expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
file_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
Expand All @@ -95,6 +96,8 @@ def create(

description: Description of the vector store

is_public: Whether the vector store can be accessed by anyone with valid login credentials

expires_after: Represents an expiration policy for a vector store.

metadata: Optional metadata key-value pairs
Expand All @@ -115,6 +118,7 @@ def create(
{
"name": name,
"description": description,
"is_public": is_public,
"expires_after": expires_after,
"metadata": metadata,
"file_ids": file_ids,
Expand Down Expand Up @@ -174,6 +178,7 @@ def update(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
is_public: Optional[bool] | NotGiven = NOT_GIVEN,
expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -199,6 +204,8 @@ def update(

description: New description

is_public: Whether the vector store can be accessed by anyone with valid login credentials

expires_after: Represents an expiration policy for a vector store.

metadata: Optional metadata key-value pairs
Expand All @@ -221,6 +228,7 @@ def update(
{
"name": name,
"description": description,
"is_public": is_public,
"expires_after": expires_after,
"metadata": metadata,
},
Expand Down Expand Up @@ -507,6 +515,7 @@ async def create(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
is_public: bool | NotGiven = NOT_GIVEN,
expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
file_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
Expand All @@ -530,6 +539,8 @@ async def create(

description: Description of the vector store

is_public: Whether the vector store can be accessed by anyone with valid login credentials

expires_after: Represents an expiration policy for a vector store.

metadata: Optional metadata key-value pairs
Expand All @@ -550,6 +561,7 @@ async def create(
{
"name": name,
"description": description,
"is_public": is_public,
"expires_after": expires_after,
"metadata": metadata,
"file_ids": file_ids,
Expand Down Expand Up @@ -609,6 +621,7 @@ async def update(
*,
name: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
is_public: Optional[bool] | NotGiven = NOT_GIVEN,
expires_after: Optional[ExpiresAfterParam] | NotGiven = NOT_GIVEN,
metadata: object | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -634,6 +647,8 @@ async def update(

description: New description

is_public: Whether the vector store can be accessed by anyone with valid login credentials

expires_after: Represents an expiration policy for a vector store.

metadata: Optional metadata key-value pairs
Expand All @@ -656,6 +671,7 @@ async def update(
{
"name": name,
"description": description,
"is_public": is_public,
"expires_after": expires_after,
"metadata": metadata,
},
Expand Down
3 changes: 3 additions & 0 deletions src/mixedbread/types/vector_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class VectorStore(BaseModel):
description: Optional[str] = None
"""Detailed description of the vector store's purpose and contents"""

is_public: Optional[bool] = None
"""Whether the vector store can be accessed by anyone with valid login credentials"""

metadata: Optional[object] = None
"""Additional metadata associated with the vector store"""

Expand Down
3 changes: 3 additions & 0 deletions src/mixedbread/types/vector_store_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class VectorStoreCreateParams(TypedDict, total=False):
description: Optional[str]
"""Description of the vector store"""

is_public: bool
"""Whether the vector store can be accessed by anyone with valid login credentials"""

expires_after: Optional[ExpiresAfterParam]
"""Represents an expiration policy for a vector store."""

Expand Down
3 changes: 3 additions & 0 deletions src/mixedbread/types/vector_store_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class VectorStoreUpdateParams(TypedDict, total=False):
description: Optional[str]
"""New description"""

is_public: Optional[bool]
"""Whether the vector store can be accessed by anyone with valid login credentials"""

expires_after: Optional[ExpiresAfterParam]
"""Represents an expiration policy for a vector store."""

Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/test_vector_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_method_create_with_all_params(self, client: Mixedbread) -> None:
vector_store = client.vector_stores.create(
name="Technical Documentation",
description="Contains technical specifications and guides",
is_public=False,
expires_after={
"anchor": "last_active_at",
"days": 0,
Expand Down Expand Up @@ -115,6 +116,7 @@ def test_method_update_with_all_params(self, client: Mixedbread) -> None:
vector_store_identifier="vector_store_identifier",
name="x",
description="description",
is_public=True,
expires_after={
"anchor": "last_active_at",
"days": 0,
Expand Down Expand Up @@ -415,6 +417,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncMixedbread
vector_store = await async_client.vector_stores.create(
name="Technical Documentation",
description="Contains technical specifications and guides",
is_public=False,
expires_after={
"anchor": "last_active_at",
"days": 0,
Expand Down Expand Up @@ -497,6 +500,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncMixedbread
vector_store_identifier="vector_store_identifier",
name="x",
description="description",
is_public=True,
expires_after={
"anchor": "last_active_at",
"days": 0,
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

import os
Expand Down
46 changes: 46 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
DEFAULT_TIMEOUT,
HTTPX_DEFAULT_TIMEOUT,
BaseClient,
DefaultHttpxClient,
DefaultAsyncHttpxClient,
make_request_options,
)
from mixedbread.types.vector_store_create_params import VectorStoreCreateParams
Expand Down Expand Up @@ -836,6 +838,28 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:

assert response.http_request.headers.get("x-stainless-retry-count") == "42"

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")

client = DefaultHttpxClient()

mounts = tuple(client._mounts.items())
assert len(mounts) == 1
assert mounts[0][0].pattern == "https://"

@pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning")
def test_default_client_creation(self) -> None:
# Ensure that the client can be initialized without any exceptions
DefaultHttpxClient(
verify=True,
cert=None,
trust_env=True,
http1=True,
http2=False,
limits=httpx.Limits(max_connections=100, max_keepalive_connections=20),
)

@pytest.mark.respx(base_url=base_url)
def test_follow_redirects(self, respx_mock: MockRouter) -> None:
# Test that the default follow_redirects=True allows following redirects
Expand Down Expand Up @@ -1699,6 +1723,28 @@ async def test_main() -> None:

time.sleep(0.1)

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")

client = DefaultAsyncHttpxClient()

mounts = tuple(client._mounts.items())
assert len(mounts) == 1
assert mounts[0][0].pattern == "https://"

@pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning")
async def test_default_client_creation(self) -> None:
# Ensure that the client can be initialized without any exceptions
DefaultAsyncHttpxClient(
verify=True,
cert=None,
trust_env=True,
http1=True,
http2=False,
limits=httpx.Limits(max_connections=100, max_keepalive_connections=20),
)

@pytest.mark.respx(base_url=base_url)
async def test_follow_redirects(self, respx_mock: MockRouter) -> None:
# Test that the default follow_redirects=True allows following redirects
Expand Down