release: 4.1.0#86
Open
stainless-app[bot] wants to merge 139 commits into
Open
Conversation
fix(client): mark some request bodies as optional
Note that we still want to run tests, as these depend on the metadata.
Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run.
Comment on lines
+551
to
+568
| is_body_allowed = options.method.lower() != "get" | ||
|
|
||
| if is_body_allowed: | ||
| if options.content is not None and json_data is not None: | ||
| raise TypeError("Passing both `content` and `json_data` is not supported") | ||
| if options.content is not None and files is not None: | ||
| raise TypeError("Passing both `content` and `files` is not supported") | ||
| if options.content is not None: | ||
| kwargs["content"] = options.content | ||
| elif isinstance(json_data, bytes): | ||
| kwargs["content"] = json_data | ||
| elif not files: | ||
| # Don't set content when JSON is sent as multipart/form-data, | ||
| # since httpx's content param overrides other body arguments | ||
| kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None | ||
| kwargs["files"] = files | ||
| else: | ||
| headers.pop("Content-Type", None) |
There was a problem hiding this comment.
When get_api_list(..., body=...) builds a GET request with json_data, this branch now skips all body arguments and removes Content-Type. Endpoints that require a JSON body for a GET list request will receive an empty request instead, which can return incorrect results or a server error.
Rule Used: What: never use the word retell.
why: I don't fuc... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/brainbase/_base_client.py
Line: 551-568
Comment:
**GET Body Is Dropped**
When `get_api_list(..., body=...)` builds a GET request with `json_data`, this branch now skips all body arguments and removes `Content-Type`. Endpoints that require a JSON body for a GET list request will receive an empty request instead, which can return incorrect results or a server error.
**Rule Used:** What: never use the word retell.
why: I don't fuc... ([source](https://app.greptile.com/brainbaselabs/-/custom-context?memory=4fc21456-8242-4885-a8ab-c02e1ce16995))
How can I resolve this? If you propose a fix, please make it concise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated Release PR
4.1.0 (2026-07-08)
Full Changelog: v4.0.0...v4.1.0
Features
NotGivenfor body (#67) (3ad7f25)X-Stainless-Read-Timeoutheader (#63) (a594c75)Bug Fixes
model_dumpandmodel_dump_jsonfor Pydantic v1 (898ca7b)by_aliasunless set (887a8ec)Performance Improvements
Chores
httpx-aiohttpversion to 0.1.9 (7aeb4c8)actions/github-script(bdad5ed)api.mdfiles (034e708)--fixargument to lint script (0b1e68e)test_proxy_environment_variablesmore resilient (f79d30c)test_proxy_environment_variablesmore resilient to env (08e33e4)pyproject.tomlfile (f87b268)actions/checkoutversion (54d6bd9)get_platformtest (ef07d85)Documentation
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
Greptile Summary
This PR releases version 4.1.0 with SDK, packaging, and generated API updates.
Confidence Score: 4/5
The GET request body path needs a fix before merging.
get_api_list(..., body=...)can still create GET requests with JSON data.src/brainbase/_base_client.py
Important Files Changed
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "release: 4.1.0" | Re-trigger Greptile
Context used:
why: I don't fuc... (source)