Conversation
|
🧪 Testing To try out this version of the SDK: Expires at: Fri, 08 May 2026 05:14:52 GMT |
0a683c7 to
c11de29
Compare
|
Canary encountered an internal error while analyzing this PR. |
c11de29 to
e79b8eb
Compare
Confidence Score: 5/5 - Safe to Merge
|
e79b8eb to
0a0e812
Compare
Confidence Score: 5/5 - Safe to Merge
|
0a0e812 to
df02664
Compare
df02664 to
eed16a8
Compare
Confidence Score: 5/5 - Safe to Merge
|
Confidence Score: 5/5 - Safe to Merge
|
eed16a8 to
5e6ff5c
Compare
Confidence Score: 5/5 - Safe to Merge
|
5e6ff5c to
4dd9085
Compare
Confidence Score: 5/5 - Safe to Merge
|
4dd9085 to
8496f01
Compare
Confidence Score: 5/5 - Safe to Merge
|
8496f01 to
efbb978
Compare
94f6a6e to
c6b5480
Compare
Confidence Score: 5/5 - Safe to MergeSafe to merge — this PR cleanly introduces Key Findings:
Files requiring special attention
|
c6b5480 to
c446dd3
Compare
c446dd3 to
d59192f
Compare
d59192f to
fc13909
Compare
Confidence Score: 5/5 - Safe to MergeSafe to merge — this release PR for hyperspell v0.37.0 introduces well-scoped additions including Gmail Actions integration literals across type models, a Key Findings:
Files requiring special attention
|
b9351a8 to
91740f5
Compare
Confidence Score: 5/5 - Safe to MergeSafe to merge — this PR cleanly releases v0.37.0 of the Hyperspell Python SDK with no issues identified across the reviewed files. The migration from Prism to Steady mock server tooling, the addition of the RFC 3986-compliant Key Findings:
Files requiring special attention
|
Confidence Score: 5/5 - Safe to MergeSafe to merge — this release PR for hyperspell v0.37.0 introduces well-scoped additive changes including the Key Findings:
Files requiring special attention
|
91740f5 to
c057e5a
Compare
Confidence Score: 5/5 - Safe to MergeSafe to merge — this release PR (v0.37.0) introduces well-scoped additive changes including the Key Findings:
|
c057e5a to
35ad819
Compare
| "/memories/upload", | ||
| body=maybe_transform(body, memory_upload_params.MemoryUploadParams), | ||
| files=files, | ||
| body=maybe_transform( | ||
| { | ||
| "file": file, | ||
| "collection": collection, | ||
| "metadata": metadata, | ||
| }, | ||
| memory_upload_params.MemoryUploadParams, | ||
| ), | ||
| options=make_request_options( | ||
| extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
There was a problem hiding this comment.
Correctness: Removing extract_files/deepcopy_minimal and the files=files kwarg from _post means the file field is now sent as a plain JSON body field instead of being extracted and passed as a multipart form-data file part — actual file uploads will be broken or malformed.
🤖 AI Agent Prompt for Cursor/Windsurf
📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue
In `src/hyperspell/resources/memories.py`, the `upload` method (sync, around line 591) previously called `extract_files` to pull the file object out of the body dict and passed it via `files=files` to `self._post()`. This diff removes that extraction and the `files=` kwarg entirely. Without this, the `file` value stays in the JSON body and is never handed to httpx as a multipart file part, breaking file uploads. Either restore the `extract_files`/`deepcopy_minimal` + `files=files` pattern, or verify that `src/hyperspell/_files.py` (also changed in this PR) now handles file extraction transparently inside `_post`/`_build_request` so this explicit extraction is no longer needed — and confirm the async version is consistent.
|
|
||
| async def upload( | ||
| self, | ||
| *, |
There was a problem hiding this comment.
Correctness: Changing file from FileTypes to str for a multipart/form-data upload means only a plain string (e.g. a filename) gets sent instead of actual file bytes/content — the server will receive the string literal, not the file data, silently corrupting all file uploads.
Affected Locations:
- src/hyperspell/resources/memories.py:1116-1116
- src/hyperspell/resources/memories.py:551-551
🤖 AI Agent Prompt for Cursor/Windsurf
📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue
In `src/hyperspell/resources/memories.py`, the `async def upload()` method at line 1116 changed the `file` parameter type from `FileTypes` to `str`. For a `multipart/form-data` upload, passing a plain `str` sends only the string value (e.g. a filename) rather than the actual file contents. Revert this parameter type back to `FileTypes` (or an appropriate union type such as `Union[str, bytes, BinaryIO, FileTypes]`) so the HTTP client can correctly encode and transmit file data in the multipart body.
| return await self._post( | ||
| "/memories/upload", | ||
| body=await async_maybe_transform(body, memory_upload_params.MemoryUploadParams), | ||
| files=files, | ||
| body=await async_maybe_transform( | ||
| { | ||
| "file": file, | ||
| "collection": collection, | ||
| "metadata": metadata, | ||
| }, | ||
| memory_upload_params.MemoryUploadParams, | ||
| ), | ||
| options=make_request_options( | ||
| extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout | ||
| ), |
There was a problem hiding this comment.
Correctness: Removing extract_files and files=files means the file field is no longer extracted and sent as a proper multipart file part — it will be serialized into the JSON body instead, breaking actual file uploads for the async path.
Affected Locations:
- src/hyperspell/resources/memories.py:1155-1167
- src/hyperspell/resources/memories.py:591-601
🤖 AI Agent Prompt for Cursor/Windsurf
📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue
In `src/hyperspell/resources/memories.py`, the async `upload` method inside `AsyncMemoriesResource` (around line 1155-1167) was changed to remove the `extract_files` call and the `files=files` parameter passed to `self._post()`. Without extracting the file from the body and passing it via `files=`, the file content will be serialized as JSON rather than as a proper multipart form-data file part, breaking file uploads. Restore the `deepcopy_minimal` + `extract_files` + `files=files` pattern, OR verify that the underlying `_post` / multipart handling in `_files.py` (also changed in this PR) correctly handles the file field when passed through `body` without explicit `files=` — and add a test confirming real file bytes are sent correctly.
Confidence Score: 1/5 - Blocking IssuesNot safe to merge — this PR introduces multiple critical regressions in file upload handling within Key Findings:
Files requiring special attention
|
35ad819 to
200c87e
Compare
Confidence Score: 5/5 - Safe to MergeSafe to merge — this release PR for Key Findings:
Files requiring special attention
|
200c87e to
1184824
Compare
Confidence Score: 5/5 - Safe to MergeSafe to merge — this release PR introduces Gmail Actions integration and a new Key Findings:
Files requiring special attention
|
Automated Release PR
0.37.0 (2026-04-08)
Full Changelog: v0.36.0...v0.37.0
Features
Bug Fixes
Chores
Refactors
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions