From 6b5c9ad8271ecb8887faf8cb678805e6d481459c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 22:50:49 +0000 Subject: [PATCH 01/13] chore(internal): add request options to SSE classes --- src/hyperspell/_response.py | 3 +++ src/hyperspell/_streaming.py | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/hyperspell/_response.py b/src/hyperspell/_response.py index e1cbe16a..3de65894 100644 --- a/src/hyperspell/_response.py +++ b/src/hyperspell/_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/hyperspell/_streaming.py b/src/hyperspell/_streaming.py index ec124810..b32811c5 100644 --- a/src/hyperspell/_streaming.py +++ b/src/hyperspell/_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 Hyperspell, AsyncHyperspell + 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,6 +32,7 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: Hyperspell, + options: Optional[FinalRequestOptions] = None, timeout: float | None = None, ) -> None: """Initialize the synchronous stream. @@ -44,6 +46,7 @@ def __init__( self.response = response self._cast_to = cast_to self._client = client + self._options = options self._timeout = timeout self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() @@ -115,7 +118,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__( @@ -124,6 +127,7 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: AsyncHyperspell, + options: Optional[FinalRequestOptions] = None, timeout: float | None = None, ) -> None: """Initialize the asynchronous stream. @@ -137,6 +141,7 @@ def __init__( self.response = response self._cast_to = cast_to self._client = client + self._options = options self._timeout = timeout self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() From 3cc33321d35a6162c6c8540b571d4d3c2b63a022 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 08:34:57 +0000 Subject: [PATCH 02/13] 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 f3aef279..57ba050e 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1019,6 +1019,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() @@ -1998,6 +2000,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 2c99a7f619b2581f2bf7bc2bea4519fc1f6c5733 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 08:11:34 +0000 Subject: [PATCH 03/13] 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 57ba050e..fedd4853 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1019,8 +1019,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() @@ -2000,8 +2006,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 e01d911cb400b1ee3827332299f054d278f867d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 00:25:33 +0000 Subject: [PATCH 04/13] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/memories.py | 10 ++++++++++ src/hyperspell/types/auth_me_response.py | 2 ++ src/hyperspell/types/connection_list_response.py | 1 + src/hyperspell/types/integration_list_response.py | 1 + .../types/integrations/web_crawler_index_response.py | 1 + src/hyperspell/types/memory.py | 1 + src/hyperspell/types/memory_delete_response.py | 1 + src/hyperspell/types/memory_list_params.py | 1 + src/hyperspell/types/memory_list_response.py | 1 + src/hyperspell/types/memory_search_params.py | 1 + src/hyperspell/types/memory_status.py | 1 + src/hyperspell/types/memory_update_params.py | 1 + src/hyperspell/types/shared/query_result.py | 1 + 14 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 782ef1fc..a56a7796 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-36cb6e2474f3fe09749b7a2f24409d48c8db332d624fa7eeb1ee6b6135774133.yml -openapi_spec_hash: 339a1b55d6b1a55213d16bf336045d0d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-28ef76911100f5f3b0934f35b93da890f59db35d8ad889bfb11fe67d5879d07e.yml +openapi_spec_hash: 5c83e03e89be87832239a3eb04eccff3 config_hash: 983708fc30c86269c2149a960d0bfec1 diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index 8665314f..a386c13f 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -74,6 +74,7 @@ def update( "google_drive", "vault", "web_crawler", + "trace", ], collection: Union[str, object, None] | Omit = omit, metadata: Union[Dict[str, Union[str, float, bool, None]], object, None] | Omit = omit, @@ -154,6 +155,7 @@ def list( "google_drive", "vault", "web_crawler", + "trace", ] ] | Omit = omit, @@ -227,6 +229,7 @@ def delete( "google_drive", "vault", "web_crawler", + "trace", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -397,6 +400,7 @@ def get( "google_drive", "vault", "web_crawler", + "trace", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -448,6 +452,7 @@ def search( "google_drive", "vault", "web_crawler", + "trace", ] ] | Omit = omit, @@ -615,6 +620,7 @@ async def update( "google_drive", "vault", "web_crawler", + "trace", ], collection: Union[str, object, None] | Omit = omit, metadata: Union[Dict[str, Union[str, float, bool, None]], object, None] | Omit = omit, @@ -695,6 +701,7 @@ def list( "google_drive", "vault", "web_crawler", + "trace", ] ] | Omit = omit, @@ -768,6 +775,7 @@ async def delete( "google_drive", "vault", "web_crawler", + "trace", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -938,6 +946,7 @@ async def get( "google_drive", "vault", "web_crawler", + "trace", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -989,6 +998,7 @@ async def search( "google_drive", "vault", "web_crawler", + "trace", ] ] | Omit = omit, diff --git a/src/hyperspell/types/auth_me_response.py b/src/hyperspell/types/auth_me_response.py index feeae525..6e493b15 100644 --- a/src/hyperspell/types/auth_me_response.py +++ b/src/hyperspell/types/auth_me_response.py @@ -44,6 +44,7 @@ class AuthMeResponse(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] ] """All integrations available for the app""" @@ -60,6 +61,7 @@ class AuthMeResponse(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] ] """All integrations installed for the user""" diff --git a/src/hyperspell/types/connection_list_response.py b/src/hyperspell/types/connection_list_response.py index 6650045c..96f21ef5 100644 --- a/src/hyperspell/types/connection_list_response.py +++ b/src/hyperspell/types/connection_list_response.py @@ -29,6 +29,7 @@ class Connection(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] """The connection's provider""" diff --git a/src/hyperspell/types/integration_list_response.py b/src/hyperspell/types/integration_list_response.py index fa6ef1a2..e3f09c39 100644 --- a/src/hyperspell/types/integration_list_response.py +++ b/src/hyperspell/types/integration_list_response.py @@ -35,6 +35,7 @@ class Integration(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] """The integration's provider""" diff --git a/src/hyperspell/types/integrations/web_crawler_index_response.py b/src/hyperspell/types/integrations/web_crawler_index_response.py index 7e2a9a8c..29a57c7a 100644 --- a/src/hyperspell/types/integrations/web_crawler_index_response.py +++ b/src/hyperspell/types/integrations/web_crawler_index_response.py @@ -21,6 +21,7 @@ class WebCrawlerIndexResponse(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] status: Literal["pending", "processing", "completed", "failed"] diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py index 2e009f5d..13493030 100644 --- a/src/hyperspell/types/memory.py +++ b/src/hyperspell/types/memory.py @@ -27,6 +27,7 @@ class Memory(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] type: str diff --git a/src/hyperspell/types/memory_delete_response.py b/src/hyperspell/types/memory_delete_response.py index 47e97a6c..d8a530e8 100644 --- a/src/hyperspell/types/memory_delete_response.py +++ b/src/hyperspell/types/memory_delete_response.py @@ -25,6 +25,7 @@ class MemoryDeleteResponse(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] success: bool diff --git a/src/hyperspell/types/memory_list_params.py b/src/hyperspell/types/memory_list_params.py index 79d5cdba..67799d8b 100644 --- a/src/hyperspell/types/memory_list_params.py +++ b/src/hyperspell/types/memory_list_params.py @@ -34,6 +34,7 @@ class MemoryListParams(TypedDict, total=False): "google_drive", "vault", "web_crawler", + "trace", ] ] """Filter documents by source.""" diff --git a/src/hyperspell/types/memory_list_response.py b/src/hyperspell/types/memory_list_response.py index 729bd3d6..39ddae3d 100644 --- a/src/hyperspell/types/memory_list_response.py +++ b/src/hyperspell/types/memory_list_response.py @@ -23,6 +23,7 @@ class MemoryListResponse(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] metadata: Optional[Metadata] = None diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index e5c93348..57121b04 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -49,6 +49,7 @@ class MemorySearchParams(TypedDict, total=False): "google_drive", "vault", "web_crawler", + "trace", ] ] """Only query documents from these sources.""" diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py index c9be10da..2d57740a 100644 --- a/src/hyperspell/types/memory_status.py +++ b/src/hyperspell/types/memory_status.py @@ -21,6 +21,7 @@ class MemoryStatus(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] status: Literal["pending", "processing", "completed", "failed"] diff --git a/src/hyperspell/types/memory_update_params.py b/src/hyperspell/types/memory_update_params.py index 2ceecd6a..fa170fcb 100644 --- a/src/hyperspell/types/memory_update_params.py +++ b/src/hyperspell/types/memory_update_params.py @@ -21,6 +21,7 @@ class MemoryUpdateParams(TypedDict, total=False): "google_drive", "vault", "web_crawler", + "trace", ] ] diff --git a/src/hyperspell/types/shared/query_result.py b/src/hyperspell/types/shared/query_result.py index c3e07b78..14f24a01 100644 --- a/src/hyperspell/types/shared/query_result.py +++ b/src/hyperspell/types/shared/query_result.py @@ -23,6 +23,7 @@ class Document(BaseModel): "google_drive", "vault", "web_crawler", + "trace", ] metadata: Optional[Metadata] = None From d330deaec6f907f4abee6dd8fc786da018ea72a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 06:25:35 +0000 Subject: [PATCH 05/13] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/types/memory_search_params.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index a56a7796..3a2aacfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-28ef76911100f5f3b0934f35b93da890f59db35d8ad889bfb11fe67d5879d07e.yml -openapi_spec_hash: 5c83e03e89be87832239a3eb04eccff3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-71f9a7fd0f63cb11f0674f2614dcf46fd669dd09439765b00858fae30bbeea1f.yml +openapi_spec_hash: 4191bdfdc7ac969c3310ecaeb10fdc9c config_hash: 983708fc30c86269c2149a960d0bfec1 diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 57121b04..76ae2f76 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -226,7 +226,9 @@ class Options(TypedDict, total=False): after: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """Only query documents created on or after this date.""" - answer_model: Literal["llama-3.1", "gemma2", "qwen-qwq", "mistral-saba", "llama-4-scout", "deepseek-r1"] + answer_model: Literal[ + "llama-3.1", "gemma2", "qwen-qwq", "mistral-saba", "llama-4-scout", "deepseek-r1", "gpt-oss-20b", "gpt-oss-120b" + ] """Model to use for answer generation when answer=True""" before: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] From b75e2b3bbb5a871a39d147e4cb0949d7279f3271 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 01:25:29 +0000 Subject: [PATCH 06/13] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/resources/memories.py | 10 ++++++++++ src/hyperspell/types/auth_me_response.py | 2 ++ src/hyperspell/types/connection_list_response.py | 1 + src/hyperspell/types/integration_list_response.py | 1 + .../types/integrations/web_crawler_index_response.py | 1 + src/hyperspell/types/memory.py | 1 + src/hyperspell/types/memory_delete_response.py | 1 + src/hyperspell/types/memory_list_params.py | 1 + src/hyperspell/types/memory_list_response.py | 1 + src/hyperspell/types/memory_search_params.py | 1 + src/hyperspell/types/memory_status.py | 1 + src/hyperspell/types/memory_update_params.py | 1 + src/hyperspell/types/shared/query_result.py | 1 + 14 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3a2aacfc..1645b898 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-71f9a7fd0f63cb11f0674f2614dcf46fd669dd09439765b00858fae30bbeea1f.yml -openapi_spec_hash: 4191bdfdc7ac969c3310ecaeb10fdc9c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-c588b46dd6bb770b1fc6b04b0eb61e064cd7266232ae9fbed8d73c0b41c52f6e.yml +openapi_spec_hash: f5a62027999d75f404e9ee63bddc145b config_hash: 983708fc30c86269c2149a960d0bfec1 diff --git a/src/hyperspell/resources/memories.py b/src/hyperspell/resources/memories.py index a386c13f..e79e9132 100644 --- a/src/hyperspell/resources/memories.py +++ b/src/hyperspell/resources/memories.py @@ -72,6 +72,7 @@ def update( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -153,6 +154,7 @@ def list( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -227,6 +229,7 @@ def delete( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -398,6 +401,7 @@ def get( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -450,6 +454,7 @@ def search( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -618,6 +623,7 @@ async def update( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -699,6 +705,7 @@ def list( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -773,6 +780,7 @@ async def delete( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -944,6 +952,7 @@ async def get( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -996,6 +1005,7 @@ async def search( "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/auth_me_response.py b/src/hyperspell/types/auth_me_response.py index 6e493b15..d8f298f2 100644 --- a/src/hyperspell/types/auth_me_response.py +++ b/src/hyperspell/types/auth_me_response.py @@ -42,6 +42,7 @@ class AuthMeResponse(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", @@ -59,6 +60,7 @@ class AuthMeResponse(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/connection_list_response.py b/src/hyperspell/types/connection_list_response.py index 96f21ef5..e43f8f63 100644 --- a/src/hyperspell/types/connection_list_response.py +++ b/src/hyperspell/types/connection_list_response.py @@ -27,6 +27,7 @@ class Connection(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/integration_list_response.py b/src/hyperspell/types/integration_list_response.py index e3f09c39..4d590381 100644 --- a/src/hyperspell/types/integration_list_response.py +++ b/src/hyperspell/types/integration_list_response.py @@ -33,6 +33,7 @@ class Integration(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/integrations/web_crawler_index_response.py b/src/hyperspell/types/integrations/web_crawler_index_response.py index 29a57c7a..cd76f8fc 100644 --- a/src/hyperspell/types/integrations/web_crawler_index_response.py +++ b/src/hyperspell/types/integrations/web_crawler_index_response.py @@ -19,6 +19,7 @@ class WebCrawlerIndexResponse(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/memory.py b/src/hyperspell/types/memory.py index 13493030..89d61f15 100644 --- a/src/hyperspell/types/memory.py +++ b/src/hyperspell/types/memory.py @@ -25,6 +25,7 @@ class Memory(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/memory_delete_response.py b/src/hyperspell/types/memory_delete_response.py index d8a530e8..453054a3 100644 --- a/src/hyperspell/types/memory_delete_response.py +++ b/src/hyperspell/types/memory_delete_response.py @@ -23,6 +23,7 @@ class MemoryDeleteResponse(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/memory_list_params.py b/src/hyperspell/types/memory_list_params.py index 67799d8b..910b4cb0 100644 --- a/src/hyperspell/types/memory_list_params.py +++ b/src/hyperspell/types/memory_list_params.py @@ -32,6 +32,7 @@ class MemoryListParams(TypedDict, total=False): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/memory_list_response.py b/src/hyperspell/types/memory_list_response.py index 39ddae3d..704b1f19 100644 --- a/src/hyperspell/types/memory_list_response.py +++ b/src/hyperspell/types/memory_list_response.py @@ -21,6 +21,7 @@ class MemoryListResponse(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 76ae2f76..20c4a97b 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -47,6 +47,7 @@ class MemorySearchParams(TypedDict, total=False): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/memory_status.py b/src/hyperspell/types/memory_status.py index 2d57740a..7a316e99 100644 --- a/src/hyperspell/types/memory_status.py +++ b/src/hyperspell/types/memory_status.py @@ -19,6 +19,7 @@ class MemoryStatus(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/memory_update_params.py b/src/hyperspell/types/memory_update_params.py index fa170fcb..ed3d2ca8 100644 --- a/src/hyperspell/types/memory_update_params.py +++ b/src/hyperspell/types/memory_update_params.py @@ -19,6 +19,7 @@ class MemoryUpdateParams(TypedDict, total=False): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", diff --git a/src/hyperspell/types/shared/query_result.py b/src/hyperspell/types/shared/query_result.py index 14f24a01..dd7bc7c6 100644 --- a/src/hyperspell/types/shared/query_result.py +++ b/src/hyperspell/types/shared/query_result.py @@ -21,6 +21,7 @@ class Document(BaseModel): "box", "dropbox", "google_drive", + "github", "vault", "web_crawler", "trace", From b76b873e4c01f4c9421cc6e452f216c19374b687 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 1 Mar 2026 23:25:36 +0000 Subject: [PATCH 07/13] feat(api): api update --- .stats.yml | 4 ++-- src/hyperspell/types/memory_search_params.py | 7 +++++++ tests/api_resources/test_memories.py | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1645b898..664d1db2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-c588b46dd6bb770b1fc6b04b0eb61e064cd7266232ae9fbed8d73c0b41c52f6e.yml -openapi_spec_hash: f5a62027999d75f404e9ee63bddc145b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ca07e6605f61ae00e12be55df648b38e467a31d505fdeec7879c8a9ea9e1b390.yml +openapi_spec_hash: 25915d4fcda54adbd8a7f106d8af2d65 config_hash: 983708fc30c86269c2149a960d0bfec1 diff --git a/src/hyperspell/types/memory_search_params.py b/src/hyperspell/types/memory_search_params.py index 20c4a97b..9cdf7aad 100644 --- a/src/hyperspell/types/memory_search_params.py +++ b/src/hyperspell/types/memory_search_params.py @@ -262,6 +262,13 @@ class Options(TypedDict, total=False): reddit: OptionsReddit """Search options for Reddit""" + resource_ids: Optional[SequenceNotStr[str]] + """Only return results from these specific resource IDs. + + Useful for scoping searches to specific documents (e.g., a specific email thread + or uploaded file). + """ + slack: OptionsSlack """Search options for Slack""" diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index fb3fb951..13211177 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -315,6 +315,7 @@ def test_method_search_with_all_params(self, client: Hyperspell) -> None: "subreddit": "subreddit", "weight": 0, }, + "resource_ids": ["string"], "slack": { "channels": ["string"], "exclude_archived": True, @@ -717,6 +718,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncHyperspell "subreddit": "subreddit", "weight": 0, }, + "resource_ids": ["string"], "slack": { "channels": ["string"], "exclude_archived": True, From f62f1a40dc90d44bde9c9ecfe67bcd159846fa31 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 20:29:19 +0000 Subject: [PATCH 08/13] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 664d1db2..ab1f428d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ca07e6605f61ae00e12be55df648b38e467a31d505fdeec7879c8a9ea9e1b390.yml openapi_spec_hash: 25915d4fcda54adbd8a7f106d8af2d65 -config_hash: 983708fc30c86269c2149a960d0bfec1 +config_hash: 4d9c48f9271d8bde9f997e7501429607 From 3d7a283ebe54b78a23964a17a3167c50da0aeba2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 20:31:31 +0000 Subject: [PATCH 09/13] chore(api): python trusted publisher --- .github/workflows/publish-pypi.yml | 5 +++-- .github/workflows/release-doctor.yml | 2 -- .stats.yml | 2 +- bin/check-release-environment | 4 ---- bin/publish-pypi | 6 +++++- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 53338790..1ff4a3ff 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -12,6 +12,9 @@ jobs: publish: name: publish runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v6 @@ -27,5 +30,3 @@ jobs: - name: Publish to PyPI run: | bash ./bin/publish-pypi - env: - PYPI_TOKEN: ${{ secrets.HYPERSPELL_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 7f739e2a..b7b5ce04 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -17,5 +17,3 @@ jobs: - name: Check release environment run: | bash ./bin/check-release-environment - env: - PYPI_TOKEN: ${{ secrets.HYPERSPELL_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.stats.yml b/.stats.yml index ab1f428d..bb13c776 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ca07e6605f61ae00e12be55df648b38e467a31d505fdeec7879c8a9ea9e1b390.yml openapi_spec_hash: 25915d4fcda54adbd8a7f106d8af2d65 -config_hash: 4d9c48f9271d8bde9f997e7501429607 +config_hash: fd3005a8f140e5baadd3d25b3c9cd79f diff --git a/bin/check-release-environment b/bin/check-release-environment index b845b0f4..1e951e9a 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -2,10 +2,6 @@ errors=() -if [ -z "${PYPI_TOKEN}" ]; then - errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") -fi - lenErrors=${#errors[@]} if [[ lenErrors -gt 0 ]]; then diff --git a/bin/publish-pypi b/bin/publish-pypi index 826054e9..4d74d121 100644 --- a/bin/publish-pypi +++ b/bin/publish-pypi @@ -3,4 +3,8 @@ set -eux mkdir -p dist rye build --clean -rye publish --yes --token=$PYPI_TOKEN +if [ -n "${PYPI_TOKEN:-}" ]; then + rye publish --yes --token=$PYPI_TOKEN +else + rye publish --yes +fi From 0f66c9dfe8e50d22f1a66f6de9b3ee0f1a89ab38 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 23:28:25 +0000 Subject: [PATCH 10/13] feat(api): api update --- .stats.yml | 4 ++-- tests/api_resources/test_memories.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index bb13c776..624dbcde 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-ca07e6605f61ae00e12be55df648b38e467a31d505fdeec7879c8a9ea9e1b390.yml -openapi_spec_hash: 25915d4fcda54adbd8a7f106d8af2d65 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-74ec424b735b297993534ab70f3a67ace300f8fdf420513f13567392510dd74f.yml +openapi_spec_hash: 86a1f32a14643bcee413662f7ae4b10f config_hash: fd3005a8f140e5baadd3d25b3c9cd79f diff --git a/tests/api_resources/test_memories.py b/tests/api_resources/test_memories.py index 13211177..784e3d0d 100644 --- a/tests/api_resources/test_memories.py +++ b/tests/api_resources/test_memories.py @@ -304,7 +304,7 @@ def test_method_search_with_all_params(self, client: Hyperspell) -> None: "label_ids": ["string"], "weight": 0, }, - "max_results": 0, + "max_results": 200, "notion": { "notion_page_ids": ["string"], "weight": 0, @@ -707,7 +707,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncHyperspell "label_ids": ["string"], "weight": 0, }, - "max_results": 0, + "max_results": 200, "notion": { "notion_page_ids": ["string"], "weight": 0, From 056466258f6dff9fe7709a85f7f5879e31b332a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 01:28:23 +0000 Subject: [PATCH 11/13] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 624dbcde..51931843 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-74ec424b735b297993534ab70f3a67ace300f8fdf420513f13567392510dd74f.yml -openapi_spec_hash: 86a1f32a14643bcee413662f7ae4b10f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-d6e895ab5ce17b403a1981c9f3e3e1a357d2016683627cbbc725c10f6aa2e13a.yml +openapi_spec_hash: 36fc6b210e87fbd995fd578adcbe6626 config_hash: fd3005a8f140e5baadd3d25b3c9cd79f From ee29761e756adb19eb1f07232abde4e2a1e20d4f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Mar 2026 05:51:47 +0000 Subject: [PATCH 12/13] chore(test): do not count install time for mock server timeout --- scripts/mock | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/mock b/scripts/mock index 0b28f6ea..bcf3b392 100755 --- a/scripts/mock +++ b/scripts/mock @@ -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 From 13865155e2c6a4e13e4a6fca500155a2649e3d9a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Mar 2026 05:52:04 +0000 Subject: [PATCH 13/13] release: 0.34.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 21 +++++++++++++++++++++ pyproject.toml | 2 +- src/hyperspell/_version.py | 2 +- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 57dc0c3d..e4e1c3ce 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.33.0" + ".": "0.34.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 254432cc..e868dc57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.34.0 (2026-03-07) + +Full Changelog: [v0.33.0...v0.34.0](https://github.com/hyperspell/python-sdk/compare/v0.33.0...v0.34.0) + +### Features + +* **api:** api update ([0f66c9d](https://github.com/hyperspell/python-sdk/commit/0f66c9dfe8e50d22f1a66f6de9b3ee0f1a89ab38)) +* **api:** api update ([b76b873](https://github.com/hyperspell/python-sdk/commit/b76b873e4c01f4c9421cc6e452f216c19374b687)) +* **api:** api update ([b75e2b3](https://github.com/hyperspell/python-sdk/commit/b75e2b3bbb5a871a39d147e4cb0949d7279f3271)) +* **api:** api update ([d330dea](https://github.com/hyperspell/python-sdk/commit/d330deaec6f907f4abee6dd8fc786da018ea72a7)) +* **api:** api update ([e01d911](https://github.com/hyperspell/python-sdk/commit/e01d911cb400b1ee3827332299f054d278f867d4)) + + +### Chores + +* **api:** python trusted publisher ([3d7a283](https://github.com/hyperspell/python-sdk/commit/3d7a283ebe54b78a23964a17a3167c50da0aeba2)) +* **internal:** add request options to SSE classes ([6b5c9ad](https://github.com/hyperspell/python-sdk/commit/6b5c9ad8271ecb8887faf8cb678805e6d481459c)) +* **internal:** make `test_proxy_environment_variables` more resilient ([3cc3332](https://github.com/hyperspell/python-sdk/commit/3cc33321d35a6162c6c8540b571d4d3c2b63a022)) +* **internal:** make `test_proxy_environment_variables` more resilient to env ([2c99a7f](https://github.com/hyperspell/python-sdk/commit/2c99a7f619b2581f2bf7bc2bea4519fc1f6c5733)) +* **test:** do not count install time for mock server timeout ([ee29761](https://github.com/hyperspell/python-sdk/commit/ee29761e756adb19eb1f07232abde4e2a1e20d4f)) + ## 0.33.0 (2026-02-20) Full Changelog: [v0.32.0...v0.33.0](https://github.com/hyperspell/python-sdk/compare/v0.32.0...v0.33.0) diff --git a/pyproject.toml b/pyproject.toml index 7a5607b4..5bc42897 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hyperspell" -version = "0.33.0" +version = "0.34.0" description = "The official Python library for the hyperspell API" dynamic = ["readme"] license = "MIT" diff --git a/src/hyperspell/_version.py b/src/hyperspell/_version.py index 778314bc..19fe74d1 100644 --- a/src/hyperspell/_version.py +++ b/src/hyperspell/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "hyperspell" -__version__ = "0.33.0" # x-release-please-version +__version__ = "0.34.0" # x-release-please-version